don't read multiple times etc
parent
80466f3150
commit
65236df78a
|
@ -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():
|
||||
|
|
|
@ -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;">
|
||||
|
|
Loading…
Reference in New Issue