Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
ranfdev committed Nov 9, 2023
1 parent 6581eb5 commit 20ee796
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,9 @@ impl NotifyApplication {
impl models::NetworkMonitorProxy for Proxies {
fn listen(&self) -> Pin<Box<dyn Stream<Item = ()>>> {
let (tx, rx) = async_channel::bounded(1);
let mut prev_available = Rc::new(Cell::new(false));
let prev_available = Rc::new(Cell::new(false));

gio::NetworkMonitor::default().connect_network_changed(move |_, available| {
dbg!("sent", available);
if available && !prev_available.get() {
if let Err(e) = tx.send_blocking(()) {
warn!(error = %e);
Expand Down

0 comments on commit 20ee796

Please sign in to comment.