diff cagou/plugins/plugin_wid_chat.kv @ 458:1dd6db69406a

core: update avatar handling following backend changes: new avatar data format is handled. When ContactItem is created, avatar and nicknames are requested to backend if they are not already in cache.
author Goffi <goffi@goffi.org>
date Tue, 14 Apr 2020 21:14:44 +0200
parents 6c21a5a44b54
children 3c9ba4a694ef
line wrap: on
line diff
--- a/cagou/plugins/plugin_wid_chat.kv	Wed Apr 01 23:59:00 2020 +0200
+++ b/cagou/plugins/plugin_wid_chat.kv	Tue Apr 14 21:14:44 2020 +0200
@@ -113,7 +113,7 @@
         size_hint: None, 1
         MessAvatar:
             id: avatar
-            source: (root.mess_data.avatar or '') if root.mess_data else ''
+            source: root.mess_data.avatar['path'] if root.mess_data and root.mess_data.avatar else app.default_avatar
             on_press: root.chat.addNick(root.nick)
         Widget:
             # use to push the avatar on the top