Merge pull request #3603 from h3poteto/iss-3587

refs #3587 Fix deleting tag timeline
This commit is contained in:
AkiraFukushima 2022-09-05 01:12:00 +09:00 committed by GitHub
commit f6739ea8bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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">

View File

@ -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'