mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-25 02:48:54 +01:00
Fix back button bypassing Done listener in account settings
This commit is contained in:
parent
6052d82047
commit
1fdf438956
1 changed files with 39 additions and 36 deletions
|
@ -423,43 +423,46 @@ class _AccountSettingsState extends State<AccountSettingsWidget> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildContent(BuildContext context) {
|
Widget _buildContent(BuildContext context) {
|
||||||
return CustomScrollView(
|
return WillPopScope(
|
||||||
slivers: [
|
onWillPop: () async => !_hasModified,
|
||||||
SliverAppBar(
|
child: CustomScrollView(
|
||||||
pinned: true,
|
slivers: [
|
||||||
title: Text(L10n.global().settingsAccountPageTitle),
|
SliverAppBar(
|
||||||
leading: _hasModified
|
pinned: true,
|
||||||
? IconButton(
|
title: Text(L10n.global().settingsAccountPageTitle),
|
||||||
icon: const Icon(Icons.check),
|
leading: _hasModified
|
||||||
tooltip: L10n.global().doneButtonTooltip,
|
? IconButton(
|
||||||
onPressed: () => _onDonePressed(context),
|
icon: const Icon(Icons.check),
|
||||||
)
|
tooltip: L10n.global().doneButtonTooltip,
|
||||||
: null,
|
onPressed: () => _onDonePressed(context),
|
||||||
),
|
)
|
||||||
SliverList(
|
: null,
|
||||||
delegate: SliverChildListDelegate(
|
|
||||||
[
|
|
||||||
ListTile(
|
|
||||||
title: Text(L10n.global().settingsIncludedFoldersTitle),
|
|
||||||
subtitle: Text(_account.roots.map((e) => "/$e").join("; ")),
|
|
||||||
onTap: _onIncludedFoldersPressed,
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
title: Text(L10n.global().settingsShareFolderTitle),
|
|
||||||
subtitle: Text("/$_shareFolder"),
|
|
||||||
onTap: () => _onShareFolderPressed(context),
|
|
||||||
),
|
|
||||||
_buildCaption(
|
|
||||||
context, L10n.global().settingsServerAppSectionTitle),
|
|
||||||
SwitchListTile(
|
|
||||||
title: const Text("Face Recognition"),
|
|
||||||
value: _isEnableFaceRecognitionApp,
|
|
||||||
onChanged: _onEnableFaceRecognitionAppChanged,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
SliverList(
|
||||||
],
|
delegate: SliverChildListDelegate(
|
||||||
|
[
|
||||||
|
ListTile(
|
||||||
|
title: Text(L10n.global().settingsIncludedFoldersTitle),
|
||||||
|
subtitle: Text(_account.roots.map((e) => "/$e").join("; ")),
|
||||||
|
onTap: _onIncludedFoldersPressed,
|
||||||
|
),
|
||||||
|
ListTile(
|
||||||
|
title: Text(L10n.global().settingsShareFolderTitle),
|
||||||
|
subtitle: Text("/$_shareFolder"),
|
||||||
|
onTap: () => _onShareFolderPressed(context),
|
||||||
|
),
|
||||||
|
_buildCaption(
|
||||||
|
context, L10n.global().settingsServerAppSectionTitle),
|
||||||
|
SwitchListTile(
|
||||||
|
title: const Text("Face Recognition"),
|
||||||
|
value: _isEnableFaceRecognitionApp,
|
||||||
|
onChanged: _onEnableFaceRecognitionAppChanged,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue