From 343ac025d5cdde45c0a723d879dd78898876118a Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Sat, 15 Mar 2025 11:25:51 -0500 Subject: [PATCH] cleanup --- web/repertory/lib/models/mount_list.dart | 6 ++++-- web/repertory/lib/types/mount_config.dart | 4 ---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/web/repertory/lib/models/mount_list.dart b/web/repertory/lib/models/mount_list.dart index 1aa0ea1f..cf2dc1bc 100644 --- a/web/repertory/lib/models/mount_list.dart +++ b/web/repertory/lib/models/mount_list.dart @@ -53,9 +53,11 @@ class MountList with ChangeNotifier { } List nextList = []; - jsonDecode(response.body).forEach((key, value) { + jsonDecode(response.body).forEach((type, value) { nextList.addAll( - value.map((name) => Mount(MountConfig.fromJson(key, name))).toList(), + value + .map((name) => Mount(MountConfig(type: type, name: name))) + .toList(), ); }); _sort(nextList); diff --git a/web/repertory/lib/types/mount_config.dart b/web/repertory/lib/types/mount_config.dart index e462b203..9d4428ab 100644 --- a/web/repertory/lib/types/mount_config.dart +++ b/web/repertory/lib/types/mount_config.dart @@ -25,10 +25,6 @@ class MountConfig { IconData? get state => _state; String get type => _type; - factory MountConfig.fromJson(String type, String name) { - return MountConfig(name: name, type: type); - } - void updateSettings(Map settings) { _settings = settings; }