Skip to content

Commit

Permalink
Removed unnecesary function argument
Browse files Browse the repository at this point in the history
  • Loading branch information
jantar1154 committed Mar 21, 2024
1 parent 291fa22 commit c2545f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 1 addition & 5 deletions src/cg_download.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
use std::fmt::format;

use crate::AppWindow;
use slint::Weak;
use dialog::DialogBox;

pub(crate) fn download_catgirl(uiw: &Weak<AppWindow>) {
pub(crate) fn download_catgirl() {
// Open file dialog and get a path
let save_dialog = dialog::FileSelection::new("Please select a file")
.mode(dialog::FileSelectionMode::Save)
Expand Down
5 changes: 2 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ fn main() -> Result<(), slint::PlatformError> {
cg_fetch::fetch_new(&uiw);
});

let uiw = ui.as_weak();
ui.on_download(move || {
cg_download::download_catgirl(&uiw);
cg_download::download_catgirl();
});

let uiw = ui.as_weak();
Expand All @@ -24,7 +23,7 @@ fn main() -> Result<(), slint::PlatformError> {

let uiw = ui.as_weak();
ui.on_info(move || {

});

ui.run()
Expand Down

0 comments on commit c2545f9

Please sign in to comment.