summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/SkNote.vue
diff options
context:
space:
mode:
authorSugar <sugar@sylveon.social>2024-06-11 19:57:31 +0200
committerSugar <sugar@sylveon.social>2024-06-11 19:57:31 +0200
commitc149734fbadf2c8c258722b3cff12ec4fe91f8df (patch)
tree8d1b369aae1626478495d64319be63344fc25989 /packages/frontend/src/components/SkNote.vue
parentcorrect collapsed in reply to line alignment with small screen sizes (diff)
downloadsharkey-c149734fbadf2c8c258722b3cff12ec4fe91f8df.tar.gz
sharkey-c149734fbadf2c8c258722b3cff12ec4fe91f8df.tar.bz2
sharkey-c149734fbadf2c8c258722b3cff12ec4fe91f8df.zip
avoid renoteCollapsed dependency in inReplyToCollapsed
Diffstat (limited to 'packages/frontend/src/components/SkNote.vue')
-rw-r--r--packages/frontend/src/components/SkNote.vue11
1 files changed, 5 insertions, 6 deletions
diff --git a/packages/frontend/src/components/SkNote.vue b/packages/frontend/src/components/SkNote.vue
index 236728c6ae..00ecbd99d2 100644
--- a/packages/frontend/src/components/SkNote.vue
+++ b/packages/frontend/src/components/SkNote.vue
@@ -311,13 +311,12 @@ const translation = ref<Misskey.entities.NotesTranslateResponse | null>(null);
const translating = ref(false);
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.value.user.instance);
const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || (appearNote.value.visibility === 'followers' && appearNote.value.userId === $i?.id));
-const renoteCollapsed = ref(
- defaultStore.state.collapseRenotes && isRenote && (
- ($i && ($i.id === note.value.userId || $i.id === appearNote.value.userId)) || // `||` must be `||`! See https://github.com/misskey-dev/misskey/issues/13131
- (appearNote.value.myReaction != null)
- )
+const renoteCollapsedInitialValue = defaultStore.state.collapseRenotes && isRenote && (
+ ($i && ($i.id === note.value.userId || $i.id === appearNote.value.userId)) || // `||` must be `||`! See https://github.com/misskey-dev/misskey/issues/13131
+ (appearNote.value.myReaction != null)
);
-const inReplyToCollapsed = ref(defaultStore.state.collapseNotesRepliedTo && !renoteCollapsed.value);
+const renoteCollapsed = ref(renoteCollapsedInitialValue);
+const inReplyToCollapsed = ref(defaultStore.state.collapseNotesRepliedTo && !renoteCollapsedInitialValue);
const defaultLike = computed(() => defaultStore.state.like ? defaultStore.state.like : null);
const animated = computed(() => parsed.value ? checkAnimationFromMfm(parsed.value) : null);
const allowAnim = ref(defaultStore.state.advancedMfm && defaultStore.state.animatedMfm ? true : false);