mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Add button to reset preferences
This commit is contained in:
parent
fdd71946da
commit
9fc512d88d
4 changed files with 27 additions and 6 deletions
|
|
@ -96,6 +96,12 @@ proc getPrefs*(id: string): Prefs =
|
|||
result = genDefaultPrefs()
|
||||
cache(result)
|
||||
|
||||
proc resetPrefs*(prefs: var Prefs) =
|
||||
var defPrefs = genDefaultPrefs()
|
||||
defPrefs.id = prefs.id
|
||||
cache(defPrefs)
|
||||
prefs = defPrefs
|
||||
|
||||
macro genUpdatePrefs*(): untyped =
|
||||
result = nnkStmtList.newTree()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue