Fixed QR output path on Darwin. Set message load to 5 instead of 2.

This commit is contained in:
Mark Qvist 2022-11-24 21:09:33 +01:00
parent 77c519f19c
commit 34525544ee

View File

@ -62,7 +62,7 @@ class Messages():
self.update() self.update()
def load_more(self, dt): def load_more(self, dt):
for new_message in self.app.sideband.list_messages(self.context_dest, before=self.earliest_message_timestamp,limit=2): for new_message in self.app.sideband.list_messages(self.context_dest, before=self.earliest_message_timestamp,limit=5):
self.new_messages.append(new_message) self.new_messages.append(new_message)
if len(self.new_messages) > 0: if len(self.new_messages) > 0:
@ -271,7 +271,11 @@ class Messages():
qr_image = lxm.as_qr() qr_image = lxm.as_qr()
hash_str = RNS.hexrep(lxm.hash[-2:], delimit=False) hash_str = RNS.hexrep(lxm.hash[-2:], delimit=False)
filename = "Paper_Message_"+time.strftime(file_ts_format, time.localtime(m["sent"]))+"_"+hash_str+".png" filename = "Paper_Message_"+time.strftime(file_ts_format, time.localtime(m["sent"]))+"_"+hash_str+".png"
if RNS.vendor.platformutils.is_darwin():
save_path = str(plyer.storagepath.get_downloads_dir()+filename).replace("file://", "")
else:
save_path = plyer.storagepath.get_downloads_dir()+"/"+filename save_path = plyer.storagepath.get_downloads_dir()+"/"+filename
qr_image.save(save_path) qr_image.save(save_path)
item.dmenu.dismiss() item.dmenu.dismiss()