diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-04-15 20:34:00 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-04-15 20:34:00 +0900 |
| commit | 165830d6c8331f14da455cedcb4cd695aaa6c9b3 (patch) | |
| tree | 5f9c7b3d3331db8173ef33f1a86e74d76fe69fe8 /packages | |
| parent | fix(frontend): make keep scroll pos of timeline (diff) | |
| download | sharkey-165830d6c8331f14da455cedcb4cd695aaa6c9b3.tar.gz sharkey-165830d6c8331f14da455cedcb4cd695aaa6c9b3.tar.bz2 sharkey-165830d6c8331f14da455cedcb4cd695aaa6c9b3.zip | |
コミット忘れ
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/frontend/src/components/MkNotes.vue | 4 | ||||
| -rw-r--r-- | packages/frontend/src/pages/timeline.vue | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/packages/frontend/src/components/MkNotes.vue b/packages/frontend/src/components/MkNotes.vue index ad6210816d..214d52ec7f 100644 --- a/packages/frontend/src/components/MkNotes.vue +++ b/packages/frontend/src/components/MkNotes.vue @@ -23,13 +23,13 @@ SPDX-License-Identifier: AGPL-3.0-only tag="div" > <template v-for="(note, i) in notes" :key="note.id"> - <div v-if="note._shouldInsertAd_" :class="[$style.noteWithAd, { '_gaps': !noGap }]"> + <div v-if="note._shouldInsertAd_" :class="[$style.noteWithAd, { '_gaps': !noGap }]" :data-scroll-anchor="note.id"> <MkNote :class="$style.note" :note="note" :withHardMute="true"/> <div :class="$style.ad"> <MkAd :preferForms="['horizontal', 'horizontal-big']"/> </div> </div> - <MkNote v-else :class="$style.note" :note="note" :withHardMute="true"/> + <MkNote :class="$style.note" :note="note" :withHardMute="true" :data-scroll-anchor="note.id"/> </template> </component> </template> diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index 644b2d3d13..d2bf162ce5 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -52,12 +52,15 @@ import { miLocalStorage } from '@/local-storage.js'; import { availableBasicTimelines, hasWithReplies, isAvailableBasicTimeline, isBasicTimeline, basicTimelineIconClass } from '@/timelines.js'; import { prefer } from '@/preferences.js'; import { useRouter } from '@/router.js'; +import { useScrollPositionKeeper } from '@/use/use-scroll-position-keeper.js'; provide('shouldOmitHeaderTitle', true); const tlComponent = useTemplateRef('tlComponent'); const rootEl = useTemplateRef('rootEl'); +useScrollPositionKeeper(rootEl); + const router = useRouter(); router.useListener('same', () => { top(); |