diff --git a/app.json b/app.json index d5c1c783..6daaaa85 100644 --- a/app.json +++ b/app.json @@ -248,7 +248,10 @@ * */ "output": { - "base": "${workspace.build.dir}/${build.environment}/${app.name}" + "base": "${workspace.build.dir}/${build.environment}/${app.name}", + "appCache": { + "enable": true + } }, /** @@ -259,7 +262,10 @@ * List of items in the CACHE MANIFEST section */ "cache": [ - "index.html" + "index.html", + "app.js", + "resources/Rambox-all.css", + "resources/Icon.png" ], /** * List of items in the NETWORK section diff --git a/app/Application.js b/app/Application.js index bd670c5c..9ba8e597 100644 --- a/app/Application.js +++ b/app/Application.js @@ -26,6 +26,9 @@ Ext.define('Rambox.Application', { Ext.cq1('app-main').setActiveTab(key - 48); } }); + + // Remove spinner after 3 secs + Ext.defer(function() { Ext.get('spinner').destroy(); }, 3000); } ,updateTotalNotifications: function( newValue, oldValue ) { diff --git a/app/store/Services.js b/app/store/Services.js index b7de20d8..4db0a0bb 100644 --- a/app/store/Services.js +++ b/app/store/Services.js @@ -21,7 +21,6 @@ Ext.define('Rambox.store.Services', { ,listeners: { load: function( store, records, successful ) { if ( Ext.isEmpty(records) ) { - Ext.get('spinner').destroy(); Ext.cq1('app-main').add({ tabConfig : { xtype : 'tbfill' } }); return; } diff --git a/app/ux/WebView.js b/app/ux/WebView.js index 7b0ec7be..04a2ea02 100644 --- a/app/ux/WebView.js +++ b/app/ux/WebView.js @@ -83,9 +83,6 @@ Ext.define('Rambox.ux.WebView',{ webview.addEventListener("did-finish-load", function(e) { Rambox.app.setTotalServicesLoaded( Rambox.app.getTotalServicesLoaded() + 1 ); - if ( Rambox.app.getTotalServicesLoaded() === Ext.getStore('Services').getCount() && Ext.get('spinner') !== null ) { - Ext.get('spinner').destroy(); - } }); // Open links in default browser