refs #3587 Fix deleting tag timeline

This commit is contained in:
AkiraFukushima 2022-09-05 01:03:46 +09:00
parent f52ff4bd3e
commit 9199e8833f
No known key found for this signature in database
GPG Key ID: B6E51BAC4DE1A957
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,5 @@
<template> <template>
<div name="tag" class="tag-timeline"> <div name="tag" class="tag-timeline">
<div></div>
<DynamicScroller :items="timeline" :min-item-size="86" id="scroller" class="scroller" ref="scroller"> <DynamicScroller :items="timeline" :min-item-size="86" id="scroller" class="scroller" ref="scroller">
<template v-slot="{ item, index, active }"> <template v-slot="{ item, index, active }">
<DynamicScrollerItem :item="item" :active="active" :size-dependencies="[item.uri]" :data-index="index" :watchData="true"> <DynamicScrollerItem :item="item" :active="active" :size-dependencies="[item.uri]" :data-index="index" :watchData="true">

View File

@ -2,6 +2,7 @@ import { LocalTag } from '~/src/types/localTag'
import { Module, MutationTree, ActionTree } from 'vuex' import { Module, MutationTree, ActionTree } from 'vuex'
import { RootState } from '@/store' import { RootState } from '@/store'
import { MyWindow } from '~/src/types/global' import { MyWindow } from '~/src/types/global'
import { toRaw } from 'vue'
const win = window as any as MyWindow const win = window as any as MyWindow
@ -35,7 +36,7 @@ const actions: ActionTree<ListState, RootState> = {
return tags return tags
}, },
[ACTION_TYPES.REMOVE_TAG]: async ({ dispatch }, tag: LocalTag) => { [ACTION_TYPES.REMOVE_TAG]: async ({ dispatch }, tag: LocalTag) => {
await win.ipcRenderer.invoke('remove-hashtag', tag) await win.ipcRenderer.invoke('remove-hashtag', toRaw(tag))
dispatch('listTags') dispatch('listTags')
dispatch('TimelineSpace/SideMenu/listTags', {}, { root: true }) dispatch('TimelineSpace/SideMenu/listTags', {}, { root: true })
return 'deleted' return 'deleted'