Fix data loss on notifications-view update

zio/stable
Paul Frazee 2022-11-18 14:17:26 -06:00
parent fbb9689e4a
commit e02b39bf84
1 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ export class NotificationsViewItemModel implements GroupedNotification {
this.copy(v)
}
copy(v: GroupedNotification) {
copy(v: GroupedNotification, preserve = false) {
this.uri = v.uri
this.cid = v.cid
this.author = v.author
@ -58,7 +58,7 @@ export class NotificationsViewItemModel implements GroupedNotification {
new NotificationsViewItemModel(this.rootStore, '', add),
)
}
} else {
} else if (!preserve) {
this.additional = undefined
}
}
@ -322,7 +322,7 @@ export class NotificationsViewModel {
item2 => item.uri === item2.uri && item.indexedAt === item2.indexedAt,
)
if (existingItem) {
existingItem.copy(item)
existingItem.copy(item, true)
}
}
}