don't read multiple times etc

pull/31/head
justcool393 2022-11-29 16:09:44 -06:00
parent 80466f3150
commit 65236df78a
2 changed files with 5 additions and 5 deletions

View File

@ -45,11 +45,11 @@ def calc_users(v):
g.loggedout_counter = len(loggedout)
return ''
def calc_chat_users():
if g.is_api_or_xhr:
def calc_chat_users(v:Optional[User]):
if v and g.is_api_or_xhr:
g.loggedin_chat = 0
else:
g.loggedin_chat = cache.get(CHAT_ONLINE_CACHE_KEY, 0)
elif not hasattr(g, 'loggedin_chat'):
g.loggedin_chat = cache.get(CHAT_ONLINE_CACHE_KEY) or 0
return ''
def get_logged_in_user():

View File

@ -1,4 +1,4 @@
{{calc_chat_users()}}
{{calc_chat_users(v)}}
<div class="container d-inline-flex d-lg-none">
<div class="row fixed-bottom bg-white border-top p-2" id="mobile-bottom-navigation-bar"
style="z-index: 1000; bottom: 0px; transition: bottom cubic-bezier(0, 0, 0.2, 1) 220ms;">