summaryrefslogtreecommitdiff
path: root/packages/frontend/src
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-09-17 10:55:26 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-09-17 10:55:26 +0900
commitf7c6932a83f80b6c43bcb79dcd11e8d490ce242a (patch)
tree587065237577996c04dc21b81dd9986f46fd68d1 /packages/frontend/src
parentenhance(frontend): improve note detail page (diff)
downloadmisskey-f7c6932a83f80b6c43bcb79dcd11e8d490ce242a.tar.gz
misskey-f7c6932a83f80b6c43bcb79dcd11e8d490ce242a.tar.bz2
misskey-f7c6932a83f80b6c43bcb79dcd11e8d490ce242a.zip
enhance: 各ノートが被クリップ数を保持するようにし、無意味にnotes/clipsを叩かないように
Diffstat (limited to 'packages/frontend/src')
-rw-r--r--packages/frontend/src/pages/note.vue11
1 files changed, 6 insertions, 5 deletions
diff --git a/packages/frontend/src/pages/note.vue b/packages/frontend/src/pages/note.vue
index e1f80bf126..ea5e4f5090 100644
--- a/packages/frontend/src/pages/note.vue
+++ b/packages/frontend/src/pages/note.vue
@@ -94,13 +94,14 @@ function fetchNote() {
noteId: props.noteId,
}).then(res => {
note = res;
- Promise.all([
+ // 古いノートは被クリップ数をカウントしていないので、2023-10-01以前のものは強制的にnotes/clipsを叩く
+ if (note.clippedCount > 0 || new Date(note.createdAt).getTime() < new Date('2023-10-01').getTime()) {
os.api('notes/clips', {
noteId: note.id,
- }),
- ]).then(([_clips]) => {
- clips = _clips;
- });
+ }).then((_clips) => {
+ clips = _clips;
+ });
+ }
}).catch(err => {
error = err;
});