Refresh tab when information element is added or removed

Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <pep@bouah.net>
parent e2981f33
......@@ -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]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment