From f1bbb065ec63053b1e0dd0c78ba11376cbab451d Mon Sep 17 00:00:00 2001 From: Marvin W Date: Mon, 6 Oct 2025 20:12:19 +0200 Subject: Files: Use GFile instead of uri/path strings In some situations (like VFS or other abstractions), the file reference can have an invalid or unusabe path. Passing the GFile instead and opening it directly increases probability we can actually access it. --- main/src/windows/preferences_window/account_preferences_subpage.vala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'main/src/windows/preferences_window') diff --git a/main/src/windows/preferences_window/account_preferences_subpage.vala b/main/src/windows/preferences_window/account_preferences_subpage.vala index 7a17fbda..660a9aeb 100644 --- a/main/src/windows/preferences_window/account_preferences_subpage.vala +++ b/main/src/windows/preferences_window/account_preferences_subpage.vala @@ -144,8 +144,7 @@ public class Dino.Ui.AccountPreferencesSubpage : Adw.NavigationPage { chooser.add_filter(filter); chooser.response.connect(() => { - string uri = chooser.get_file().get_path(); - model.set_avatar_uri(account, uri); + model.set_avatar_file(account, chooser.get_file()); }); chooser.show(); -- cgit v1.3