Quote + Fixes
This commit is contained in:
parent
8503ebc12a
commit
383cdea42d
|
@ -116,8 +116,9 @@ struct CompactPostView: View {
|
||||||
if !status.content.asRawText.isEmpty {
|
if !status.content.asRawText.isEmpty {
|
||||||
TextEmoji(status.content, emojis: status.emojis, language: status.language)
|
TextEmoji(status.content, emojis: status.emojis, language: status.language)
|
||||||
.multilineTextAlignment(.leading)
|
.multilineTextAlignment(.leading)
|
||||||
.frame(width: quoted ? 250 : 300, alignment: .topLeading)
|
.frame(width: quoted ? 180 : 300, alignment: .topLeading)
|
||||||
.lineLimit(quoted ? 3 : nil)
|
.frame(maxHeight: 140)
|
||||||
|
// .lineLimit(quoted ? 3 : nil)
|
||||||
.fixedSize(horizontal: false, vertical: true)
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
.font(quoted ? .caption : .callout)
|
.font(quoted ? .caption : .callout)
|
||||||
.contentShape(Rectangle())
|
.contentShape(Rectangle())
|
||||||
|
@ -126,21 +127,22 @@ struct CompactPostView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if !quoted {
|
if !quoted {
|
||||||
if status.poll != nil {
|
if status.poll != nil {
|
||||||
PostPoll(poll: status.poll!)
|
PostPoll(poll: status.poll!)
|
||||||
}
|
}
|
||||||
|
|
||||||
if status.card != nil && status.mediaAttachments.isEmpty && !hasQuote {
|
if status.card != nil && status.mediaAttachments.isEmpty && !hasQuote {
|
||||||
PostCardView(card: status.card!)
|
PostCardView(card: status.card!)
|
||||||
}
|
}
|
||||||
|
|
||||||
attachmnts
|
attachmnts
|
||||||
// }
|
}
|
||||||
|
|
||||||
if hasQuote && !quoted {
|
if hasQuote && !quoted {
|
||||||
if quoteStatus != nil {
|
if quoteStatus != nil {
|
||||||
QuotePostView(status: quoteStatus!)
|
QuotePostView(status: quoteStatus!)
|
||||||
|
.frame(maxWidth: 250, maxHeight: 200, alignment: .leading)
|
||||||
} else {
|
} else {
|
||||||
ProgressView()
|
ProgressView()
|
||||||
.progressViewStyle(.circular)
|
.progressViewStyle(.circular)
|
||||||
|
|
|
@ -9,8 +9,7 @@ struct QuotePostView: View {
|
||||||
var body: some View {
|
var body: some View {
|
||||||
CompactPostView(status: status, quoted: true)
|
CompactPostView(status: status, quoted: true)
|
||||||
.frame(maxWidth: 250, maxHeight: 200)
|
.frame(maxWidth: 250, maxHeight: 200)
|
||||||
.padding(15)
|
.padding(7.5)
|
||||||
.padding([.horizontal], 20)
|
|
||||||
.overlay(
|
.overlay(
|
||||||
RoundedRectangle(cornerRadius: 15)
|
RoundedRectangle(cornerRadius: 15)
|
||||||
.stroke(.gray.opacity(0.3), lineWidth: 1)
|
.stroke(.gray.opacity(0.3), lineWidth: 1)
|
||||||
|
|
|
@ -109,7 +109,7 @@ struct SearchResultView: View {
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
// do stuff
|
navigator.navigate(to: .timeline(timeline: .hashtag(tag: tag.name, accountId: nil)))
|
||||||
} label: {
|
} label: {
|
||||||
Text("tag.read")
|
Text("tag.read")
|
||||||
}
|
}
|
||||||
|
@ -123,6 +123,9 @@ struct SearchResultView: View {
|
||||||
var statusesView: some View {
|
var statusesView: some View {
|
||||||
VStack(spacing: 7.5) {
|
VStack(spacing: 7.5) {
|
||||||
ForEach(searchResults.statuses) { status in
|
ForEach(searchResults.statuses) { status in
|
||||||
|
Divider()
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
|
||||||
CompactPostView(status: status)
|
CompactPostView(status: status)
|
||||||
.padding(.vertical)
|
.padding(.vertical)
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,9 @@ class FetchTimeline {
|
||||||
|
|
||||||
public func addStatuses(lastStatusIndex: Int) async -> [Status] {
|
public func addStatuses(lastStatusIndex: Int) async -> [Status] {
|
||||||
// print("i: \(lastStatusIndex)\ndatasource-6: \(self.datasource.count - 6)")
|
// 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
|
self.statusesState = .loading
|
||||||
let lastStatus = self.datasource.last!
|
let lastStatus = self.datasource.last!
|
||||||
|
|
|
@ -13,9 +13,15 @@ extension Navigator {
|
||||||
let urlPath: URL = URL(string: path) ?? URL(string: "https://example.com/")!
|
let urlPath: URL = URL(string: path) ?? URL(string: "https://example.com/")!
|
||||||
if !url.absoluteString.starts(with: AppInfo.scheme) {
|
if !url.absoluteString.starts(with: AppInfo.scheme) {
|
||||||
if client.isAuth && client.hasConnection(with: url) {
|
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
|
let server: String = urlPath.host() ?? client.server
|
||||||
|
|
||||||
|
// TODO: If "nil" do global search
|
||||||
|
|
||||||
print("actionType: \(actionType)")
|
print("actionType: \(actionType)")
|
||||||
|
|
||||||
if actionType == .account {
|
if actionType == .account {
|
||||||
|
|
|
@ -602,6 +602,8 @@ struct ProfileView: View {
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
.foregroundStyle(!isSubClub ? Color.gray : Color.subClub)
|
.foregroundStyle(!isSubClub ? Color.gray : Color.subClub)
|
||||||
.multilineTextAlignment(.leading)
|
.multilineTextAlignment(.leading)
|
||||||
|
.lineLimit(1)
|
||||||
|
.minimumScaleFactor(0.7)
|
||||||
.pill(tint: !isSubClub ? Color(uiColor: UIColor.label) : Color.subClub)
|
.pill(tint: !isSubClub ? Color(uiColor: UIColor.label) : Color.subClub)
|
||||||
}
|
}
|
||||||
.disabled(!isSubClub)
|
.disabled(!isSubClub)
|
||||||
|
@ -620,6 +622,8 @@ struct ProfileView: View {
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
.foregroundStyle(!isSubClub ? Color.gray : Color.subClub)
|
.foregroundStyle(!isSubClub ? Color.gray : Color.subClub)
|
||||||
.multilineTextAlignment(.leading)
|
.multilineTextAlignment(.leading)
|
||||||
|
.lineLimit(1)
|
||||||
|
.minimumScaleFactor(0.7)
|
||||||
.pill(tint: !isSubClub ? Color(uiColor: UIColor.label) : Color.subClub)
|
.pill(tint: !isSubClub ? Color(uiColor: UIColor.label) : Color.subClub)
|
||||||
}
|
}
|
||||||
.disabled(!isSubClub)
|
.disabled(!isSubClub)
|
||||||
|
@ -636,6 +640,8 @@ struct ProfileView: View {
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
.foregroundStyle(!isSubClub ? Color.gray : Color.subClub)
|
.foregroundStyle(!isSubClub ? Color.gray : Color.subClub)
|
||||||
.multilineTextAlignment(.leading)
|
.multilineTextAlignment(.leading)
|
||||||
|
.lineLimit(1)
|
||||||
|
.minimumScaleFactor(0.7)
|
||||||
.pill()
|
.pill()
|
||||||
}
|
}
|
||||||
.disabled(!isSubClub)
|
.disabled(!isSubClub)
|
||||||
|
|
|
@ -39,11 +39,11 @@ struct UpdateView: View {
|
||||||
|
|
||||||
var features: some View {
|
var features: some View {
|
||||||
VStack(spacing: 60) {
|
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(systemImage: "person.text.rectangle.fill", title: "QRT but for Bubble", text: "Bubble finally displays quote posts properly!")
|
||||||
|
|
||||||
newFeature(imageName: "SubClubMark", title: "sub.club", text: "A full sub.club integration was made in collaboration with them! Thank you!")
|
|
||||||
|
|
||||||
newFeature(systemImage: "decrease.quotelevel", title: "Post overhaul", text: "Posts and replies are looking fancier than ever before!")
|
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)
|
.frame(height: 500)
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,7 @@ struct DiscoveryView: View {
|
||||||
|
|
||||||
var accountsView: some View {
|
var accountsView: some View {
|
||||||
ScrollView(.horizontal, showsIndicators: false) {
|
ScrollView(.horizontal, showsIndicators: false) {
|
||||||
LazyHStack(spacing: 10) {
|
LazyHStack(spacing: 7.5) {
|
||||||
ForEach(suggestedAccounts) { account in
|
ForEach(suggestedAccounts) { account in
|
||||||
VStack {
|
VStack {
|
||||||
ProfilePicture(url: account.avatar, size: 64)
|
ProfilePicture(url: account.avatar, size: 64)
|
||||||
|
@ -174,8 +174,11 @@ struct DiscoveryView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
var statusView: some View {
|
var statusView: some View {
|
||||||
VStack(spacing: 7.5) {
|
VStack(spacing: 1.5) {
|
||||||
ForEach(trendingStatuses) { status in
|
ForEach(trendingStatuses) { status in
|
||||||
|
Divider()
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
|
||||||
CompactPostView(status: status)
|
CompactPostView(status: status)
|
||||||
.padding(.vertical)
|
.padding(.vertical)
|
||||||
.environmentObject(navigator)
|
.environmentObject(navigator)
|
||||||
|
|
Loading…
Reference in New Issue