Added sorting by trusted status

This commit is contained in:
Mark Qvist 2023-10-20 03:02:14 +02:00
parent 01f5d33be4
commit eaa4315857

View File

@ -281,6 +281,8 @@ class Conversations():
item.add_widget(item.iconr)
item.trusted = self.app.sideband.is_trusted(context_dest)
self.added_item_dests.append(context_dest)
self.list.add_widget(item)
@ -296,7 +298,7 @@ class Conversations():
if w.text != disp_name:
w.text = disp_name
self.list.children.sort(key=lambda w: w.last_activity)
self.list.children.sort(key=lambda w: (w.trusted, w.last_activity))
RNS.log("Updated conversation list widgets in "+RNS.prettytime(time.time()-us), RNS.LOG_DEBUG)