The refresh button behavior should be dependent on the view
This commit is contained in:
parent
b5f357bcfe
commit
55453f02e4
@ -2160,7 +2160,7 @@
|
|||||||
}
|
}
|
||||||
this.button = $.el('a', {
|
this.button = $.el('a', {
|
||||||
className: 'index-refresh-shortcut fa fa-refresh',
|
className: 'index-refresh-shortcut fa fa-refresh',
|
||||||
title: 'Refresh Index',
|
title: 'Refresh',
|
||||||
href: 'javascript:;',
|
href: 'javascript:;',
|
||||||
textContent: 'Refresh Index'
|
textContent: 'Refresh Index'
|
||||||
});
|
});
|
||||||
@ -2449,6 +2449,12 @@
|
|||||||
if (!navigator.onLine) {
|
if (!navigator.onLine) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (g.VIEW === 'thread') {
|
||||||
|
if (Conf['Thread Updater']) {
|
||||||
|
return ThreadUpdater.update();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!(d.readyState === 'loading' || Index.root.parentElement)) {
|
if (!(d.readyState === 'loading' || Index.root.parentElement)) {
|
||||||
$.replace($('.board'), Index.root);
|
$.replace($('.board'), Index.root);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2170,7 +2170,7 @@
|
|||||||
}
|
}
|
||||||
this.button = $.el('a', {
|
this.button = $.el('a', {
|
||||||
className: 'index-refresh-shortcut fa fa-refresh',
|
className: 'index-refresh-shortcut fa fa-refresh',
|
||||||
title: 'Refresh Index',
|
title: 'Refresh',
|
||||||
href: 'javascript:;',
|
href: 'javascript:;',
|
||||||
textContent: 'Refresh Index'
|
textContent: 'Refresh Index'
|
||||||
});
|
});
|
||||||
@ -2459,6 +2459,12 @@
|
|||||||
if (!navigator.onLine) {
|
if (!navigator.onLine) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (g.VIEW === 'thread') {
|
||||||
|
if (Conf['Thread Updater']) {
|
||||||
|
return ThreadUpdater.update();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!(d.readyState === 'loading' || Index.root.parentElement)) {
|
if (!(d.readyState === 'loading' || Index.root.parentElement)) {
|
||||||
$.replace($('.board'), Index.root);
|
$.replace($('.board'), Index.root);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@ Index =
|
|||||||
|
|
||||||
@button = $.el 'a',
|
@button = $.el 'a',
|
||||||
className: 'index-refresh-shortcut fa fa-refresh'
|
className: 'index-refresh-shortcut fa fa-refresh'
|
||||||
title: 'Refresh Index'
|
title: 'Refresh'
|
||||||
href: 'javascript:;'
|
href: 'javascript:;'
|
||||||
textContent: 'Refresh Index'
|
textContent: 'Refresh Index'
|
||||||
$.on @button, 'click', @update
|
$.on @button, 'click', @update
|
||||||
@ -203,6 +203,9 @@ Index =
|
|||||||
|
|
||||||
update: (pageNum) ->
|
update: (pageNum) ->
|
||||||
return unless navigator.onLine
|
return unless navigator.onLine
|
||||||
|
if g.VIEW is 'thread'
|
||||||
|
return ThreadUpdater.update() if Conf['Thread Updater']
|
||||||
|
return
|
||||||
unless d.readyState is 'loading' or Index.root.parentElement
|
unless d.readyState is 'loading' or Index.root.parentElement
|
||||||
$.replace $('.board'), Index.root
|
$.replace $('.board'), Index.root
|
||||||
Index.req?.abort()
|
Index.req?.abort()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user