diff --git a/.github/release-nest-v3 b/.github/release-nest-v3 index 9a03714..9d60796 100644 --- a/.github/release-nest-v3 +++ b/.github/release-nest-v3 @@ -1 +1 @@ -10 \ No newline at end of file +11 \ No newline at end of file diff --git a/debian/changelog b/debian/changelog index 51df7f8..b477ae2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -pikman-update-manager (1.0.1-100pika1) pikauwu; urgency=medium +pikman-update-manager (1.0.1-100pika2) pikauwu; urgency=medium * initial release diff --git a/src/bin/gui/build_ui/mod.rs b/src/bin/gui/build_ui/mod.rs index 2d2d6de..27a5e40 100644 --- a/src/bin/gui/build_ui/mod.rs +++ b/src/bin/gui/build_ui/mod.rs @@ -237,37 +237,6 @@ pub fn build_ui(app: &Application) { let internet_connected_status = internet_connected.clone(); - let constant_loop_context = MainContext::default(); - // The main loop executes the asynchronous block - constant_loop_context.spawn_local(clone!( - #[weak] - window_banner, - #[weak] - refresh_button, - async move { - while let Ok(message) = constant_loop_receiver.recv().await { - let banner_text = t!("banner_text_no_internet").to_string(); - match message { - ConstantLoopMessage::InternetStatus(state) => { - if state == true { - *internet_connected_status.borrow_mut() = true; - if window_banner.title() == banner_text { - window_banner.set_revealed(false) - } - } else { - *internet_connected_status.borrow_mut() = false; - window_banner.set_title(&banner_text); - window_banner.set_revealed(true) - } - } - ConstantLoopMessage::RefreshRequest => { - refresh_button.emit_clicked(); - } - } - } - } - )); - let window_headerbar = HeaderBar::builder() .title_widget(&WindowTitle::builder().title(t!("application_name")).build()) .show_title(false) @@ -666,6 +635,43 @@ pub fn build_ui(app: &Application) { } } )); + + let constant_loop_context = MainContext::default(); + // The main loop executes the asynchronous block + constant_loop_context.spawn_local(clone!( + #[weak] + window_banner, + #[strong] + update_sys_tray, + #[strong] + apt_retry_signal_action, + #[strong] + flatpak_retry_signal_action, + async move { + while let Ok(message) = constant_loop_receiver.recv().await { + let banner_text = t!("banner_text_no_internet").to_string(); + match message { + ConstantLoopMessage::InternetStatus(state) => { + if state == true { + *internet_connected_status.borrow_mut() = true; + if window_banner.title() == banner_text { + window_banner.set_revealed(false) + } + } else { + *internet_connected_status.borrow_mut() = false; + window_banner.set_title(&banner_text); + window_banner.set_revealed(true) + } + } + ConstantLoopMessage::RefreshRequest => { + update_sys_tray.activate(Some(&glib::Variant::array_from_fixed_array(&[-1, -1]))); + apt_retry_signal_action.activate(None); + flatpak_retry_signal_action.activate(None); + } + } + } + } + )); } fn add_content_button(