fix(time): don't recreate timezone property stream
This commit is contained in:
parent
6ef92f0917
commit
a795006633
1 changed files with 2 additions and 1 deletions
|
|
@ -244,7 +244,8 @@ impl cosmic::Application for Window {
|
|||
// The stream always returns the current timezone as its first item even if it wasn't
|
||||
// updated. If the proxy is recreated in a loop somehow, the resulting stream will
|
||||
// always yield an update immediately which could lead to spammed false updates.
|
||||
while let Some(property) = proxy.receive_timezone_changed().await.next().await {
|
||||
let mut stream_tz = proxy.receive_timezone_changed().await;
|
||||
while let Some(property) = stream_tz.next().await {
|
||||
let tz = property.get().await?;
|
||||
output
|
||||
.send(Message::TimezoneUpdate(tz))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue