From 84898c3b8e969983bcbbae8385b4a9689a852e9f Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Fri, 29 Dec 2023 18:16:23 +0100 Subject: [PATCH] Fix #1798 --- .../Status/Row/Subviews/StatusRowActionsView.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Packages/Status/Sources/Status/Row/Subviews/StatusRowActionsView.swift b/Packages/Status/Sources/Status/Row/Subviews/StatusRowActionsView.swift index 7667b800..f60a9c7c 100644 --- a/Packages/Status/Sources/Status/Row/Subviews/StatusRowActionsView.swift +++ b/Packages/Status/Sources/Status/Row/Subviews/StatusRowActionsView.swift @@ -13,10 +13,15 @@ struct StatusRowActionsView: View { @Environment(\.openWindow) private var openWindow @Environment(\.isStatusFocused) private var isFocused + @Environment(\.horizontalSizeClass) var horizontalSizeClass @State private var showTextForSelection: Bool = false var viewModel: StatusRowViewModel + + var isNarrow: Bool { + horizontalSizeClass == .compact && (UIDevice.current.userInterfaceIdiom == .pad || UIDevice.current.userInterfaceIdiom == .mac) + } func privateBoost() -> Bool { viewModel.status.visibility == .priv && viewModel.status.account.id == currentAccount.account?.id @@ -210,7 +215,8 @@ struct StatusRowActionsView: View { ) .disabled(action == .boost && (viewModel.status.visibility == .direct || viewModel.status.visibility == .priv && viewModel.status.account.id != currentAccount.account?.id)) - if let count = action.count(dataController: statusDataController, + if !isNarrow, + let count = action.count(dataController: statusDataController, isFocused: isFocused, theme: theme), !viewModel.isRemote {