mirror of
https://gitlab.com/bashrc2/epicyon
synced 2026-11-01 18:29:54 +00:00
Set a flag to clear the browser cache when the theme is changed
This commit is contained in:
1 parent
0b7d96f48c
commit
e03b2e0fd8
1 file changed
+10
@@ -619,6 +619,15 @@ def setNewsAvatar(baseDir: str, name: str,
|
||||
nickname + '@' + domain + '/avatar.png')
|
||||
|
||||
|
||||
def _setClearCacheFlag(baseDir: str) -> None:
|
||||
"""Sets a flag which can be used by an external system
|
||||
(eg. a script in a cron job) to clear the browser cache
|
||||
"""
|
||||
flagFilename = baseDir + '/accounts/.clear_cache'
|
||||
with open(flagFilename, 'w+') as flagFile:
|
||||
flagFile.write('\n')
|
||||
|
||||
|
||||
def setTheme(baseDir: str, name: str, domain: str,
|
||||
allowLocalNetworkAccess: bool) -> bool:
|
||||
"""Sets the theme with the given name as the current theme
|
||||
@@ -674,4 +683,5 @@ def setTheme(baseDir: str, name: str, domain: str,
|
||||
disableGrayscale(baseDir)
|
||||
|
||||
_setThemeInConfig(baseDir, name)
|
||||
_setClearCacheFlag(baseDir)
|
||||
return result
|
||||
Reference in new issue
Block a user