Commit 6b48bfd9 authored by Tijmen de Mes's avatar Tijmen de Mes

Added support for encryption icon in chat messages

parent 30ba24fb
......@@ -645,6 +645,7 @@ class ChatWidget(base_class, ui_class):
checkmark_icon = IconDescriptor(Resources.get('icons/checkmark.svg'))
warning_icon = IconDescriptor(Resources.get('icons/warning.svg'))
done_all_icon = IconDescriptor(Resources.get('icons/done-all.svg'))
encrypted_icon = IconDescriptor(Resources.get('icons/lock-grey-12.svg'))
chat_template = open(Resources.get('chat/template.html')).read()
loading_template = open(Resources.get('chat/loading.html')).read()
......@@ -707,6 +708,11 @@ class ChatWidget(base_class, ui_class):
insertion_point = self.chat_element.findFirst(f'span#status-{id}')
insertion_point.replace(ChatMessageStatus(status, icon.filename, id).to_html(self.style))
def update_message_encryption(self, id, is_secure=False):
if is_secure is True:
insertion_point = self.chat_element.findFirst(f'span#encryption-{id}')
insertion_point.appendInside(f'<img src={self.encrypted_icon.filename} class="status-icon is-secure">')
def show_loading_screen(self, visible):
if visible:
self.loading_element.appendInside(self.loading_template)
......
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