Fix thread watcher sometimes using a 304 response on re-added thread if 'Show Page' is on.
This commit is contained in:
parent
28093b2348
commit
6caca656dc
@ -316,8 +316,8 @@ ThreadWatcher =
|
|||||||
ThreadWatcher.update siteID, boardID, threadID, {isDead: true}
|
ThreadWatcher.update siteID, boardID, threadID, {isDead: true}
|
||||||
return
|
return
|
||||||
|
|
||||||
fetchStatus: (thread, force) ->
|
fetchStatus: (thread) ->
|
||||||
{siteID, boardID, threadID, data} = thread
|
{siteID, boardID, threadID, data, force} = thread
|
||||||
software = Conf['siteProperties'][siteID]?.software
|
software = Conf['siteProperties'][siteID]?.software
|
||||||
url = SW[software]?.urls.threadJSON?({siteID, boardID, threadID})
|
url = SW[software]?.urls.threadJSON?({siteID, boardID, threadID})
|
||||||
return unless url
|
return unless url
|
||||||
@ -546,11 +546,11 @@ ThreadWatcher =
|
|||||||
addRaw: (boardID, threadID, data) ->
|
addRaw: (boardID, threadID, data) ->
|
||||||
ThreadWatcher.db.set {boardID, threadID, val: data}
|
ThreadWatcher.db.set {boardID, threadID, val: data}
|
||||||
ThreadWatcher.refresh()
|
ThreadWatcher.refresh()
|
||||||
thread = {siteID: Site.hostname, boardID, threadID, data}
|
thread = {siteID: Site.hostname, boardID, threadID, data, force: true}
|
||||||
if Conf['Show Page'] and !data.isDead
|
if Conf['Show Page'] and !data.isDead
|
||||||
ThreadWatcher.fetchBoard [thread]
|
ThreadWatcher.fetchBoard [thread]
|
||||||
else if ThreadWatcher.unreadEnabled and Conf['Show Unread Count']
|
else if ThreadWatcher.unreadEnabled and Conf['Show Unread Count']
|
||||||
ThreadWatcher.fetchStatus thread, true
|
ThreadWatcher.fetchStatus thread
|
||||||
|
|
||||||
rm: (siteID, boardID, threadID) ->
|
rm: (siteID, boardID, threadID) ->
|
||||||
ThreadWatcher.db.delete {siteID, boardID, threadID}
|
ThreadWatcher.db.delete {siteID, boardID, threadID}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user