diff --git a/Bubble/Components/Post/CompactPostView.swift b/Bubble/Components/Post/CompactPostView.swift index 2a05070..789577a 100644 --- a/Bubble/Components/Post/CompactPostView.swift +++ b/Bubble/Components/Post/CompactPostView.swift @@ -116,8 +116,9 @@ struct CompactPostView: View { if !status.content.asRawText.isEmpty { TextEmoji(status.content, emojis: status.emojis, language: status.language) .multilineTextAlignment(.leading) - .frame(width: quoted ? 250 : 300, alignment: .topLeading) - .lineLimit(quoted ? 3 : nil) + .frame(width: quoted ? 180 : 300, alignment: .topLeading) + .frame(maxHeight: 140) +// .lineLimit(quoted ? 3 : nil) .fixedSize(horizontal: false, vertical: true) .font(quoted ? .caption : .callout) .contentShape(Rectangle()) @@ -126,21 +127,22 @@ struct CompactPostView: View { } } -// if !quoted { + if !quoted { if status.poll != nil { PostPoll(poll: status.poll!) } - + if status.card != nil && status.mediaAttachments.isEmpty && !hasQuote { PostCardView(card: status.card!) } - - attachmnts -// } - + + attachmnts + } + if hasQuote && !quoted { if quoteStatus != nil { QuotePostView(status: quoteStatus!) + .frame(maxWidth: 250, maxHeight: 200, alignment: .leading) } else { ProgressView() .progressViewStyle(.circular) diff --git a/Bubble/Components/Post/QuotePostView.swift b/Bubble/Components/Post/QuotePostView.swift index a616735..7506556 100644 --- a/Bubble/Components/Post/QuotePostView.swift +++ b/Bubble/Components/Post/QuotePostView.swift @@ -9,8 +9,7 @@ struct QuotePostView: View { var body: some View { CompactPostView(status: status, quoted: true) .frame(maxWidth: 250, maxHeight: 200) - .padding(15) - .padding([.horizontal], 20) + .padding(7.5) .overlay( RoundedRectangle(cornerRadius: 15) .stroke(.gray.opacity(0.3), lineWidth: 1) diff --git a/Bubble/Components/SearchResultView.swift b/Bubble/Components/SearchResultView.swift index 9a2e9a0..027bd42 100644 --- a/Bubble/Components/SearchResultView.swift +++ b/Bubble/Components/SearchResultView.swift @@ -109,7 +109,7 @@ struct SearchResultView: View { Spacer() Button { - // do stuff + navigator.navigate(to: .timeline(timeline: .hashtag(tag: tag.name, accountId: nil))) } label: { Text("tag.read") } @@ -123,6 +123,9 @@ struct SearchResultView: View { var statusesView: some View { VStack(spacing: 7.5) { ForEach(searchResults.statuses) { status in + Divider() + .frame(maxWidth: .infinity) + CompactPostView(status: status) .padding(.vertical) } diff --git a/Bubble/Data/Content/FetchTimeline.swift b/Bubble/Data/Content/FetchTimeline.swift index b48ad85..dd8b5d0 100644 --- a/Bubble/Data/Content/FetchTimeline.swift +++ b/Bubble/Data/Content/FetchTimeline.swift @@ -29,7 +29,9 @@ class FetchTimeline { public func addStatuses(lastStatusIndex: Int) async -> [Status] { // print("i: \(lastStatusIndex)\ndatasource-6: \(self.datasource.count - 6)") - guard client != nil && lastStatusIndex >= self.datasource.count - 6 else { return self.datasource } + guard client != nil && lastStatusIndex >= self.datasource.count - 6 && !self.datasource.isEmpty else { + return self.datasource + } self.statusesState = .loading let lastStatus = self.datasource.last! diff --git a/Bubble/Data/URLNavigator.swift b/Bubble/Data/URLNavigator.swift index 8f78c38..6f0b9f7 100644 --- a/Bubble/Data/URLNavigator.swift +++ b/Bubble/Data/URLNavigator.swift @@ -13,9 +13,15 @@ extension Navigator { let urlPath: URL = URL(string: path) ?? URL(string: "https://example.com/")! if !url.absoluteString.starts(with: AppInfo.scheme) { if client.isAuth && client.hasConnection(with: url) { - guard let actionType = urlPath.getActionType() else { fatalError("Couldn't get URLNav actionType") } + guard let actionType = urlPath.getActionType() else { + print("Couldn't get URLNav actionType") + self.presentedSheet = .safari(url: url) + return .handled + } let server: String = urlPath.host() ?? client.server + // TODO: If "nil" do global search + print("actionType: \(actionType)") if actionType == .account { diff --git a/Bubble/Views/Profile/ProfileView.swift b/Bubble/Views/Profile/ProfileView.swift index 64c83d2..7a2f766 100644 --- a/Bubble/Views/Profile/ProfileView.swift +++ b/Bubble/Views/Profile/ProfileView.swift @@ -602,6 +602,8 @@ struct ProfileView: View { .font(.caption) .foregroundStyle(!isSubClub ? Color.gray : Color.subClub) .multilineTextAlignment(.leading) + .lineLimit(1) + .minimumScaleFactor(0.7) .pill(tint: !isSubClub ? Color(uiColor: UIColor.label) : Color.subClub) } .disabled(!isSubClub) @@ -620,6 +622,8 @@ struct ProfileView: View { .font(.caption) .foregroundStyle(!isSubClub ? Color.gray : Color.subClub) .multilineTextAlignment(.leading) + .lineLimit(1) + .minimumScaleFactor(0.7) .pill(tint: !isSubClub ? Color(uiColor: UIColor.label) : Color.subClub) } .disabled(!isSubClub) @@ -636,6 +640,8 @@ struct ProfileView: View { .font(.caption) .foregroundStyle(!isSubClub ? Color.gray : Color.subClub) .multilineTextAlignment(.leading) + .lineLimit(1) + .minimumScaleFactor(0.7) .pill() } .disabled(!isSubClub) diff --git a/Bubble/Views/Settings/UpdateView.swift b/Bubble/Views/Settings/UpdateView.swift index 1a75eb9..2beab56 100644 --- a/Bubble/Views/Settings/UpdateView.swift +++ b/Bubble/Views/Settings/UpdateView.swift @@ -39,11 +39,11 @@ struct UpdateView: View { var features: some View { VStack(spacing: 60) { - newFeature(systemImage: "figure.child.and.lock.fill", title: "Follow request", text: "A proper follow request button is available on private accounts") - - newFeature(imageName: "SubClubMark", title: "sub.club", text: "A full sub.club integration was made in collaboration with them! Thank you!") + newFeature(systemImage: "person.text.rectangle.fill", title: "QRT but for Bubble", text: "Bubble finally displays quote posts properly!") newFeature(systemImage: "decrease.quotelevel", title: "Post overhaul", text: "Posts and replies are looking fancier than ever before!") + + newFeature(systemImage: "wrench.and.screwdriver", title: "A ton of fixes!", text: "A lot of organisation and debugging has been made to give you the best experience!") } .frame(height: 500) } diff --git a/Bubble/Views/Tabs/DiscoveryView.swift b/Bubble/Views/Tabs/DiscoveryView.swift index b67eb0b..1a9e67a 100644 --- a/Bubble/Views/Tabs/DiscoveryView.swift +++ b/Bubble/Views/Tabs/DiscoveryView.swift @@ -99,7 +99,7 @@ struct DiscoveryView: View { var accountsView: some View { ScrollView(.horizontal, showsIndicators: false) { - LazyHStack(spacing: 10) { + LazyHStack(spacing: 7.5) { ForEach(suggestedAccounts) { account in VStack { ProfilePicture(url: account.avatar, size: 64) @@ -174,8 +174,11 @@ struct DiscoveryView: View { } var statusView: some View { - VStack(spacing: 7.5) { + VStack(spacing: 1.5) { ForEach(trendingStatuses) { status in + Divider() + .frame(maxWidth: .infinity) + CompactPostView(status: status) .padding(.vertical) .environmentObject(navigator)