Reduce unnecessary storage writes.

This commit is contained in:
ccd0 2015-02-14 14:05:14 -08:00
parent d9c464b4c4
commit 5ad84a700e
2 changed files with 5 additions and 4 deletions

View File

@ -321,9 +321,10 @@ Index =
state
saveMode: (mode) ->
Conf['Index Mode'] = mode
$.set 'Index Mode', mode
unless mode is 'catalog'
unless Conf['Index Mode'] is mode
Conf['Index Mode'] = mode
$.set 'Index Mode', mode
unless mode is 'catalog' or Conf['Previous Index Mode'] is mode
Conf['Previous Index Mode'] = mode
$.set 'Previous Index Mode', mode

View File

@ -79,7 +79,7 @@ class DataBoard
for boardID of @data.boards
for threadID of @data.boards[boardID]
@ajaxClean boardID, threadID
@save()
return
ajaxClean: (boardID, threadID) ->
$.ajax "//a.4cdn.org/#{boardID}/thread/#{threadID}.json",