mirror of
https://github.com/liberatedsystems/Sideband_CE.git
synced 2024-09-03 04:13:27 +02:00
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:
|
||||||
|
def job(dt):
|
||||||
self.screen.ids.coordinates_button.disabled = False
|
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)
|
||||||
|
def job(dt):
|
||||||
self.screen.ids.telemetry_button.disabled = False
|
self.screen.ids.telemetry_button.disabled = False
|
||||||
|
Clock.schedule_once(job, 0.01)
|
||||||
else:
|
else:
|
||||||
|
def job(dt):
|
||||||
self.screen.ids.telemetry_button.disabled = True
|
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
Block a user