From fa1b56623ac7aed0bf2bebb2c64932d02b69f065 Mon Sep 17 00:00:00 2001 From: Marco Gomiero Date: Thu, 24 Oct 2024 23:36:58 +0200 Subject: [PATCH] Add workaround to make toolbar not disappear on iPad --- iosApp/Source/Home/HomeScreenContent.swift | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/iosApp/Source/Home/HomeScreenContent.swift b/iosApp/Source/Home/HomeScreenContent.swift index 5821b26f..354ba5ed 100644 --- a/iosApp/Source/Home/HomeScreenContent.swift +++ b/iosApp/Source/Home/HomeScreenContent.swift @@ -137,6 +137,10 @@ struct HomeContent: View { } .accessibilityIdentifier(TestingTag.shared.HOME_TOOLBAR) } + // Without this, the toolbar disappear. But with that, there's a weird animation when opening a sheet + .if(UIDevice.current.userInterfaceIdiom == .pad) { view in + view.id(UUID()) + } } } @@ -148,6 +152,10 @@ struct HomeContent: View { } label: { Image(systemName: "arrow.uturn.up") } + // Without this, the toolbar disappear. But with that, there's a weird animation when opening a sheet + .if(UIDevice.current.userInterfaceIdiom == .pad) { view in + view.id(UUID()) + } } } @@ -161,6 +169,10 @@ struct HomeContent: View { } label: { Image(systemName: "magnifyingglass") } + // Without this, the toolbar disappear. But with that, there's a weird animation when opening a sheet + .if(UIDevice.current.userInterfaceIdiom == .pad) { view in + view.id(UUID()) + } } } @@ -206,6 +218,10 @@ struct HomeContent: View { Image(systemName: "ellipsis.circle") } .accessibilityIdentifier(TestingTag.shared.SETTING_BUTTON) + // Without this, the toolbar disappear. But with that, there's a weird animation when opening a sheet + .if(UIDevice.current.userInterfaceIdiom == .pad) { view in + view.id(UUID()) + } } }