refs #3587 Fix deleting tag timeline
This commit is contained in:
parent
f52ff4bd3e
commit
9199e8833f
|
@ -1,6 +1,5 @@
|
|||
<template>
|
||||
<div name="tag" class="tag-timeline">
|
||||
<div></div>
|
||||
<DynamicScroller :items="timeline" :min-item-size="86" id="scroller" class="scroller" ref="scroller">
|
||||
<template v-slot="{ item, index, active }">
|
||||
<DynamicScrollerItem :item="item" :active="active" :size-dependencies="[item.uri]" :data-index="index" :watchData="true">
|
||||
|
|
|
@ -2,6 +2,7 @@ import { LocalTag } from '~/src/types/localTag'
|
|||
import { Module, MutationTree, ActionTree } from 'vuex'
|
||||
import { RootState } from '@/store'
|
||||
import { MyWindow } from '~/src/types/global'
|
||||
import { toRaw } from 'vue'
|
||||
|
||||
const win = window as any as MyWindow
|
||||
|
||||
|
@ -35,7 +36,7 @@ const actions: ActionTree<ListState, RootState> = {
|
|||
return tags
|
||||
},
|
||||
[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('TimelineSpace/SideMenu/listTags', {}, { root: true })
|
||||
return 'deleted'
|
||||
|
|
Loading…
Reference in New Issue