Skip to content
This repository has been archived by the owner on Apr 22, 2022. It is now read-only.

Commit

Permalink
Provide option to disable auto-reload on fail
Browse files Browse the repository at this point in the history
Fixes #2633
  • Loading branch information
fvulich committed Mar 24, 2020
1 parent bec9bae commit 10f5775
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/ux/WebView.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ Ext.define('Rambox.ux.WebView',{
// On search text
webview.addEventListener('did-fail-load', function(e) {
console.info('The service fail at loading', me.src, e);

if ( me.record.get('disableAutoReloadOnFail') || !e.isMainFrame ) return
me.errorCodeLog.push(e.errorCode)

var attempt = me.errorCodeLog.filter(function(code) { return code === e.errorCode });
Expand Down
9 changes: 9 additions & 0 deletions app/view/add/Add.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,15 @@ Ext.define('Rambox.view.add.Add',{
,uncheckedValue: false
,inputValue: true
}
,{
xtype: 'checkbox'
,boxLabel: 'Disable auto-reload on fail'
,name: 'disableAutoReloadOnFail'
,hidden: false
,checked: me.edit ? me.record.get('disableAutoReloadOnFail') : false
,uncheckedValue: false
,inputValue: true
}
,{
xtype: 'checkbox'
,boxLabel: locale['app.window[19]']
Expand Down
1 change: 1 addition & 0 deletions app/view/add/AddController.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Ext.define('Rambox.view.add.AddController', {
,includeInGlobalUnreadCounter: formValues.includeInGlobalUnreadCounter
,trust: formValues.trust
,js_unread: formValues.js_unread
,disableAutoReloadOnFail: formValues.disableAutoReloadOnFail
});

var view = Ext.getCmp('tab_'+win.record.get('id'));
Expand Down

0 comments on commit 10f5775

Please sign in to comment.