mirror of
https://github.com/markqvist/Sideband.git
synced 2025-11-29 11:46:51 -05:00
Various UI improvements
This commit is contained in:
parent
2eec1d0a50
commit
9a11bfded2
4 changed files with 20 additions and 20 deletions
|
|
@ -1787,7 +1787,7 @@ class SidebandApp(MDApp):
|
|||
def conversation_index_action(self, index):
|
||||
if self.conversations_view != None and self.conversations_view.list != None:
|
||||
i = index-1
|
||||
c = self.conversations_view.list.children
|
||||
c = self.conversations_view.list.children[0].children
|
||||
if len(c) > i:
|
||||
item = c[(len(c)-1)-i]
|
||||
self.conversation_action(item)
|
||||
|
|
@ -5466,6 +5466,10 @@ class SidebandApp(MDApp):
|
|||
perm_ok = True
|
||||
path = self.sideband.config["command_plugins_path"]
|
||||
|
||||
if not os.path.isdir(path):
|
||||
if not RNS.vendor.platformutils.is_android(): path = os.path.expanduser("~")
|
||||
else: path = primary_external_storage_path()
|
||||
|
||||
if perm_ok and path != None:
|
||||
try:
|
||||
self.file_manager = MDFileManager(
|
||||
|
|
|
|||
|
|
@ -5472,11 +5472,17 @@ class SidebandCore():
|
|||
elif self.message_router.propagation_transfer_state == LXMF.LXMRouter.PR_FAILED:
|
||||
return "Sync failed"
|
||||
elif self.message_router.propagation_transfer_state == LXMF.LXMRouter.PR_COMPLETE:
|
||||
new_msgs = self.message_router.propagation_transfer_last_result
|
||||
msgs_dld = self.message_router.propagation_transfer_last_result
|
||||
duplicates = self.message_router.propagation_transfer_last_duplicates or 0
|
||||
new_msgs = msgs_dld-duplicates
|
||||
nms = "" if new_msgs == 1 else "s"
|
||||
dms = "" if duplicates == 1 else "s"
|
||||
if new_msgs == 0:
|
||||
return "Done, no new messages"
|
||||
if duplicates == 0: return f"Done, no new messages"
|
||||
else: return f"Done, no new messages\nDiscarded {duplicates} existing message{dms}"
|
||||
else:
|
||||
return "Downloaded "+str(new_msgs)+" messages"
|
||||
if duplicates == 0: return f"Downloaded {new_msgs} new message{nms}"
|
||||
else: return f"Downloaded {new_msgs} new message{nms}\nDiscarded {duplicates} existing message{dms}"
|
||||
else:
|
||||
return "Unknown"
|
||||
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ class Conversations():
|
|||
self.app = app
|
||||
self.context_dests = []
|
||||
self.added_item_dests = []
|
||||
# self.list = None
|
||||
self.list = None
|
||||
self.conversation_list = None
|
||||
self.ids = None
|
||||
|
||||
|
|
@ -268,17 +268,6 @@ class Conversations():
|
|||
|
||||
self.update()
|
||||
|
||||
def reload(self):
|
||||
self.clear_list()
|
||||
self.update()
|
||||
|
||||
def clear_list(self):
|
||||
if self.list != None:
|
||||
self.list.clear_widgets()
|
||||
|
||||
self.context_dests = []
|
||||
self.added_item_dests = []
|
||||
|
||||
def update(self):
|
||||
self.context_dests = self.app.sideband.list_conversations(conversations=self.app.include_conversations, objects=self.app.include_objects)
|
||||
|
||||
|
|
@ -435,6 +424,7 @@ class Conversations():
|
|||
RNS.log("Updating conversation list widgets", RNS.LOG_DEBUG)
|
||||
if self.conversation_list == None:
|
||||
self.conversation_list = ConversationList()
|
||||
self.list = self.conversation_list
|
||||
self.ids.conversation_list_container.add_widget(self.conversation_list)
|
||||
|
||||
self.update_conversation_list()
|
||||
|
|
|
|||
|
|
@ -337,15 +337,15 @@ class Messages():
|
|||
if prg <= 0.00:
|
||||
stamp_cost = self.app.sideband.get_lxm_stamp_cost(msg["hash"])
|
||||
prop_cost = self.app.sideband.get_lxm_propagation_cost(msg["hash"])
|
||||
if stamp_cost:
|
||||
if stamp_cost and prop_cost:
|
||||
sphrase = f"Generating stamps with cost {stamp_cost} and {prop_cost}"
|
||||
prgstr = ""
|
||||
elif stamp_cost:
|
||||
sphrase = f"Generating stamp with cost {stamp_cost}"
|
||||
prgstr = ""
|
||||
elif prop_cost:
|
||||
sphrase = f"Generating propagation stamp with cost {prop_cost}"
|
||||
prgstr = ""
|
||||
elif stamp_cost and prop_cost:
|
||||
sphrase = f"Generating stamps with cost {stamp_cost} and {prop_cost}"
|
||||
prgstr = ""
|
||||
else:
|
||||
sphrase = "Waiting for path"
|
||||
elif prg <= 0.01:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue