Skip to content

Commit

Permalink
chore: add note to indexer folders while media store is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
MSOB7YY committed Mar 1, 2025
1 parent 1fb4b7f commit 38cc211
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 69 deletions.
1 change: 1 addition & 0 deletions lib/core/translations/keys.dart
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ abstract class LanguageKeys {
String get MAX_AUDIO_CACHE_SIZE => _getKey('MAX_AUDIO_CACHE_SIZE');
String get MAX_IMAGE_CACHE_SIZE => _getKey('MAX_IMAGE_CACHE_SIZE');
String get MAX_VIDEO_CACHE_SIZE => _getKey('MAX_VIDEO_CACHE_SIZE');
String get MEDIA_STORE_IS_ENABLED_THIS_WILL_HAVE_NO_EFFECT => _getKey('MEDIA_STORE_IS_ENABLED_THIS_WILL_HAVE_NO_EFFECT');
String get MEMBERSHIP_CODE => _getKey('MEMBERSHIP_CODE');
String get MEMBERSHIP_CODE_SENT_TO_EMAIL => _getKey('MEMBERSHIP_CODE_SENT_TO_EMAIL');
String get MEMBERSHIP_DIDNT_CHANGE => _getKey('MEMBERSHIP_DIDNT_CHANGE');
Expand Down
140 changes: 72 additions & 68 deletions lib/ui/widgets/settings/indexer_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -161,79 +161,83 @@ class IndexerSettings extends SettingSubpageProvider {
return getItemWrapper(
key: _IndexerSettingsKeys.foldersToScan,
child: Obx(
(context) => AnimatedOpacity(
duration: const Duration(milliseconds: 200),
opacity: settings.useMediaStore.valueR ? 0.5 : 1.0,
child: NamidaExpansionTile(
bgColor: getBgColor(_IndexerSettingsKeys.foldersToScan),
bigahh: true,
compact: false,
initiallyExpanded: initiallyExpanded,
icon: Broken.folder,
titleText: lang.LIST_OF_FOLDERS,
textColor: context.textTheme.displayLarge!.color,
trailing: Row(
mainAxisSize: MainAxisSize.min,
(context) {
final mediaStoreEnabled = settings.useMediaStore.valueR;
return AnimatedOpacity(
duration: const Duration(milliseconds: 200),
opacity: mediaStoreEnabled ? 0.5 : 1.0,
child: NamidaExpansionTile(
bgColor: getBgColor(_IndexerSettingsKeys.foldersToScan),
subtitleText: mediaStoreEnabled ? lang.MEDIA_STORE_IS_ENABLED_THIS_WILL_HAVE_NO_EFFECT : null,
bigahh: true,
compact: false,
initiallyExpanded: initiallyExpanded,
icon: Broken.folder,
titleText: lang.LIST_OF_FOLDERS,
textColor: context.textTheme.displayLarge!.color,
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
IgnorePointer(
ignoring: settings.useMediaStore.valueR,
child: addFolderButton((dirsPath) {
settings.save(directoriesToScan: dirsPath);
}),
),
const SizedBox(width: 8.0),
const Icon(Broken.arrow_down_2),
],
),
children: [
IgnorePointer(
ignoring: settings.useMediaStore.valueR,
child: addFolderButton((dirsPath) {
settings.save(directoriesToScan: dirsPath);
}),
),
const SizedBox(width: 8.0),
const Icon(Broken.arrow_down_2),
],
),
children: [
...settings.directoriesToScan.valueR.map(
(e) => IgnorePointer(
ignoring: settings.useMediaStore.value,
child: ListTile(
title: Text(
e,
style: context.textTheme.displayMedium,
),
trailing: TextButton(
onPressed: () {
if (settings.directoriesToScan.length == 1) {
snackyy(
title: lang.MINIMUM_ONE_ITEM,
message: lang.MINIMUM_ONE_FOLDER_SUBTITLE,
displayDuration: SnackDisplayDuration.veryLong,
);
} else {
NamidaNavigator.inst.navigateDialog(
dialog: CustomBlurryDialog(
normalTitleStyle: true,
isWarning: true,
actions: [
const CancelButton(),
NamidaButton(
text: lang.REMOVE,
onPressed: () {
settings.removeFromList(directoriesToScan1: e);
NamidaNavigator.inst.closeDialog();
showRefreshPromptDialog(true);
},
),
],
bodyText: "${lang.REMOVE} \"$e\"?",
),
);
}
},
child: NamidaButtonText(
lang.REMOVE.toUpperCase(),
style: const TextStyle(fontSize: 14.0),
...settings.directoriesToScan.valueR.map(
(e) => IgnorePointer(
ignoring: settings.useMediaStore.value,
child: ListTile(
title: Text(
e,
style: context.textTheme.displayMedium,
),
trailing: TextButton(
onPressed: () {
if (settings.directoriesToScan.length == 1) {
snackyy(
title: lang.MINIMUM_ONE_ITEM,
message: lang.MINIMUM_ONE_FOLDER_SUBTITLE,
displayDuration: SnackDisplayDuration.veryLong,
);
} else {
NamidaNavigator.inst.navigateDialog(
dialog: CustomBlurryDialog(
normalTitleStyle: true,
isWarning: true,
actions: [
const CancelButton(),
NamidaButton(
text: lang.REMOVE,
onPressed: () {
settings.removeFromList(directoriesToScan1: e);
NamidaNavigator.inst.closeDialog();
showRefreshPromptDialog(true);
},
),
],
bodyText: "${lang.REMOVE} \"$e\"?",
),
);
}
},
child: NamidaButtonText(
lang.REMOVE.toUpperCase(),
style: const TextStyle(fontSize: 14.0),
),
),
),
),
),
),
],
),
),
],
),
);
},
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: namida
description: A Beautiful and Feature-rich Music Player, With YouTube & Video Support Built in Flutter
publish_to: "none"
version: 5.0.19-beta+250224650
version: 5.0.2-beta+250224680

environment:
sdk: ">=3.6.0 <4.0.0"
Expand Down

0 comments on commit 38cc211

Please sign in to comment.