Added HTML reverse sorting (#915)

+ translatable strings (#916)
This commit is contained in:
Imran Remtulla
2023-09-23 13:31:27 -04:00
parent af5377d2eb
commit 68d4083708
16 changed files with 63 additions and 6 deletions

View File

@@ -93,6 +93,7 @@ class HTML extends AppSource {
GeneratedFormSwitch('sortByFileNamesNotLinks',
label: tr('sortByFileNamesNotLinks'))
],
[GeneratedFormSwitch('reverseSort', label: tr('reverseSort'))],
[
GeneratedFormTextField('customLinkFilterRegex',
label: tr('customLinkFilterRegex'),
@@ -195,6 +196,9 @@ class HTML extends AppSource {
? compareAlphaNumeric(a.split('/').where((e) => e.isNotEmpty).last,
b.split('/').where((e) => e.isNotEmpty).last)
: compareAlphaNumeric(a, b));
if (additionalSettings['reverseSort'] == true) {
links = links.reversed.toList();
}
if ((additionalSettings['apkFilterRegEx'] as String?)?.isNotEmpty ==
true) {
var reg = RegExp(additionalSettings['apkFilterRegEx']);

View File

@@ -558,7 +558,7 @@ class _SettingsPageState extends State<SettingsPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Flexible(child: Text('Debug Menu')),
Flexible(child: Text(tr('debugMenu'))),
Switch(
value: settingsProvider.showDebugOpts,
onChanged: (value) {
@@ -577,12 +577,9 @@ class _SettingsPageState extends State<SettingsPage> {
const Duration(seconds: 0),
bgUpdateCheckAlarmId + 200,
bgUpdateCheck);
showError(
'Background task started - check logs.',
context);
showError(tr('bgTaskStarted'), context);
},
child:
const Text('Run Background Update Check Now'))
child: Text(tr('runBgCheckNow')))
],
),
]),