Browse Source

Improved speed of the app

Fixes #23 . Seems like Electron is caching services (webview) by
default.
pull/92/merge
Ramiro Saenz 9 years ago
parent
commit
476b5a1039
  1. 10
      app.json
  2. 3
      app/Application.js
  3. 1
      app/store/Services.js
  4. 3
      app/ux/WebView.js

10
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

3
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 ) {

1
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;
}

3
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

Loading…
Cancel
Save