Skip to content

Commit

Permalink
fix: disaled save button for album identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
MSOB7YY committed Oct 15, 2023
1 parent a3dcedc commit 1bcee8b
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions lib/ui/widgets/settings/indexer_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -225,19 +225,22 @@ class IndexerSettings extends StatelessWidget {
const CancelButton(),
const SizedBox(width: 8.0),
Obx(
() => NamidaButton(
enabled: !settings.albumIdentifiers.every((element) => tempList.contains(element)), // isEqualTo wont work cuz order shouldnt matter
text: lang.SAVE,
onPressed: () async {
NamidaNavigator.inst.closeDialog();
settings.removeFromList(albumIdentifiersAll: AlbumIdentifier.values);
settings.save(albumIdentifiers: tempList);
() {
return NamidaButton(
enabled: settings.albumIdentifiers.any((element) => !tempList.contains(element)) ||
tempList.any((element) => !settings.albumIdentifiers.contains(element)), // isEqualTo wont work cuz order shouldnt matter
text: lang.SAVE,
onPressed: () async {
NamidaNavigator.inst.closeDialog();
settings.removeFromList(albumIdentifiersAll: AlbumIdentifier.values);
settings.save(albumIdentifiers: tempList);

Indexer.inst.prepareTracksFile();
Indexer.inst.prepareTracksFile();

_showReindexingPrompt(title: lang.ALBUM_IDENTIFIERS, body: lang.REQUIRES_CLEARING_IMAGE_CACHE_AND_RE_INDEXING);
},
),
_showReindexingPrompt(title: lang.ALBUM_IDENTIFIERS, body: lang.REQUIRES_CLEARING_IMAGE_CACHE_AND_RE_INDEXING);
},
);
},
),
],
child: Column(
Expand Down

0 comments on commit 1bcee8b

Please sign in to comment.