refactor: move exporting patches to another section

This commit is contained in:
Aunali321 2022-11-09 14:20:32 +05:30
parent c571cf2c53
commit d545dfe49b
2 changed files with 42 additions and 34 deletions

View File

@ -139,6 +139,7 @@
"experimentalPatchesLabel": "Experimental Patch support", "experimentalPatchesLabel": "Experimental Patch support",
"experimentalPatchesHint": "Enable to use unsupported patches in any app version", "experimentalPatchesHint": "Enable to use unsupported patches in any app version",
"enabledExperimentalPatches": "Experimental patches enabled", "enabledExperimentalPatches": "Experimental patches enabled",
"exportSectionTitle": "Import/Export",
"aboutLabel": "About", "aboutLabel": "About",
"snackbarMessage": "Copied to clipboard", "snackbarMessage": "Copied to clipboard",
"sentryLabel": "Sentry Logging", "sentryLabel": "Sentry Logging",

View File

@ -151,8 +151,8 @@ class SettingsView extends StatelessWidget {
subtitle: subtitle:
I18nText('settingsView.experimentalPatchesHint'), I18nText('settingsView.experimentalPatchesHint'),
value: model.areExperimentalPatchesEnabled(), value: model.areExperimentalPatchesEnabled(),
onTap: (value) => onTap: (value) => model.useExperimentalPatches(value),
model.useExperimentalPatches(value)), ),
ListTile( ListTile(
contentPadding: contentPadding:
const EdgeInsets.symmetric(horizontal: 20.0), const EdgeInsets.symmetric(horizontal: 20.0),
@ -185,6 +185,28 @@ class SettingsView extends StatelessWidget {
subtitle: I18nText('settingsView.deleteTempDirHint'), subtitle: I18nText('settingsView.deleteTempDirHint'),
onTap: () => model.deleteTempDir(), onTap: () => model.deleteTempDir(),
), ),
ListTile(
contentPadding:
const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.deleteLogsLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
),
subtitle: I18nText('settingsView.deleteLogsHint'),
onTap: () => model.deleteLogs(),
),
],
),
_settingsDivider,
SettingsSection(
title: 'settingsView.exportSectionTitle',
children: <Widget>[
ListTile( ListTile(
contentPadding: contentPadding:
const EdgeInsets.symmetric(horizontal: 20.0), const EdgeInsets.symmetric(horizontal: 20.0),
@ -230,25 +252,10 @@ class SettingsView extends StatelessWidget {
), ),
), ),
), ),
subtitle: I18nText('settingsView.resetStoredPatchesHint'), subtitle:
I18nText('settingsView.resetStoredPatchesHint'),
onTap: () => model.resetSelectedPatches(), onTap: () => model.resetSelectedPatches(),
), ),
ListTile(
contentPadding:
const EdgeInsets.symmetric(horizontal: 20.0),
title: I18nText(
'settingsView.deleteLogsLabel',
child: const Text(
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
),
subtitle: I18nText('settingsView.deleteLogsHint'),
onTap: () => model.deleteLogs(),
),
], ],
), ),
_settingsDivider, _settingsDivider,