Preserve preference list order
This commit is contained in:
parent
c16ee3138c
commit
e76e068953
1 changed files with 4 additions and 4 deletions
|
@ -20,7 +20,7 @@ type
|
||||||
placeholder*: string
|
placeholder*: string
|
||||||
|
|
||||||
# TODO: write DSL to simplify this
|
# TODO: write DSL to simplify this
|
||||||
const prefList*: Table[string, seq[Pref]] = {
|
const prefList*: OrderedTable[string, seq[Pref]] = {
|
||||||
"Privacy": @[
|
"Privacy": @[
|
||||||
Pref(kind: input, name: "replaceTwitter",
|
Pref(kind: input, name: "replaceTwitter",
|
||||||
label: "Replace Twitter links with Nitter (blank to disable)",
|
label: "Replace Twitter links with Nitter (blank to disable)",
|
||||||
|
@ -33,8 +33,8 @@ const prefList*: Table[string, seq[Pref]] = {
|
||||||
|
|
||||||
"Media": @[
|
"Media": @[
|
||||||
Pref(kind: checkbox, name: "mp4Playback",
|
Pref(kind: checkbox, name: "mp4Playback",
|
||||||
label: "Enable mp4 video playback",
|
label: "Enable mp4 video playback",
|
||||||
defaultState: true),
|
defaultState: true),
|
||||||
|
|
||||||
Pref(kind: checkbox, name: "hlsPlayback",
|
Pref(kind: checkbox, name: "hlsPlayback",
|
||||||
label: "Enable hls video streaming (requires JavaScript)",
|
label: "Enable hls video streaming (requires JavaScript)",
|
||||||
|
@ -64,7 +64,7 @@ const prefList*: Table[string, seq[Pref]] = {
|
||||||
label: "Make profile sidebar stick to top",
|
label: "Make profile sidebar stick to top",
|
||||||
defaultState: true)
|
defaultState: true)
|
||||||
]
|
]
|
||||||
}.toTable
|
}.toOrderedTable
|
||||||
|
|
||||||
iterator allPrefs*(): Pref =
|
iterator allPrefs*(): Pref =
|
||||||
for k, v in prefList:
|
for k, v in prefList:
|
||||||
|
|
Loading…
Reference in a new issue