Fixed stamp generation status not being displayed in some cases
This commit is contained in:
parent
8a8d2a77c3
commit
046cbbc30c
|
@ -1,6 +1,6 @@
|
||||||
__debug_build__ = False
|
__debug_build__ = False
|
||||||
__disable_shaders__ = False
|
__disable_shaders__ = False
|
||||||
__version__ = "1.1.2"
|
__version__ = "1.1.3"
|
||||||
__variant__ = ""
|
__variant__ = ""
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
|
@ -1756,6 +1756,9 @@ class SidebandCore():
|
||||||
elif "get_lxm_progress" in call:
|
elif "get_lxm_progress" in call:
|
||||||
args = call["get_lxm_progress"]
|
args = call["get_lxm_progress"]
|
||||||
connection.send(self.get_lxm_progress(args["lxm_hash"]))
|
connection.send(self.get_lxm_progress(args["lxm_hash"]))
|
||||||
|
elif "get_lxm_stamp_cost" in call:
|
||||||
|
args = call["get_lxm_stamp_cost"]
|
||||||
|
connection.send(self.get_lxm_stamp_cost(args["lxm_hash"]))
|
||||||
else:
|
else:
|
||||||
connection.send(None)
|
connection.send(None)
|
||||||
|
|
||||||
|
@ -4030,7 +4033,32 @@ class SidebandCore():
|
||||||
RNS.log("An error occurred while getting message transfer progress: "+str(e), RNS.LOG_ERROR)
|
RNS.log("An error occurred while getting message transfer progress: "+str(e), RNS.LOG_ERROR)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def _service_get_lxm_stamp_cost(self, lxm_hash):
|
||||||
|
if not RNS.vendor.platformutils.is_android():
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
if self.is_client:
|
||||||
|
try:
|
||||||
|
return self.service_rpc_request({"get_lxm_stamp_cost": { "lxm_hash": lxm_hash } })
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
RNS.log("Error while sending message over RPC: "+str(e), RNS.LOG_DEBUG)
|
||||||
|
RNS.trace_exception(e)
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
def get_lxm_stamp_cost(self, lxm_hash):
|
def get_lxm_stamp_cost(self, lxm_hash):
|
||||||
|
if self.allow_service_dispatch and self.is_client:
|
||||||
|
try:
|
||||||
|
return self._service_get_lxm_stamp_cost(lxm_hash)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
RNS.log("Error while getting message transfer stamp cost: "+str(e), RNS.LOG_ERROR)
|
||||||
|
RNS.trace_exception(e)
|
||||||
|
return False
|
||||||
|
|
||||||
|
else:
|
||||||
try:
|
try:
|
||||||
return self.message_router.get_outbound_lxm_stamp_cost(lxm_hash)
|
return self.message_router.get_outbound_lxm_stamp_cost(lxm_hash)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Reference in New Issue