Skip to content

Commit

Permalink
fix loading info multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriiNazarenkoTine committed Apr 7, 2024
1 parent 546784a commit 763d594
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SPK_NAME = rr-manager
SPK_VERS = 2.0
SPK_REV = 17
SPK_REV = 18
SPK_ICON = src/rr-manager.png

DSM_UI_DIR = app
Expand All @@ -18,8 +18,6 @@ DISPLAY_NAME = RR Manager

HOMEPAGE = https://github.com/T-REX-XP/RRManager

ADMIN_URL = /rr-manager/

CONF_DIR = src/conf
SYSTEM_GROUP = http

Expand Down
7 changes: 7 additions & 0 deletions src/app/rr-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ Ext.define("SYNOCOMMUNITY.RRManager.Overview.Main", {
},
onActivate: function () {
const self = this;
if (this.loaded) return;
self.appWin.setStatusBusy(null, null, 50);
self.runScheduledTask('MountLoaderDisk');
(async () => {
Expand Down Expand Up @@ -478,6 +479,7 @@ Ext.define("SYNOCOMMUNITY.RRManager.Overview.Main", {
}

self.panels.healthPanel.fireEvent("data_ready");
self.loaded = true;
}
})();
self.__checkDownloadFolder(self.__checkRequiredTasks.bind(self));
Expand Down Expand Up @@ -1819,6 +1821,7 @@ Ext.define("SYNOCOMMUNITY.RRManager.Addons.Main", {
i.searchField.searchPanel.hide();
},
onActive: function () {
if(this.loaded) return;
this.loadData();
},
enableButtonCheck: function () {
Expand All @@ -1831,6 +1834,7 @@ Ext.define("SYNOCOMMUNITY.RRManager.Addons.Main", {
const t = { offset: 0, limit: this.itemsPerPage };
e.load({ params: t });
this.enableButtonCheck();
this.loaded = true;
},
loadException: function () {
this.appWin.clearStatusBusy(), this.setMask(!0);
Expand Down Expand Up @@ -2604,6 +2608,8 @@ Ext.define("SYNOCOMMUNITY.RRManager.Debug.GeneralTab", {
this.mon(this, "activate", this.onActivate, this)
},
onActivate: function () {
self = this;
if (self.loaded) return;
this.getConf().then((e) => {
var config = e.result;
var cmdLineFieldSet = Ext.getCmp('cmdLine');
Expand Down Expand Up @@ -2643,6 +2649,7 @@ Ext.define("SYNOCOMMUNITY.RRManager.Debug.GeneralTab", {

var debugGeneral = Ext.getCmp('debugGeneral');
debugGeneral.doLayout();
self.loaded = true;
});
},
loadForm: function (e) {
Expand Down

0 comments on commit 763d594

Please sign in to comment.