recheck threads when quoted post not found in cached data
This commit is contained in:
parent
e8680a5925
commit
9cdac0c9f4
@ -117,6 +117,13 @@ Get =
|
|||||||
break if post.no is postID # we found it!
|
break if post.no is postID # we found it!
|
||||||
|
|
||||||
if post.no isnt postID
|
if post.no isnt postID
|
||||||
|
# Cached requests can be stale and must be rechecked.
|
||||||
|
if req.cached
|
||||||
|
api = "//a.4cdn.org/#{boardID}/thread/#{threadID}.json"
|
||||||
|
$.cleanCache (url) -> url is api
|
||||||
|
$.cache api, ->
|
||||||
|
Get.fetchedPost @, boardID, threadID, postID, root, context
|
||||||
|
return
|
||||||
# The post can be deleted by the time we check a quote.
|
# The post can be deleted by the time we check a quote.
|
||||||
unless Get.archivedPost boardID, postID, root, context
|
unless Get.archivedPost boardID, postID, root, context
|
||||||
$.addClass root, 'warning'
|
$.addClass root, 'warning'
|
||||||
|
|||||||
@ -89,6 +89,7 @@ do ->
|
|||||||
$.on req, 'load', (e) ->
|
$.on req, 'load', (e) ->
|
||||||
cb.call @, e for cb in @callbacks
|
cb.call @, e for cb in @callbacks
|
||||||
@evt = e
|
@evt = e
|
||||||
|
@cached = true
|
||||||
delete @callbacks
|
delete @callbacks
|
||||||
$.on req, 'abort error', rm
|
$.on req, 'abort error', rm
|
||||||
req.callbacks = [cb]
|
req.callbacks = [cb]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user