1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
This commit is contained in:
Zhiyuan Zheng
2021-02-01 02:16:53 +01:00
parent 1072d88191
commit b8aa402c99
20 changed files with 179 additions and 252 deletions

View File

@ -20,7 +20,6 @@ export type InstanceLocal = {
preferences: Mastodon.Preferences
}
notification: {
unread: boolean
latestTime?: Mastodon.Notification['created_at']
}
}
@ -115,7 +114,7 @@ export const localAddInstance = createAsyncThunk(
preferences
},
notification: {
unread: false
latestTime: undefined
}
}
})
@ -203,10 +202,8 @@ const instancesSlice = createSlice({
state,
action: PayloadAction<Partial<InstanceLocal['notification']>>
) => {
state.local.instances[state.local.activeIndex!].notification = {
...state.local.instances[state.local.activeIndex!].notification,
...action.payload
}
state.local.instances[state.local.activeIndex!].notification =
action.payload
},
remoteUpdate: (
state,