public ViewModel(IReadOnlyDictionary<string, WidgetEntry> widgets) {
Widgets = widgets;
var active = SettingsHolder.Drive.QuickSwitchesList;
// clean up all invalid entries from saved list
if (active.Any(x => !widgets.Keys.Contains(x))) {
active = active.Where(widgets.Keys.Contains).ToArray();
SettingsHolder.Drive.QuickSwitchesList = active;
}
Stored = new BetterObservableCollection<WidgetEntry>(Widgets.Values.Where(x => !active.Contains(x.Key)));
Added = new BetterObservableCollection<WidgetEntry>(active.Select(x => Widgets.GetValueOrDefault(x)).NonNull());
Added.CollectionChanged += Added_CollectionChanged;
}