mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Replaced dev/Common/ClientStorageDriver/* with webstorage polyfill
Cleanup some other code
This commit is contained in:
parent
0e8bf13d5d
commit
b837013cfb
13 changed files with 201 additions and 594 deletions
|
|
@ -41,14 +41,14 @@ export function hideLoading() {
|
|||
*/
|
||||
export function createCommand(fExecute, fCanExecute = true) {
|
||||
let fResult = null;
|
||||
const fNonEmpty = (...args) => {
|
||||
if (fResult && fResult.canExecute && fResult.canExecute()) {
|
||||
fExecute.apply(null, args);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
fResult = fExecute ? fNonEmpty : ()=>{};
|
||||
fResult = fExecute
|
||||
? (...args) => {
|
||||
if (fResult && fResult.canExecute && fResult.canExecute()) {
|
||||
fExecute.apply(null, args);
|
||||
}
|
||||
return false;
|
||||
} : ()=>{};
|
||||
fResult.enabled = ko.observable(true);
|
||||
fResult.isCommand = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue