fix: testing fixes
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -296,9 +296,10 @@ export const useCollectionsStore = defineStore('mailCollectionsStore', () => {
|
||||
properties: properties.toJson()
|
||||
})
|
||||
|
||||
// Merge created collection into state
|
||||
_collections.value[response.identifier] = response
|
||||
indexCollection(response)
|
||||
if (response instanceof CollectionObject) {
|
||||
_collections.value[response.identifier] = response
|
||||
indexCollection(response)
|
||||
}
|
||||
|
||||
console.debug('[Mail Manager][Store] - Successfully created collection:', response.identifier)
|
||||
return response
|
||||
@@ -326,12 +327,14 @@ export const useCollectionsStore = defineStore('mailCollectionsStore', () => {
|
||||
properties: properties.toJson()
|
||||
})
|
||||
|
||||
if (_collections.value[response.identifier]) {
|
||||
deindexCollection(_collections.value[response.identifier])
|
||||
if (_collections.value[target]) {
|
||||
deindexCollection(_collections.value[target])
|
||||
}
|
||||
|
||||
_collections.value[response.identifier] = response
|
||||
indexCollection(response)
|
||||
if (response instanceof CollectionObject) {
|
||||
_collections.value[response.identifier] = response
|
||||
indexCollection(response)
|
||||
}
|
||||
|
||||
console.debug('[Mail Manager][Store] - Successfully updated collection:', response.identifier)
|
||||
return response
|
||||
|
||||
Reference in New Issue
Block a user