Fix subscribing sign-in/out
This commit is contained in:
parent
4f356f7f9a
commit
2b3571e892
|
@ -51,25 +51,26 @@ class ConversationControl(BasePage):
|
||||||
# )
|
# )
|
||||||
|
|
||||||
def on_subscribe_public_events(self):
|
def on_subscribe_public_events(self):
|
||||||
self._app.subscribe_event(
|
if self._app.f_user_management:
|
||||||
name="onSignIn",
|
self._app.subscribe_event(
|
||||||
definition={
|
name="onSignIn",
|
||||||
"fn": self.reload_conv,
|
definition={
|
||||||
"inputs": [self._app.user_id],
|
"fn": self.reload_conv,
|
||||||
"outputs": [self.conversation],
|
"inputs": [self._app.user_id],
|
||||||
"show_progress": "hidden",
|
"outputs": [self.conversation],
|
||||||
},
|
"show_progress": "hidden",
|
||||||
)
|
},
|
||||||
|
)
|
||||||
|
|
||||||
self._app.subscribe_event(
|
self._app.subscribe_event(
|
||||||
name="onSignOut",
|
name="onSignOut",
|
||||||
definition={
|
definition={
|
||||||
"fn": self.reload_conv,
|
"fn": self.reload_conv,
|
||||||
"inputs": [self._app.user_id],
|
"inputs": [self._app.user_id],
|
||||||
"outputs": [self.conversation],
|
"outputs": [self.conversation],
|
||||||
"show_progress": "hidden",
|
"show_progress": "hidden",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
def on_register_events(self):
|
def on_register_events(self):
|
||||||
self.conversation_new_btn.click(
|
self.conversation_new_btn.click(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user