From 746d4b75cc443a36c0eab3436559b071ed632832 Mon Sep 17 00:00:00 2001 From: dab246 Date: Tue, 8 Apr 2025 15:33:14 +0700 Subject: [PATCH] TF-3623 Fix `Cancel`, `Create`, `Save as default` are displayed 2 times in the dialog `Create new identity` Signed-off-by: dab246 --- .../presentation/identity_creator_controller.dart | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/features/identity_creator/presentation/identity_creator_controller.dart b/lib/features/identity_creator/presentation/identity_creator_controller.dart index 1242846a9..3f24922f3 100644 --- a/lib/features/identity_creator/presentation/identity_creator_controller.dart +++ b/lib/features/identity_creator/presentation/identity_creator_controller.dart @@ -833,9 +833,14 @@ class IdentityCreatorController extends BaseController with DragDropFileMixin im return compressedFilePath; } - bool isMobile(BuildContext context) => - responsiveUtils.isPortraitMobile(context) || - responsiveUtils.isLandscapeMobile(context); + bool isMobile(BuildContext context) { + if (PlatformInfo.isMobile) { + return responsiveUtils.isPortraitMobile(context) || + responsiveUtils.isLandscapeMobile(context); + } else { + return responsiveUtils.isMobile(context); + } + } double _getMaxWidthInlineImage(BuildContext context) { if (isMobile(context)) {