feat: added following system using cookies
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
import tables
|
||||
import tables, strutils, sequtils
|
||||
import types, prefs_impl
|
||||
from config import get
|
||||
from parsecfg import nil
|
||||
@@ -13,6 +13,8 @@ proc updateDefaultPrefs*(cfg: parsecfg.Config) =
|
||||
|
||||
proc getPrefs*(cookies: Table[string, string]): Prefs =
|
||||
result = defaultPrefs
|
||||
if "nitter_following" in cookies:
|
||||
result.following = cookies["nitter_following"].split(',').filterIt(it.len > 0)
|
||||
genCookiePrefs(cookies)
|
||||
|
||||
template getPref*(cookies: Table[string, string], pref): untyped =
|
||||
|
||||
Reference in New Issue
Block a user