diff options
| author | Marvin W <git@larma.de> | 2025-10-06 20:12:19 +0200 |
|---|---|---|
| committer | Marvin W <git@larma.de> | 2025-11-01 18:04:43 -0400 |
| commit | f1bbb065ec63053b1e0dd0c78ba11376cbab451d (patch) | |
| tree | c8ba1ee43637b29f868e6d8ddd63714e6fb4618d /main/src/windows/preferences_window | |
| parent | 3c37cdbd1d2e5abbd0ab46a110b479432929b535 (diff) | |
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.
Diffstat (limited to 'main/src/windows/preferences_window')
| -rw-r--r-- | main/src/windows/preferences_window/account_preferences_subpage.vala | 3 |
1 files changed, 1 insertions, 2 deletions
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(); |
