Skip to content

Commit

Permalink
Reload model after saving (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryonakano authored Feb 12, 2024
1 parent e624317 commit 46ee4a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ public class MainWindow : Adw.ApplicationWindow {
show_edit_view (entry);
});

edit_view.file_updated.connect (() => {
edit_view.saved.connect (() => {
desktop_file.copy_to (backup_desktop_file);
model.load ();
overlay.add_toast (updated_toast);
});

Expand Down
4 changes: 2 additions & 2 deletions src/View/EditView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

public class View.EditView : Adw.NavigationPage {
public signal void file_updated ();
public signal void saved ();

public MainWindow window { private get; construct; }

Expand Down Expand Up @@ -461,7 +461,7 @@ public class View.EditView : Adw.NavigationPage {
}

Util.DesktopFileUtil.add_exec_permission (desktop_file.get_string (KeyFileDesktop.KEY_EXEC));
file_updated ();
saved ();
}

/**
Expand Down

0 comments on commit 46ee4a7

Please sign in to comment.