File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -88,9 +88,27 @@ function data (state = defaultDataMap(), action) {
88
88
if ( note . isTrashed ) {
89
89
state . trashedSet . add ( uniqueKey )
90
90
state . starredSet . delete ( uniqueKey )
91
+
92
+ note . tags . forEach ( tag => {
93
+ let tagNoteList = state . tagNoteMap . get ( tag )
94
+ if ( tagNoteList != null ) {
95
+ tagNoteList = new Set ( tagNoteList )
96
+ tagNoteList . delete ( uniqueKey )
97
+ state . tagNoteMap . set ( tag , tagNoteList )
98
+ }
99
+ } )
91
100
} else {
92
101
state . trashedSet . delete ( uniqueKey )
93
102
103
+ note . tags . forEach ( tag => {
104
+ let tagNoteList = state . tagNoteMap . get ( tag )
105
+ if ( tagNoteList != null ) {
106
+ tagNoteList = new Set ( tagNoteList )
107
+ tagNoteList . add ( uniqueKey )
108
+ state . tagNoteMap . set ( tag , tagNoteList )
109
+ }
110
+ } )
111
+
94
112
if ( note . isStarred ) {
95
113
state . starredSet . add ( uniqueKey )
96
114
}
You can’t perform that action at this time.
0 commit comments