wip proper migration of mutewords/theme3hacks
This commit is contained in:
parent
59ebce47bd
commit
e05ffbb350
4 changed files with 34 additions and 91 deletions
|
|
@ -30,8 +30,6 @@ import { useOAuthStore } from 'src/stores/oauth.js'
|
|||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useUserHighlightStore } from 'src/stores/user_highlight.js'
|
||||
|
||||
import { declarations } from 'src/modules/config_declaration'
|
||||
|
||||
// TODO: Unify with mergeOrAdd in statuses.js
|
||||
export const mergeOrAdd = (arr, obj, item) => {
|
||||
if (!item) {
|
||||
|
|
@ -742,25 +740,6 @@ const users = {
|
|||
useSyncConfigStore().setFlag({ flag: 'configMigration', value: 0 })
|
||||
/**/
|
||||
|
||||
const { configMigration } = useSyncConfigStore().flagStorage
|
||||
declarations
|
||||
.filter((x) => {
|
||||
return (
|
||||
x.store === 'server-side' &&
|
||||
x.migrationNum > 0 &&
|
||||
x.migrationNum > configMigration
|
||||
)
|
||||
})
|
||||
.toSorted((a, b) => a.configMigration - b.configMigration)
|
||||
.forEach((value) => {
|
||||
value.migration(useSyncConfigStore(), store.rootState)
|
||||
useSyncConfigStore().setFlag({
|
||||
flag: 'configMigration',
|
||||
value: value.migrationNum,
|
||||
})
|
||||
useSyncConfigStore().pushSyncConfig()
|
||||
})
|
||||
|
||||
if (user.token) {
|
||||
dispatch('setWsToken', user.token)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue