refactor: standardize manager design
All checks were successful
Build Test / test (pull_request) Successful in 23s
JS Unit Tests / test (pull_request) Successful in 22s
PHP Unit Tests / test (pull_request) Successful in 1m5s

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-02-25 00:18:28 -05:00
parent 4a7fe7aeb4
commit 65435b526c
3 changed files with 10 additions and 32 deletions

View File

@@ -17,16 +17,7 @@ export class CollectionObject implements CollectionInterface {
signature: null,
created: null,
modified: null,
properties: {
'@type': 'mail.collection',
version: 1,
total: 0,
unread: 0,
label: '',
role: null,
rank: 0,
subscribed: true,
},
properties: new CollectionPropertiesObject(),
};
}
@@ -34,8 +25,6 @@ export class CollectionObject implements CollectionInterface {
this._data = data;
if (data.properties) {
this._data.properties = new CollectionPropertiesObject().fromJson(data.properties as CollectionPropertiesInterface);
} else {
this._data.properties = new CollectionPropertiesObject();
}
return this;
}
@@ -114,12 +103,12 @@ export class CollectionPropertiesObject implements CollectionPropertiesInterface
constructor() {
this._data = {
'@type': 'mail.collection',
'@type': 'mail:collection',
version: 1,
total: 0,
unread: 0,
label: '',
role: null,
label: '',
rank: 0,
subscribed: true,
};