Refresh tab when information element is added or removed
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
e2981f3377
commit
2508eea8e6
3 changed files with 6 additions and 0 deletions
|
@ -89,6 +89,7 @@ class ConversationTab(OneToOneTab):
|
|||
raise NotImplementedError
|
||||
|
||||
@staticmethod
|
||||
@refresh_wrapper.always
|
||||
def add_information_element(plugin_name, callback):
|
||||
"""
|
||||
Lets a plugin add its own information to the ConversationInfoWin
|
||||
|
@ -96,6 +97,7 @@ class ConversationTab(OneToOneTab):
|
|||
ConversationTab.additional_information[plugin_name] = callback
|
||||
|
||||
@staticmethod
|
||||
@refresh_wrapper.always
|
||||
def remove_information_element(plugin_name):
|
||||
del ConversationTab.additional_information[plugin_name]
|
||||
|
||||
|
|
|
@ -109,6 +109,7 @@ class MucTab(ChatTab):
|
|||
return None
|
||||
|
||||
@staticmethod
|
||||
@refresh_wrapper.always
|
||||
def add_information_element(plugin_name: str, callback: Callable[[str], str]) -> None:
|
||||
"""
|
||||
Lets a plugin add its own information to the MucInfoWin
|
||||
|
@ -116,6 +117,7 @@ class MucTab(ChatTab):
|
|||
MucTab.additional_information[plugin_name] = callback
|
||||
|
||||
@staticmethod
|
||||
@refresh_wrapper.always
|
||||
def remove_information_element(plugin_name: str) -> None:
|
||||
"""
|
||||
Lets a plugin add its own information to the MucInfoWin
|
||||
|
|
|
@ -94,6 +94,7 @@ class PrivateTab(OneToOneTab):
|
|||
super().ack_message(msg_id, msg_jid)
|
||||
|
||||
@staticmethod
|
||||
@refresh_wrapper.always
|
||||
def add_information_element(plugin_name, callback):
|
||||
"""
|
||||
Lets a plugin add its own information to the PrivateInfoWin
|
||||
|
@ -101,6 +102,7 @@ class PrivateTab(OneToOneTab):
|
|||
PrivateTab.additional_information[plugin_name] = callback
|
||||
|
||||
@staticmethod
|
||||
@refresh_wrapper.always
|
||||
def remove_information_element(plugin_name):
|
||||
del PrivateTab.additional_information[plugin_name]
|
||||
|
||||
|
|
Loading…
Reference in a new issue