Added identity hash display to preferences screen

This commit is contained in:
Mark Qvist 2022-10-25 16:23:47 +02:00
parent 2c0d249eaf
commit 7da53ad6a7
2 changed files with 26 additions and 9 deletions

View File

@ -958,6 +958,7 @@ class SidebandApp(MDApp):
self.sideband.save_configuration()
self.root.ids.settings_lxmf_address.text = RNS.hexrep(self.sideband.lxmf_destination.hash, delimit=False)
self.root.ids.settings_identity_hash.text = RNS.hexrep(self.sideband.lxmf_destination.identity.hash, delimit=False)
self.root.ids.settings_display_name.text = self.sideband.config["display_name"]
self.root.ids.settings_display_name.bind(on_text_validate=save_disp_name)
@ -972,7 +973,7 @@ class SidebandApp(MDApp):
self.root.ids.settings_propagation_node_address.bind(on_text_validate=save_prop_addr)
self.root.ids.settings_propagation_node_address.bind(focus=save_prop_addr)
if android_api_version >= 26:
if not RNS.vendor.platformutils.is_android() or android_api_version >= 26:
self.root.ids.settings_notifications_on.active = self.sideband.config["notifications_on"]
self.root.ids.settings_notifications_on.bind(active=save_notifications_on)
else:

View File

@ -983,14 +983,6 @@ MDNavigationLayout:
max_text_length: 128
font_size: dp(24)
MDTextField:
id: settings_lxmf_address
hint_text: "Your LXMF Address"
text: ""
disabled: False
max_text_length: 32
font_size: dp(24)
MDTextField:
id: settings_propagation_node_address
hint_text: "LXMF Propagation Node"
@ -1007,6 +999,30 @@ MDNavigationLayout:
max_text_length: 32
font_size: dp(24)
MDLabel:
text: ""
font_style: "H6"
MDLabel:
text: "Address & Identity"
font_style: "H6"
MDTextField:
id: settings_lxmf_address
hint_text: "Your LXMF Address"
text: ""
disabled: False
max_text_length: 32
font_size: dp(24)
MDTextField:
id: settings_identity_hash
hint_text: "Your Identity Hash"
text: ""
disabled: False
max_text_length: 32
font_size: dp(24)
MDBoxLayout:
orientation: "vertical"