Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refs #2500 Change settings database to sqlite3 #3972

Merged
merged 5 commits into from
Jan 2, 2023

Conversation

h3poteto
Copy link
Owner

@h3poteto h3poteto commented Jan 1, 2023

Description

Related Issues

refs #2500

Appearance

@@ -352,7 +352,7 @@ export default defineComponent({
return null
})
const isMyMessage = computed(() => {
return store.state.TimelineSpace.account.accountId === originalMessage.value.account.id
return account.value!.accountId === originalMessage.value.account.id
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

@@ -386,7 +386,7 @@
return originalMessage.value.visibility === 'direct'
})
const quoteSupported = computed(() => {
return QuoteSupported(sns.value, account.value.domain)
return QuoteSupported(server.value!.sns, server.value!.domain)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

@@ -386,7 +386,7 @@
return originalMessage.value.visibility === 'direct'
})
const quoteSupported = computed(() => {
return QuoteSupported(sns.value, account.value.domain)
return QuoteSupported(server.value!.sns, server.value!.domain)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

timeline: tl
}
const setting: Setting = Object.assign({}, state.setting, timeline)
setting.accountId = rootState.Settings.accountId!
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

@@ -170,6 +170,10 @@ const actions: ActionTree<TimelineSpaceState, RootState> = {
commit(MUTATION_TYPES.UPDATE_EMOJIS, res.data)
return res.data
},
[ACTION_TYPES.LOAD_SETTING]: async ({ commit, state }) => {
const setting: Setting = await win.ipcRenderer.invoke('get-account-setting', state.account!.id)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

@h3poteto h3poteto marked this pull request as ready for review January 2, 2023 00:10
sns: 'mastodon'
}
})
describe('changeInstance', () => {
it('should be changed', () => {
Login.mutations![MUTATION_TYPES.CHANGE_INSTANCE](state, 'pleroma.io')
expect(state.selectedInstance).toEqual('pleroma.io')
Login.mutations![MUTATION_TYPES.CHANGE_DOMAIN](state, 'pleroma.io')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

@@ -247,84 +235,71 @@ const actions: ActionTree<TimelineSpaceState, RootState> = {
throw new Error('Account is not set')
}

win.ipcRenderer.on(`update-start-all-user-streamings-${state.account!.id}`, (_, update: Entity.Status) => {
win.ipcRenderer.on(`update-user-streamings-${state.account!.id}`, (_, update: Entity.Status) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

commit('TimelineSpace/Contents/Home/appendTimeline', update, { root: true })
// Sometimes archive old statuses
if (rootState.TimelineSpace.Contents.Home.heading && Math.random() > 0.8) {
commit('TimelineSpace/Contents/Home/archiveTimeline', null, { root: true })
}
commit('TimelineSpace/SideMenu/changeUnreadHomeTimeline', true, { root: true })
})
win.ipcRenderer.on(`notification-start-all-user-streamings-${state.account!.id}`, (_, notification: Entity.Notification) => {
win.ipcRenderer.on(`notification-user-streamings-${state.account!.id}`, (_, notification: Entity.Notification) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

commit('TimelineSpace/SideMenu/changeUnreadMentions', true, { root: true })
})
win.ipcRenderer.on(`delete-start-all-user-streamings-${state.account!.id}`, (_, id: string) => {
win.ipcRenderer.on(`delete-user-streamings-${state.account!.id}`, (_, id: string) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

[ACTION_TYPES.BIND_LOCAL_STREAMING]: ({ commit, rootState }) => {
win.ipcRenderer.on('update-start-local-streaming', (_, update: Entity.Status) => {
[ACTION_TYPES.BIND_LOCAL_STREAMING]: ({ commit, rootState, state }) => {
win.ipcRenderer.on(`update-local-streamings-${state.account!.id}`, (_, update: Entity.Status) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

@@ -114,33 +114,28 @@ const actions: ActionTree<ShowState, RootState> = {
return res.data
},
[ACTION_TYPES.START_STREAMING]: ({ state, commit, rootState }, listID: string) => {
win.ipcRenderer.on('update-start-list-streaming', (_, update: Entity.Status) => {
win.ipcRenderer.on(`update-list-streamings-${rootState.TimelineSpace.account!.id}`, (_, update: Entity.Status) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

commit(MUTATION_TYPES.APPEND_TIMELINE, update)
if (state.heading && Math.random() > 0.8) {
commit(MUTATION_TYPES.ARCHIVE_TIMELINE)
}
})
win.ipcRenderer.on('delete-start-list-streaming', (_, id: string) => {
win.ipcRenderer.on(`delete-list-streamings-${rootState.TimelineSpace.account!.id}`, (_, id: string) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

win.ipcRenderer.once('error-start-list-streaming', (_, err: Error) => {
reject(err)
listId: listID,
accountId: rootState.TimelineSpace.account!.id
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

win.ipcRenderer.removeAllListeners('update-start-list-streaming')
win.ipcRenderer.removeAllListeners('delete-start-list-streaming')
win.ipcRenderer.send('stop-list-streaming')
win.ipcRenderer.removeAllListeners(`update-list-streamings-${rootState.TimelineSpace.account!.id}`)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

win.ipcRenderer.removeAllListeners('delete-start-list-streaming')
win.ipcRenderer.send('stop-list-streaming')
win.ipcRenderer.removeAllListeners(`update-list-streamings-${rootState.TimelineSpace.account!.id}`)
win.ipcRenderer.removeAllListeners(`delete-list-streamings-${rootState.TimelineSpace.account!.id}`)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] reported by reviewdog 🐶
Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

@h3poteto h3poteto merged commit 0573a34 into iss-2500/hashtag Jan 2, 2023
@h3poteto h3poteto deleted the iss-2500/settings branch January 2, 2023 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant