Skip to content

Commit

Permalink
check schema
Browse files Browse the repository at this point in the history
  • Loading branch information
alainm23 committed Oct 18, 2024
1 parent de9b5d4 commit ac12b8e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Widgets/MainView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ public class Widgets.MainView : Gtk.Widget {
};
main_widget.set_parent (this);

var settings = new Settings ("io.elementary.settings");
settings.bind ("sidebar-position", main_widget, "position", DEFAULT);
var sss = SettingsSchemaSource.get_default ().lookup ("io.elementary.settings", true);
if (sss != null && sss.has_key ("sidebar-position")) {
var settings = new Settings ("io.elementary.settings");
settings.bind ("sidebar-position", main_widget, "position", DEFAULT);
}
}

~MainView () {
Expand Down

0 comments on commit ac12b8e

Please sign in to comment.