fix: profile dialog auto dismiss after opening on iPad (#26046)

This commit is contained in:
Alex 2026-02-08 17:30:57 -06:00 committed by GitHub
parent 10b2bf7970
commit 906c38273f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -128,6 +128,9 @@ class _ProfileIndicator extends ConsumerWidget {
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() {
final isReadonlyModeEnabled = ref.watch(readonlyModeProvider);
ref.read(readonlyModeProvider.notifier).toggleReadonlyMode();
@ -144,7 +147,12 @@ class _ProfileIndicator extends ConsumerWidget {
}
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(),
borderRadius: const BorderRadius.all(Radius.circular(12)),
child: Badge(