mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-09-13 20:29:56 +00:00
feat: allow to use 0 as auto refresh interval with special meaning (#148)
This commit is contained in:
@ -74,10 +74,11 @@ class IndexView(BaseView):
|
||||
autorefresh_intervals = [
|
||||
{
|
||||
"interval": interval * 1000, # milliseconds
|
||||
"is_active": index == 0,
|
||||
"is_active": index == 0, # first element is always default
|
||||
"text": pretty_interval(interval),
|
||||
}
|
||||
for index, interval in enumerate(self.configuration.getintlist("web", "autorefresh_intervals", fallback=[]))
|
||||
if interval > 0 # special case if 0 exists and first, refresh will not be turned on by default
|
||||
]
|
||||
|
||||
return {
|
||||
|
Reference in New Issue
Block a user