Fixed button race
This commit is contained in:
parent
8fee0bae58
commit
338f608382
|
@ -674,7 +674,13 @@ class SidebandCore():
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
def peer_appearance(self, context_dest):
|
def peer_appearance(self, context_dest):
|
||||||
return self._db_get_appearance(context_dest) or SidebandCore.DEFAULT_APPEARANCE
|
appearance = self._db_get_appearance(context_dest)
|
||||||
|
if appearance == None:
|
||||||
|
return SidebandCore.DEFAULT_APPEARANCE
|
||||||
|
for e in appearance:
|
||||||
|
if e == None:
|
||||||
|
return SidebandCore.DEFAULT_APPEARANCE
|
||||||
|
return appearance
|
||||||
|
|
||||||
def peer_display_name(self, context_dest):
|
def peer_display_name(self, context_dest):
|
||||||
if context_dest == self.lxmf_destination.hash:
|
if context_dest == self.lxmf_destination.hash:
|
||||||
|
|
|
@ -8,6 +8,7 @@ from kivymd.uix.recycleview import MDRecycleView
|
||||||
from kivymd.uix.list import OneLineIconListItem
|
from kivymd.uix.list import OneLineIconListItem
|
||||||
from kivy.properties import StringProperty, BooleanProperty
|
from kivy.properties import StringProperty, BooleanProperty
|
||||||
from kivy.effects.scroll import ScrollEffect
|
from kivy.effects.scroll import ScrollEffect
|
||||||
|
from kivy.clock import Clock
|
||||||
from sideband.sense import Telemeter
|
from sideband.sense import Telemeter
|
||||||
import threading
|
import threading
|
||||||
import webbrowser
|
import webbrowser
|
||||||
|
@ -72,11 +73,18 @@ class ObjectDetails():
|
||||||
|
|
||||||
rendered_telemetry = telemeter.render()
|
rendered_telemetry = telemeter.render()
|
||||||
if "location" in telemeter.sensors:
|
if "location" in telemeter.sensors:
|
||||||
self.screen.ids.coordinates_button.disabled = False
|
def job(dt):
|
||||||
|
self.screen.ids.coordinates_button.disabled = False
|
||||||
|
Clock.schedule_once(job, 0.01)
|
||||||
|
|
||||||
self.telemetry_list.update_source(rendered_telemetry)
|
self.telemetry_list.update_source(rendered_telemetry)
|
||||||
self.screen.ids.telemetry_button.disabled = False
|
def job(dt):
|
||||||
|
self.screen.ids.telemetry_button.disabled = False
|
||||||
|
Clock.schedule_once(job, 0.01)
|
||||||
else:
|
else:
|
||||||
self.screen.ids.telemetry_button.disabled = True
|
def job(dt):
|
||||||
|
self.screen.ids.telemetry_button.disabled = True
|
||||||
|
Clock.schedule_once(job, 0.01)
|
||||||
self.telemetry_list.update_source(None)
|
self.telemetry_list.update_source(None)
|
||||||
|
|
||||||
def reload(self):
|
def reload(self):
|
||||||
|
|
Loading…
Reference in New Issue