Skip to content

Commit

Permalink
🐛 修复特定情况下的数据遗漏
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed Sep 3, 2024
1 parent 5e53baf commit 3425919
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/components/post/tp-parser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ function getParsedData(data: TGApp.Plugins.Mys.SctPost.Base[]): TGApp.Plugins.My
const text = parsedText[i];
child.push(parsedText[i]);
if (text.insert === "\n") {
if (child.length === 1) {
res.push(child[0]);
child = [];
continue;
}
cur = {
insert: "",
attributes: text.attributes,
Expand All @@ -70,7 +75,7 @@ function getParsedData(data: TGApp.Plugins.Mys.SctPost.Base[]): TGApp.Plugins.My
child = [];
}
}
if (check !== parsedText.length - 1 && child.length > 1) res.push(...child);
if (check !== parsedText.length - 1 && child.length > 0) res.push(...child);
}
if (res.length === 0 && child.length > 0) res.push(...child);
return res;
Expand Down
1 change: 0 additions & 1 deletion src/components/postReply/tpr-reply.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
@click="showReply()"
>
<v-icon size="small">mdi-message-text</v-icon>
{{ props.modelValue.sub_replies.length }}
<v-menu
submenu
activator="parent"
Expand Down

0 comments on commit 3425919

Please sign in to comment.