Skip to content

Commit 16855ae

Browse files
committed
Fix continue button not responding after installing distrobox
1 parent 34c429e commit 16855ae

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

data/com.ranfdev.DistroShelf.metainfo.xml.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
<description translate="no">
7676
<ul>
7777
<li>Fixed create container button not working</li>
78+
<li>Fixed continue button in welcome screen not working after having installed distrobox</li>
7879
</ul>
7980
</description>
8081
</release>

src/welcome_view.rs

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,21 @@ mod imp {
6262
#[template_callback]
6363
fn continue_to_terminal_page(&self, _: &gtk::Button) {
6464
let obj = self.obj();
65-
if let Some(e) = obj.root_store().distrobox_version().error() {
66-
obj.set_distrobox_error(Some(e.as_str()));
67-
} else {
68-
self.carousel
69-
.scroll_to(&*obj.imp().terminal_preferences_page, true);
70-
}
65+
let obj = obj.clone();
66+
obj.root_store().distrobox_version()
67+
.connect_loading_notify(move |resource| {
68+
if resource.loading() {
69+
return
70+
}
71+
if let Some(e) = resource.error() {
72+
obj.set_distrobox_error(Some(e.as_str()));
73+
} else {
74+
obj.imp().carousel
75+
.scroll_to(&*obj.imp().terminal_preferences_page, true);
76+
}
77+
});
78+
self.obj().root_store().distrobox_version().reload();
79+
self.obj().root_store().load_containers();
7180
}
7281
#[template_callback]
7382
fn continue_to_app(&self, _: &gtk::Button) {

0 commit comments

Comments
 (0)