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-03-23 23:16:01 +01:00
parent 6da2f545f6
commit b07db55573
6 changed files with 81 additions and 54 deletions

View File

@ -164,6 +164,16 @@ const instancesSlice = createSlice({
draft => draft.timestamp !== action.payload
)
},
clearPushLoading: ({ instances }) => {
const activeIndex = findInstanceActive(instances)
instances[activeIndex].push.global.loading = false
instances[activeIndex].push.decode.loading = false
instances[activeIndex].push.alerts.favourite.loading = false
instances[activeIndex].push.alerts.follow.loading = false
instances[activeIndex].push.alerts.mention.loading = false
instances[activeIndex].push.alerts.poll.loading = false
instances[activeIndex].push.alerts.reblog.loading = false
},
disableAllPushes: ({ instances }) => {
instances = instances.map(instance => {
let newInstance = instance
@ -352,6 +362,7 @@ export const {
updateInstanceNotificationsFilter,
updateInstanceDraft,
removeInstanceDraft,
clearPushLoading,
disableAllPushes
} = instancesSlice.actions