Remove loading animation in push notification service

This commit is contained in:
lxsang 2021-03-22 19:15:37 +01:00
parent d384a65b73
commit 738eb1f831
2 changed files with 1 additions and 35 deletions

View File

@ -28,7 +28,6 @@ namespace OS {
* @extends {BaseService}
*/
export class PushNotification extends BaseService {
private pending: number[];
private cb: (e: JQuery.ClickEvent) => void;
private view: boolean;
private mlist: TAG.ListViewTag;
@ -48,7 +47,6 @@ namespace OS {
super("PushNotification", args);
this.iconclass = "fa fa-bars";
this.cb = undefined;
this.pending = [];
this.logs = [];
this.logmon = undefined;
}
@ -64,23 +62,6 @@ namespace OS {
return this._gui.htmlToScheme(scheme, this, this.host);
}
/**
*
*
* @private
* @param {boolean} b
* @memberof PushNotification
*/
private spin(b: boolean): void {
if (b && this.iconclass === "fa fa-bars") {
this.iconclass = "fa fa-spinner fa-spin";
this.update();
} else if (!b && this.iconclass === "fa fa-spinner fa-spin") {
this.iconclass = "fa fa-bars";
this.update();
}
}
/**
*
*
@ -100,21 +81,6 @@ namespace OS {
this.subscribe("error", (o) => this.pushout("ERROR", o));
this.subscribe("info", (o) => this.pushout("INFO", o));
this.subscribe("loading", (o) => {
this.pending.push(o.id);
return this.spin(true);
});
this.subscribe("loaded", (o) => {
const i = this.pending.indexOf(o.id);
if (i >= 0) {
this.pending.splice(i, 1);
}
if (this.pending.length === 0) {
return this.spin(false);
}
});
this.nzone.height = "100%";
this.fzone.height = "100%";

View File

@ -13,7 +13,7 @@
"credit": "dedicated to some one here",
"licences": "GPLv3"
},
"version": "0.0.1-a",
"version": "0.1.1-a",
"category": "System",
"iconclass": "fa fa-bug",
"mimes": []