Fixed UI message state progress not updating on direct message failure and retry as propagated
This commit is contained in:
parent
30c474bade
commit
61609de690
1 changed files with 7 additions and 4 deletions
|
|
@ -202,6 +202,10 @@ class SidebandCore():
|
||||||
self.default_config_template = rns_config
|
self.default_config_template = rns_config
|
||||||
|
|
||||||
if config_path == None:
|
if config_path == None:
|
||||||
|
# h_dir = plyer.storagepath.get_home_dir()
|
||||||
|
# if type(h_dir) == bytes: h_dir = h_dir.decode("utf-8")
|
||||||
|
# self.app_dir = os.path.join(h_dir, ".config", "sideband")
|
||||||
|
# if self.app_dir.startswith("file://"): self.app_dir = self.app_dir.replace("file://", "")
|
||||||
self.app_dir = os.path.join(plyer.storagepath.get_home_dir(), ".config", "sideband")
|
self.app_dir = os.path.join(plyer.storagepath.get_home_dir(), ".config", "sideband")
|
||||||
if self.app_dir.startswith("file://"): self.app_dir = self.app_dir.replace("file://", "")
|
if self.app_dir.startswith("file://"): self.app_dir = self.app_dir.replace("file://", "")
|
||||||
else:
|
else:
|
||||||
|
|
@ -4433,17 +4437,16 @@ class SidebandCore():
|
||||||
if message.state == LXMF.LXMessage.FAILED and hasattr(message, "try_propagation_on_fail") and message.try_propagation_on_fail:
|
if message.state == LXMF.LXMessage.FAILED and hasattr(message, "try_propagation_on_fail") and message.try_propagation_on_fail:
|
||||||
if hasattr(message, "stamp_generation_failed") and message.stamp_generation_failed == True:
|
if hasattr(message, "stamp_generation_failed") and message.stamp_generation_failed == True:
|
||||||
RNS.log(f"Could not send {message} due to a stamp generation failure", RNS.LOG_ERROR)
|
RNS.log(f"Could not send {message} due to a stamp generation failure", RNS.LOG_ERROR)
|
||||||
if not no_display:
|
if not no_display: self.lxm_ingest(message, originator=True)
|
||||||
self.lxm_ingest(message, originator=True)
|
|
||||||
else:
|
else:
|
||||||
RNS.log("Direct delivery of "+str(message)+" failed. Retrying as propagated message.", RNS.LOG_VERBOSE)
|
RNS.log("Direct delivery of "+str(message)+" failed. Retrying as propagated message.", RNS.LOG_VERBOSE)
|
||||||
message.try_propagation_on_fail = None
|
message.try_propagation_on_fail = None
|
||||||
message.delivery_attempts = 0
|
message.delivery_attempts = 0
|
||||||
if hasattr(message, "next_delivery_attempt"):
|
if hasattr(message, "next_delivery_attempt"): del message.next_delivery_attempt
|
||||||
del message.next_delivery_attempt
|
|
||||||
message.packed = None
|
message.packed = None
|
||||||
message.desired_method = LXMF.LXMessage.PROPAGATED
|
message.desired_method = LXMF.LXMessage.PROPAGATED
|
||||||
self._db_message_set_method(message.hash, LXMF.LXMessage.PROPAGATED)
|
self._db_message_set_method(message.hash, LXMF.LXMessage.PROPAGATED)
|
||||||
|
self._db_message_set_state(message.hash, LXMF.LXMessage.OUTBOUND)
|
||||||
self.message_router.handle_outbound(message)
|
self.message_router.handle_outbound(message)
|
||||||
else:
|
else:
|
||||||
if not no_display:
|
if not no_display:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue