mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-27 15:07:45 +00:00
fix: profile dialog auto dismiss after opening on iPad (#26046)
This commit is contained in:
parent
10b2bf7970
commit
906c38273f
1 changed files with 9 additions and 1 deletions
|
|
@ -128,6 +128,9 @@ class _ProfileIndicator extends ConsumerWidget {
|
||||||
|
|
||||||
const widgetSize = 30.0;
|
const widgetSize = 30.0;
|
||||||
|
|
||||||
|
// TODO: remove this when update Flutter version newer than 3.35.7
|
||||||
|
final isIpad = defaultTargetPlatform == TargetPlatform.iOS && !context.isMobile;
|
||||||
|
|
||||||
void toggleReadonlyMode() {
|
void toggleReadonlyMode() {
|
||||||
final isReadonlyModeEnabled = ref.watch(readonlyModeProvider);
|
final isReadonlyModeEnabled = ref.watch(readonlyModeProvider);
|
||||||
ref.read(readonlyModeProvider.notifier).toggleReadonlyMode();
|
ref.read(readonlyModeProvider.notifier).toggleReadonlyMode();
|
||||||
|
|
@ -144,7 +147,12 @@ class _ProfileIndicator extends ConsumerWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () => showDialog(context: context, useRootNavigator: false, builder: (ctx) => const ImmichAppBarDialog()),
|
onTap: () => showDialog(
|
||||||
|
context: context,
|
||||||
|
useRootNavigator: false,
|
||||||
|
barrierDismissible: !isIpad,
|
||||||
|
builder: (ctx) => const ImmichAppBarDialog(),
|
||||||
|
),
|
||||||
onLongPress: () => toggleReadonlyMode(),
|
onLongPress: () => toggleReadonlyMode(),
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||||
child: Badge(
|
child: Badge(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue