opt.: ignore all disk not start with /dev

This commit is contained in:
lollipopkit
2024-03-15 19:22:31 -06:00
parent 5993231c2a
commit cf3a246520
4 changed files with 5 additions and 24 deletions

View File

@@ -430,15 +430,8 @@ class _ServerDetailPageState extends State<ServerDetailPage>
}
Widget _buildDiskView(ServerStatus ss) {
final disks = ss.disk;
disks.removeWhere((e) {
for (final ingorePath in Stores.setting.diskIgnorePath.fetch()) {
if (e.dev.startsWith(ingorePath)) return true;
}
return false;
});
final children =
List.generate(disks.length, (idx) => _buildDiskItem(disks[idx], ss));
final children = List.generate(
ss.disk.length, (idx) => _buildDiskItem(ss.disk[idx], ss));
return CardX(
child: ExpandTile(
title: Text(l10n.disk),