Use app deep copy in places to avoid bugs

This commit is contained in:
Imran Remtulla
2023-04-07 01:54:14 -04:00
parent 9193788356
commit 334ac8d3d6
7 changed files with 62 additions and 33 deletions

View File

@@ -164,7 +164,8 @@ class SettingsProvider with ChangeNotifier {
void setCategories(Map<String, int> cats, {AppsProvider? appsProvider}) {
if (appsProvider != null) {
List<App> changedApps = appsProvider.apps.values
List<App> changedApps = appsProvider
.getAppValues()
.map((a) {
var n1 = a.app.categories.length;
a.app.categories.removeWhere((c) => !cats.keys.contains(c));