mirror of
https://github.com/powerline/powerline.git
synced 2025-07-23 13:55:45 +02:00
Remove update_first set from set_state
It is already handled correctly in .render() method
This commit is contained in:
parent
66beaaaa9d
commit
992e6151eb
@ -144,7 +144,7 @@ class KwThreadedSegment(ThreadedSegment):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
# Allow only to forbid to compute missing values: in either user
|
# Allow only to forbid to compute missing values: in either user
|
||||||
# configuration or in subclasses.
|
# configuration or in subclasses.
|
||||||
update_state = self.compute_state(key) if update_first and self.update_first or self.run_once else None
|
update_state = self.compute_state(key) if ((update_first and self.update_first) or self.run_once) else None
|
||||||
|
|
||||||
with self.write_lock:
|
with self.write_lock:
|
||||||
self.new_queries[key] = (monotonic(), update_state)
|
self.new_queries[key] = (monotonic(), update_state)
|
||||||
@ -173,12 +173,9 @@ class KwThreadedSegment(ThreadedSegment):
|
|||||||
|
|
||||||
return update_value
|
return update_value
|
||||||
|
|
||||||
def set_state(self, interval=None, update_first=True, **kwargs):
|
def set_state(self, interval=None, **kwargs):
|
||||||
self.set_interval(interval)
|
self.set_interval(interval)
|
||||||
|
|
||||||
if self.update_first:
|
|
||||||
self.update_first = update_first
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def render_one(update_state, **kwargs):
|
def render_one(update_state, **kwargs):
|
||||||
return update_state
|
return update_state
|
||||||
|
Loading…
x
Reference in New Issue
Block a user