Compare commits
2 Commits
v0.1.33
...
5fd690197a
| Author | SHA1 | Date | |
|---|---|---|---|
| 5fd690197a | |||
| 31c0ade243 |
@@ -4,9 +4,6 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user