add setting for showing unread count in tab/favicon (#1518)

This commit is contained in:
Athou
2024-08-25 18:05:34 +02:00
parent bb6578bdd0
commit 764c1a6430
38 changed files with 427 additions and 9 deletions

View File

@@ -16,6 +16,8 @@ import {
changeSharingSetting,
changeShowRead,
changeStarIconDisplayMode,
changeUnreadCountFavicon,
changeUnreadCountTitle,
reloadProfile,
reloadSettings,
reloadTags,
@@ -91,6 +93,14 @@ export const userSlice = createSlice({
if (!state.settings) return
state.settings.mobileFooter = action.meta.arg
})
builder.addCase(changeUnreadCountTitle.pending, (state, action) => {
if (!state.settings) return
state.settings.unreadCountTitle = action.meta.arg
})
builder.addCase(changeUnreadCountFavicon.pending, (state, action) => {
if (!state.settings) return
state.settings.unreadCountFavicon = action.meta.arg
})
builder.addCase(changeSharingSetting.pending, (state, action) => {
if (!state.settings) return
state.settings.sharingSettings[action.meta.arg.site] = action.meta.arg.value
@@ -107,6 +117,8 @@ export const userSlice = createSlice({
changeMarkAllAsReadConfirmation.fulfilled,
changeCustomContextMenu.fulfilled,
changeMobileFooter.fulfilled,
changeUnreadCountTitle.fulfilled,
changeUnreadCountFavicon.fulfilled,
changeSharingSetting.fulfilled
),
() => {