From 5acd2224df77f5cd68347adbc0a2c3c1c4fb4844 Mon Sep 17 00:00:00 2001 From: userquin Date: Sat, 11 Feb 2023 12:31:53 +0100 Subject: [PATCH] chore: move path to page when using notification paginator --- components/notification/NotificationPaginator.vue | 8 +------- components/timeline/TimelineMentions.vue | 3 ++- components/timeline/TimelineNotifications.vue | 4 +++- pages/notifications/index.vue | 5 ++++- pages/notifications/mention.vue | 6 +++++- plugins/track-scroll-position.client.ts | 14 ++++++++++---- 6 files changed, 25 insertions(+), 15 deletions(-) diff --git a/components/notification/NotificationPaginator.vue b/components/notification/NotificationPaginator.vue index e65cd924..db171219 100644 --- a/components/notification/NotificationPaginator.vue +++ b/components/notification/NotificationPaginator.vue @@ -116,9 +116,7 @@ function groupItems(items: mastodon.v1.Notification[]): NotificationSlot[] { // Finalize remaining groups processGroup() - nextTick().then(() => { - nuxtApp.$trackScroll.restoreCustomPageScroll() - }) + nuxtApp.$trackScroll.restoreCustomPageScroll() return results } @@ -153,10 +151,6 @@ function preprocess(items: NotificationSlot[]): NotificationSlot[] { const { clearNotifications } = useNotifications() const { formatNumber } = useHumanReadableNumber() - -onMounted(() => { - nuxtApp.$trackScroll.registerCustomRoute(path) -})