conversations cleanup
This commit is contained in:
parent
2deb74a6cf
commit
feb7135cc5
1 changed files with 8 additions and 0 deletions
|
|
@ -536,7 +536,15 @@ export const useStatusesStore = defineStore('statuses', {
|
|||
wipeUserStatuses(userId) {
|
||||
const removed = this.statusesPerUser.get(userId)
|
||||
removed.forEach((statusId) => {
|
||||
const status = this.allStatuses.get(statusId)
|
||||
this.allStatuses.delete(statusId)
|
||||
const conversationSet = this.conversations.get(
|
||||
status.statusnet_conversation_id,
|
||||
)
|
||||
conversationSet.delete(statusId)
|
||||
if (conversationSet.size === 0) {
|
||||
this.conversations.delete(status.statusnet_conversation_id)
|
||||
}
|
||||
})
|
||||
this.statusesPerUser.delete(userId)
|
||||
return removed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue