From 75d8b9c90bba6062273ba007cec10f8e588109aa Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Mon, 9 Jan 2023 21:13:00 +0100 Subject: [PATCH] Various fixes --- IceCubesApp/App/IceCubesApp.swift | 4 +++- Packages/Account/Sources/Account/AccountDetailView.swift | 1 + .../Sources/Conversations/List/ConversationsListRow.swift | 1 - Packages/Status/Sources/Status/Row/StatusRowView.swift | 2 +- Packages/Status/Sources/Status/Row/StatusRowViewModel.swift | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/IceCubesApp/App/IceCubesApp.swift b/IceCubesApp/App/IceCubesApp.swift index 3941e8e1..816a6d2a 100644 --- a/IceCubesApp/App/IceCubesApp.swift +++ b/IceCubesApp/App/IceCubesApp.swift @@ -64,11 +64,14 @@ struct IceCubesApp: App { @ViewBuilder private var appView: some View { + /* if UIDevice.current.userInterfaceIdiom == .pad || UIDevice.current.userInterfaceIdiom == .mac { splitView } else { tabBarView } + */ + tabBarView } private func badgeFor(tab: Tab) -> Int { @@ -169,6 +172,5 @@ class AppDelegate: NSObject, UIApplicationDelegate { } func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) { - print(error) } } diff --git a/Packages/Account/Sources/Account/AccountDetailView.swift b/Packages/Account/Sources/Account/AccountDetailView.swift index 585001ee..da1a1994 100644 --- a/Packages/Account/Sources/Account/AccountDetailView.swift +++ b/Packages/Account/Sources/Account/AccountDetailView.swift @@ -69,6 +69,7 @@ public struct AccountDetailView: View { listsListView } } + .frame(maxWidth: .maxColumnWidth) } .scrollContentBackground(.hidden) .background(theme.primaryBackgroundColor) diff --git a/Packages/Conversations/Sources/Conversations/List/ConversationsListRow.swift b/Packages/Conversations/Sources/Conversations/List/ConversationsListRow.swift index 38a28e8b..8bd0d6cd 100644 --- a/Packages/Conversations/Sources/Conversations/List/ConversationsListRow.swift +++ b/Packages/Conversations/Sources/Conversations/List/ConversationsListRow.swift @@ -31,7 +31,6 @@ struct ConversationsListRow: View { } Text(conversation.lastStatus.createdAt.formatted) .font(.footnote) - .foregroundColor(.gray) } Text(conversation.lastStatus.content.asRawText) .foregroundColor(.gray) diff --git a/Packages/Status/Sources/Status/Row/StatusRowView.swift b/Packages/Status/Sources/Status/Row/StatusRowView.swift index 34f6c868..d4fd39f4 100644 --- a/Packages/Status/Sources/Status/Row/StatusRowView.swift +++ b/Packages/Status/Sources/Status/Row/StatusRowView.swift @@ -163,7 +163,7 @@ public struct StatusRowView: View { private func makeStatusContentView(status: AnyStatus) -> some View { Group { - if !viewModel.status.spoilerText.isEmpty { + if !status.spoilerText.isEmpty { Text(status.spoilerText) .font(.body) Button { diff --git a/Packages/Status/Sources/Status/Row/StatusRowViewModel.swift b/Packages/Status/Sources/Status/Row/StatusRowViewModel.swift index 8cb94d72..e148cfea 100644 --- a/Packages/Status/Sources/Status/Row/StatusRowViewModel.swift +++ b/Packages/Status/Sources/Status/Row/StatusRowViewModel.swift @@ -50,7 +50,7 @@ public class StatusRowViewModel: ObservableObject { self.favouritesCount = status.reblog?.favouritesCount ?? status.favouritesCount self.reblogsCount = status.reblog?.reblogsCount ?? status.reblogsCount self.repliesCount = status.reblog?.repliesCount ?? status.repliesCount - self.displaySpoiler = !status.spoilerText.isEmpty + self.displaySpoiler = !(status.reblog?.spoilerText ?? status.spoilerText).isEmpty self.isFiltered = filter != nil }