Resolve a race condition?
This commit is contained in:
parent
bc7962b906
commit
aa6b181563
@ -18662,6 +18662,13 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (Navigate.isNavigating) {
|
||||||
|
return e != null ? e.preventDefault() : void 0;
|
||||||
|
}
|
||||||
|
Navigate.isNavigating = true;
|
||||||
|
setTimeout((function() {
|
||||||
|
return delete Navigate.isNavigating;
|
||||||
|
}), 100);
|
||||||
if (this.pathname === Navigate.path) {
|
if (this.pathname === Navigate.path) {
|
||||||
if (g.VIEW === 'thread') {
|
if (g.VIEW === 'thread') {
|
||||||
ThreadUpdater.update();
|
ThreadUpdater.update();
|
||||||
|
|||||||
@ -18696,6 +18696,13 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (Navigate.isNavigating) {
|
||||||
|
return e != null ? e.preventDefault() : void 0;
|
||||||
|
}
|
||||||
|
Navigate.isNavigating = true;
|
||||||
|
setTimeout((function() {
|
||||||
|
return delete Navigate.isNavigating;
|
||||||
|
}), 100);
|
||||||
if (this.pathname === Navigate.path) {
|
if (this.pathname === Navigate.path) {
|
||||||
if (g.VIEW === 'thread') {
|
if (g.VIEW === 'thread') {
|
||||||
ThreadUpdater.update();
|
ThreadUpdater.update();
|
||||||
|
|||||||
@ -101,12 +101,15 @@ Index =
|
|||||||
@selectMode = $ '#index-mode', @navLinks
|
@selectMode = $ '#index-mode', @navLinks
|
||||||
@selectSort = $ '#index-sort', @navLinks
|
@selectSort = $ '#index-sort', @navLinks
|
||||||
@selectSize = $ '#index-size', @navLinks
|
@selectSize = $ '#index-size', @navLinks
|
||||||
|
|
||||||
$.on @searchInput, 'input', @onSearchInput
|
$.on @searchInput, 'input', @onSearchInput
|
||||||
$.on $('#index-search-clear', @navLinks), 'click', @clearSearch
|
$.on $('#index-search-clear', @navLinks), 'click', @clearSearch
|
||||||
$.on $('#hidden-toggle a', @navLinks), 'click', @cb.toggleHiddenThreads
|
$.on $('#hidden-toggle a', @navLinks), 'click', @cb.toggleHiddenThreads
|
||||||
|
|
||||||
for select in [@selectMode, @selectSort, @selectSize]
|
for select in [@selectMode, @selectSort, @selectSize]
|
||||||
select.value = Conf[select.name]
|
select.value = Conf[select.name]
|
||||||
$.on select, 'change', $.cb.value
|
$.on select, 'change', $.cb.value
|
||||||
|
|
||||||
$.on @selectMode, 'change', @cb.mode
|
$.on @selectMode, 'change', @cb.mode
|
||||||
$.on @selectSort, 'change', @cb.sort
|
$.on @selectSort, 'change', @cb.sort
|
||||||
$.on @selectSize, 'change', @cb.size
|
$.on @selectSize, 'change', @cb.size
|
||||||
|
|||||||
@ -206,6 +206,13 @@ Navigate =
|
|||||||
Navigate.setMode @ unless e.button is 2 # Right Click
|
Navigate.setMode @ unless e.button is 2 # Right Click
|
||||||
return
|
return
|
||||||
|
|
||||||
|
return e?.preventDefault() if Navigate.isNavigating
|
||||||
|
|
||||||
|
Navigate.isNavigating = true
|
||||||
|
|
||||||
|
# XXX Prevent accidental double-navigates race condition
|
||||||
|
setTimeout (-> delete Navigate.isNavigating), 100
|
||||||
|
|
||||||
if @pathname is Navigate.path
|
if @pathname is Navigate.path
|
||||||
if g.VIEW is 'thread'
|
if g.VIEW is 'thread'
|
||||||
ThreadUpdater.update()
|
ThreadUpdater.update()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user