summaryrefslogtreecommitdiff
path: root/apps/web/lib/stores/user-interface-store.ts
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-10 01:29:36 -0800
committerFuwn <[email protected]>2026-02-10 01:29:36 -0800
commiteb4674514acaaa57885057e0446aacc8660b6708 (patch)
tree9e86312d1d03723090fb5416a47de7c74d5baa52 /apps/web/lib/stores/user-interface-store.ts
parentfeat: scoped mark-all-read, share enhancements, notification z-index (diff)
downloadasa.news-eb4674514acaaa57885057e0446aacc8660b6708.tar.xz
asa.news-eb4674514acaaa57885057e0446aacc8660b6708.zip
feat: add automatic timeline refresh with scroll position preservation
New appearance setting (disabled by default) that silently refreshes the entry list when new entries arrive, provided the user is scrolled to the top. Falls back to notification when scrolled down to avoid disrupting reading position.
Diffstat (limited to 'apps/web/lib/stores/user-interface-store.ts')
-rw-r--r--apps/web/lib/stores/user-interface-store.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/web/lib/stores/user-interface-store.ts b/apps/web/lib/stores/user-interface-store.ts
index 4c17735..814b0d6 100644
--- a/apps/web/lib/stores/user-interface-store.ts
+++ b/apps/web/lib/stores/user-interface-store.ts
@@ -45,7 +45,9 @@ interface UserInterfaceState {
showReadingTime: boolean
showFoldersAboveFeeds: boolean
showEntryFavicons: boolean
+ autoRefreshTimeline: boolean
toolbarPosition: ToolbarPosition
+ isEntryListAtTop: boolean
isShortcutsDialogOpen: boolean
expandedFolderIdentifiers: string[]
currentFeedIdentifier: string | null
@@ -76,7 +78,9 @@ interface UserInterfaceState {
setShowReadingTime: (show: boolean) => void
setShowFoldersAboveFeeds: (show: boolean) => void
setShowEntryFavicons: (show: boolean) => void
+ setAutoRefreshTimeline: (enabled: boolean) => void
setToolbarPosition: (position: ToolbarPosition) => void
+ setIsEntryListAtTop: (isAtTop: boolean) => void
setShortcutsDialogOpen: (isOpen: boolean) => void
toggleShortcutsDialog: () => void
toggleFolderExpansion: (folderIdentifier: string) => void
@@ -107,7 +111,9 @@ export const useUserInterfaceStore = create<UserInterfaceState>()(
showReadingTime: true,
showFoldersAboveFeeds: false,
showEntryFavicons: false,
+ autoRefreshTimeline: false,
toolbarPosition: "top",
+ isEntryListAtTop: true,
isShortcutsDialogOpen: false,
expandedFolderIdentifiers: [],
currentFeedIdentifier: null,
@@ -167,8 +173,13 @@ export const useUserInterfaceStore = create<UserInterfaceState>()(
setShowEntryFavicons: (show) => set({ showEntryFavicons: show }),
+ setAutoRefreshTimeline: (enabled) =>
+ set({ autoRefreshTimeline: enabled }),
+
setToolbarPosition: (position) => set({ toolbarPosition: position }),
+ setIsEntryListAtTop: (isAtTop) => set({ isEntryListAtTop: isAtTop }),
+
setShortcutsDialogOpen: (isOpen) =>
set({ isShortcutsDialogOpen: isOpen }),
@@ -221,6 +232,7 @@ export const useUserInterfaceStore = create<UserInterfaceState>()(
showReadingTime: state.showReadingTime,
showFoldersAboveFeeds: state.showFoldersAboveFeeds,
showEntryFavicons: state.showEntryFavicons,
+ autoRefreshTimeline: state.autoRefreshTimeline,
toolbarPosition: state.toolbarPosition,
}),
}