Resolve a race condition?
This commit is contained in:
parent
bc7962b906
commit
aa6b181563
@ -18662,6 +18662,13 @@
|
||||
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 (g.VIEW === 'thread') {
|
||||
ThreadUpdater.update();
|
||||
|
||||
@ -18696,6 +18696,13 @@
|
||||
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 (g.VIEW === 'thread') {
|
||||
ThreadUpdater.update();
|
||||
|
||||
@ -101,12 +101,15 @@ Index =
|
||||
@selectMode = $ '#index-mode', @navLinks
|
||||
@selectSort = $ '#index-sort', @navLinks
|
||||
@selectSize = $ '#index-size', @navLinks
|
||||
|
||||
$.on @searchInput, 'input', @onSearchInput
|
||||
$.on $('#index-search-clear', @navLinks), 'click', @clearSearch
|
||||
$.on $('#hidden-toggle a', @navLinks), 'click', @cb.toggleHiddenThreads
|
||||
|
||||
for select in [@selectMode, @selectSort, @selectSize]
|
||||
select.value = Conf[select.name]
|
||||
$.on select, 'change', $.cb.value
|
||||
|
||||
$.on @selectMode, 'change', @cb.mode
|
||||
$.on @selectSort, 'change', @cb.sort
|
||||
$.on @selectSize, 'change', @cb.size
|
||||
|
||||
@ -206,6 +206,13 @@ Navigate =
|
||||
Navigate.setMode @ unless e.button is 2 # Right Click
|
||||
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 g.VIEW is 'thread'
|
||||
ThreadUpdater.update()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user