2 Commits

Author SHA1 Message Date
5fd690197a fixed workflow running on pull request 2026-01-23 18:21:41 +01:00
31c0ade243 fixed settings page not refreshing on granting storage permission
Some checks failed
Flutter APK Build / Build Flutter APK (pull_request) Has been cancelled
2026-01-23 18:18:25 +01:00
2 changed files with 4 additions and 6 deletions

View File

@@ -4,9 +4,6 @@ on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

View File

@@ -32,7 +32,7 @@ class _SettingsPageState extends State<SettingsPage> {
@override
Widget build(BuildContext context) {
final titlePadding = Theme.of(context).listTileTheme.contentPadding!;
checkStoragePermission;
checkStoragePermission();
return Scaffold(
appBar: AppBar(title: Text(AppLocalizations.of(context)!.settings)),
body: Center(
@@ -54,7 +54,8 @@ class _SettingsPageState extends State<SettingsPage> {
subtitle: Text(
'For app-data settings to work, you need to grant the app permissions to manage internal storage.',
),
onTap: () => PermissionService.requestStoragePermission,
onTap: () => PermissionService.requestStoragePermission
.whenComplete(() => checkStoragePermission()),
trailing: Icon(Icons.arrow_forward_ios_rounded),
enabled: !storagePermissionIsGranted,
),
@@ -93,7 +94,7 @@ class _SettingsPageState extends State<SettingsPage> {
Storage.importFromJsonFile().then(showImportInfo);
}
Future<void> get checkStoragePermission async {
Future<void> checkStoragePermission() async {
PermissionService.storagePermissionStatus.then((value) {
storagePermissionIsGranted = value.isGranted;
if (context.mounted && value.isGranted != storagePermissionIsGranted) {