Skip to content

Commit 799c8e6

Browse files
authored
Fix background-state not saved with the preferences switch (#509)
Remove the binding that prevents the saving of run-in-background switch value
1 parent 42c1cbc commit 799c8e6

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/Views/PreferencesView.vala

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -158,19 +158,5 @@ public class Monitor.PreferencesView : Granite.Bin {
158158
settings.bind ("indicator-gpu-state", gpu_check, "active", DEFAULT);
159159
settings.bind ("indicator-network-download-state", network_download_check, "active", DEFAULT);
160160
settings.bind ("indicator-network-upload-state", network_upload_check, "active", DEFAULT);
161-
162-
// Disable the background preference when the indicator is enabled
163-
settings.bind_with_mapping (
164-
"indicator-state", background_switch, "active", GET,
165-
(switch_state, settings_state, user_data) => {
166-
bool state = settings_state.get_boolean ();
167-
if (!state) {
168-
switch_state.set_boolean (false);
169-
}
170-
171-
return true;
172-
},
173-
(SettingsBindSetMappingShared) null, null, null
174-
);
175161
}
176162
}

0 commit comments

Comments
 (0)