changeset 441:ff548846df91

chat: use `image-loading` as source by default: not specifying source was resulting in graphical glitches (notably when the image could not be downloaded correctly). Using `image-loading` as default avoids this, and indicates to the user that something is running in background.
author Goffi <goffi@goffi.org>
date Sat, 07 Mar 2020 00:05:50 +0100
parents 167c3e198f73
children c2b63d3bb088
files cagou/plugins/plugin_wid_chat.kv cagou/plugins/plugin_wid_chat.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/cagou/plugins/plugin_wid_chat.kv	Sat Mar 07 00:05:50 2020 +0100
+++ b/cagou/plugins/plugin_wid_chat.kv	Sat Mar 07 00:05:50 2020 +0100
@@ -155,7 +155,7 @@
             id: mess_xhtml
             size_hint: 1, None
             height: self.minimum_height
-            xhtml: root.message_xhtml or self.escape(root.message or u'')
+            xhtml: root.message_xhtml or self.escape(root.message or '')
             color: (0.74,0.74,0.24,1) if root.mess_type == "info" else (0, 0, 0, 1)
             padding: root.mess_padding
             bold: True if root.mess_type == "info" else False
--- a/cagou/plugins/plugin_wid_chat.py	Sat Mar 07 00:05:50 2020 +0100
+++ b/cagou/plugins/plugin_wid_chat.py	Sat Mar 07 00:05:50 2020 +0100
@@ -175,7 +175,7 @@
             if idx < 3 or len(attachments) <= 4:
                 if ((self.mess_data.own_mess
                      or self.chat.contact_list.isInRoster(self.mess_data.from_jid))):
-                    wid = AsyncImage(size_hint=(1, 1))
+                    wid = AsyncImage(size_hint=(1, 1), source="data/images/image-loading.gif")
                     if 'preview' in attachment:
                         wid.source = attachment["preview"]
                     elif 'path' in attachment: