mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
When login don't reload the whole browser. Just rebuilt screens
This commit is contained in:
parent
d3500e2921
commit
e52addf346
16 changed files with 74 additions and 57 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { isArray, isFunction, addObservablesTo, addComputablesTo } from 'Common/Utils';
|
||||
import { isArray, isFunction, addObservablesTo, addComputablesTo, forEachObjectValue } from 'Common/Utils';
|
||||
|
||||
function dispose(disposable) {
|
||||
if (disposable && isFunction(disposable.dispose)) {
|
||||
|
|
@ -52,7 +52,7 @@ export class AbstractModel {
|
|||
this.subscribables.forEach(dispose);
|
||||
/** clear object entries */
|
||||
// Object.entries(this).forEach(([key, value]) => {
|
||||
Object.values(this).forEach(value => {
|
||||
forEachObjectValue(this, value => {
|
||||
/** clear CollectionModel */
|
||||
let arr = ko.isObservableArray(value) ? value() : value;
|
||||
arr && arr.onDestroy && value.onDestroy();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue