Use a static array instead of a stray variable for DataBoard keys.
This commit is contained in:
parent
772e82aa60
commit
a972183286
@ -1,6 +1,6 @@
|
|||||||
DataBoards = ['hiddenThreads', 'hiddenPosts', 'lastReadPosts', 'yourPosts', 'watchedThreads']
|
|
||||||
|
|
||||||
class DataBoard
|
class DataBoard
|
||||||
|
@keys = ['hiddenThreads', 'hiddenPosts', 'lastReadPosts', 'yourPosts', 'watchedThreads']
|
||||||
|
|
||||||
constructor: (@key, sync, dontClean) ->
|
constructor: (@key, sync, dontClean) ->
|
||||||
@data = Conf[key]
|
@data = Conf[key]
|
||||||
$.sync key, @onSync
|
$.sync key, @onSync
|
||||||
|
|||||||
@ -26,7 +26,7 @@ Main =
|
|||||||
Conf[parent] = obj
|
Conf[parent] = obj
|
||||||
return
|
return
|
||||||
flatten null, Config
|
flatten null, Config
|
||||||
for db in DataBoards
|
for db in DataBoard.keys
|
||||||
Conf[db] = boards: {}
|
Conf[db] = boards: {}
|
||||||
Conf['selectedArchives'] = {}
|
Conf['selectedArchives'] = {}
|
||||||
Conf['archives'] = Redirect.archives
|
Conf['archives'] = Redirect.archives
|
||||||
|
|||||||
@ -169,7 +169,7 @@ Settings =
|
|||||||
data =
|
data =
|
||||||
version: g.VERSION
|
version: g.VERSION
|
||||||
date: now
|
date: now
|
||||||
for db in DataBoards
|
for db in DataBoard.keys
|
||||||
Conf[db] = boards: {}
|
Conf[db] = boards: {}
|
||||||
# Make sure to export the most recent data.
|
# Make sure to export the most recent data.
|
||||||
$.get Conf, (Conf) ->
|
$.get Conf, (Conf) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user