+
@@ -61,6 +61,8 @@ import MkPageHeader from '@/components/global/MkPageHeader.vue';
import { $i } from '@/account.js';
import { checkWordMute } from '@/scripts/check-word-mute.js';
import UserRecentNotes from '@/components/UserRecentNotes.vue';
+import { useScrollPositionManager } from '@/nirax.js';
+import { getScrollContainer } from '@/scripts/scroll.js';
const props = withDefaults(defineProps<{
initialTab?: FollowingFeedTab,
@@ -76,6 +78,8 @@ const router = useRouter();
const currentTab: Ref = ref(props.initialTab);
const mutualsOnly: Ref = computed(() => currentTab.value === mutualsTab);
const userRecentNotes = shallowRef>();
+const userScroll = shallowRef();
+const noteScroll = shallowRef();
// We have to disable the per-user feed on small displays, and it must be done through JS instead of CSS.
// Otherwise, the second column will waste resources in the background.
@@ -213,6 +217,8 @@ const headerTabs = computed(() => [
} satisfies Tab,
]);
+useScrollPositionManager(() => getScrollContainer(userScroll.value ?? null), router);
+useScrollPositionManager(() => getScrollContainer(noteScroll.value ?? null), router);
definePageMetadata(() => ({
title: i18n.ts.following,
icon: 'ph-user-check ph-bold ph-lg',
@@ -254,12 +260,12 @@ definePageMetadata(() => ({
.notes {
grid-area: notes;
- overflow: auto;
+ overflow-y: auto;
}
.user {
grid-area: user;
- overflow: auto;
+ overflow-y: auto;
}
.userInfo {