streamlined WS flow, reduced spam amount related to WS reconnections
This commit is contained in:
parent
90afcd3420
commit
a8967d85bd
5 changed files with 56 additions and 49 deletions
|
@ -1184,7 +1184,10 @@ export const handleMastoWS = (wsEvent) => {
|
|||
export const WSConnectionStatus = Object.freeze({
|
||||
'JOINED': 1,
|
||||
'CLOSED': 2,
|
||||
'ERROR': 3
|
||||
'ERROR': 3,
|
||||
'DISABLED': 4,
|
||||
'STARTING': 5,
|
||||
'STARTING_INITIAL': 6
|
||||
})
|
||||
|
||||
const chats = ({ credentials }) => {
|
||||
|
|
|
@ -57,14 +57,12 @@ const fetchNotifications = ({ store, args, older }) => {
|
|||
return notifications
|
||||
})
|
||||
.catch((error) => {
|
||||
if (!store.rootState.api.connectionBroken) {
|
||||
store.dispatch('pushGlobalNotice', {
|
||||
level: 'error',
|
||||
messageKey: 'notifications.error',
|
||||
messageArgs: [error.message],
|
||||
timeout: 5000
|
||||
})
|
||||
}
|
||||
store.dispatch('pushGlobalNotice', {
|
||||
level: 'error',
|
||||
messageKey: 'notifications.error',
|
||||
messageArgs: [error.message],
|
||||
timeout: 5000
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -66,14 +66,12 @@ const fetchAndUpdate = ({
|
|||
return { statuses, pagination }
|
||||
})
|
||||
.catch((error) => {
|
||||
if (!store.rootState.api.connectionBroken) {
|
||||
store.dispatch('pushGlobalNotice', {
|
||||
level: 'error',
|
||||
messageKey: 'timeline.error',
|
||||
messageArgs: [error.message],
|
||||
timeout: 5000
|
||||
})
|
||||
}
|
||||
store.dispatch('pushGlobalNotice', {
|
||||
level: 'error',
|
||||
messageKey: 'timeline.error',
|
||||
messageArgs: [error.message],
|
||||
timeout: 5000
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue