fix(mobile): Change read-only mode activation method to remove double click lag (#21743)

* Change activation method to long press

* Update text to new method
This commit is contained in:
Noel S 2025-09-10 06:39:36 -07:00 committed by GitHub
parent 67a8cab286
commit e18e4c5962
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View File

@ -1517,7 +1517,7 @@
"profile_drawer_client_out_of_date_minor": "Mobile App is out of date. Please update to the latest minor version.",
"profile_drawer_client_server_up_to_date": "Client and Server are up-to-date",
"profile_drawer_github": "GitHub",
"profile_drawer_readonly_mode": "Read-only mode enabled. Double-tap the user avatar icon to exit.",
"profile_drawer_readonly_mode": "Read-only mode enabled. Long-press the user avatar icon to exit.",
"profile_drawer_server_out_of_date_major": "Server is out of date. Please update to the latest major version.",
"profile_drawer_server_out_of_date_minor": "Server is out of date. Please update to the latest minor version.",
"profile_image_of_user": "Profile image of {user}",

View File

@ -90,11 +90,11 @@ class AppBarProfileInfoBox extends HookConsumerWidget {
minLeadingWidth: 50,
leading: GestureDetector(
onTap: pickUserProfileImage,
onDoubleTap: toggleReadonlyMode,
onLongPress: toggleReadonlyMode,
child: Stack(
clipBehavior: Clip.none,
children: [
buildUserProfileImage(),
AbsorbPointer(child: buildUserProfileImage()),
if (!isReadonlyModeEnabled)
Positioned(
bottom: -5,

View File

@ -157,7 +157,7 @@ class _ProfileIndicator extends ConsumerWidget {
return InkWell(
onTap: () => showDialog(context: context, useRootNavigator: false, builder: (ctx) => const ImmichAppBarDialog()),
onDoubleTap: () => toggleReadonlyMode(),
onLongPress: () => toggleReadonlyMode(),
borderRadius: const BorderRadius.all(Radius.circular(12)),
child: Badge(
label: Container(
@ -173,7 +173,7 @@ class _ProfileIndicator extends ConsumerWidget {
? const Icon(Icons.face_outlined, size: widgetSize)
: Semantics(
label: "logged_in_as".tr(namedArgs: {"user": user.name}),
child: UserCircleAvatar(radius: 17, size: 31, user: user),
child: AbsorbPointer(child: UserCircleAvatar(radius: 17, size: 31, user: user)),
),
),
);