Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.

Commit 3a85271

Browse files
committed
fix updater and remember button
Signed-off-by: coyoteclan <mrcreamy112233@gmail.com>
1 parent 6b6b3eb commit 3a85271

4 files changed

Lines changed: 7 additions & 4 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "codlinux"
3-
version = "1.0.0"
3+
version = "1.0.1"
44
edition = "2024"
55

66
[profile.release]

src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,12 @@ impl FactoryComponent for GameInfo {
220220
},
221221
},
222222

223+
#[name = "remember_button"]
223224
gtk::Button {
224225
set_label: "Remember Game",
225-
connect_clicked[sender, index] => move |_| {
226+
connect_clicked[sender, index, btn = remember_button.clone()] => move |_| {
226227
sender.output(GameOutput::Remembered(index.clone())).unwrap();
228+
btn.set_sensitive(false);
227229
},
228230
},
229231

src/updater.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ pub(crate) fn show_update_window(app: Application)
1313
let builder = Updater::builder();
1414
app.add_window(&builder.root);
1515
builder.root.set_visible(true);
16+
builder.root.set_title("Updater".into());
1617
builder.launch("Updater".into()).detach_runtime();
1718
}
1819

@@ -183,7 +184,7 @@ impl Component for Updater {
183184

184185
let difference = result.published_at - compile_time;
185186
out.send(CmdOut::Checked(
186-
Ok(difference < chrono::Duration::minutes(5))
187+
Ok(difference > chrono::Duration::minutes(5))
187188
)).unwrap();
188189
})
189190
.drop_on_shutdown()

0 commit comments

Comments
 (0)