Merge branch 'main' into iOS-18

This commit is contained in:
Thomas Ricouard 2024-07-05 11:42:30 +02:00
commit 76a6462867
4 changed files with 24 additions and 22 deletions

View file

@ -106,6 +106,11 @@ extension StatusEditor {
}
}
}
.alert("alert.error", isPresented: $isErrorDisplayed) {
Button("Ok", action: {})
} message: {
Text(container.error?.localizedDescription ?? "")
}
.overlay(alignment: .bottomTrailing) {
makeAltMarker(container: container)
}
@ -194,11 +199,6 @@ extension StatusEditor {
placeholderView
Text("status.editor.error.upload")
}
.alert("alert.error", isPresented: $isErrorDisplayed) {
Button("Ok", action: {})
} message: {
Text(error.error ?? "")
}
}
private func makeAltMarker(container: MediaContainer) -> some View {

View file

@ -256,25 +256,21 @@ public struct StatusRowCardView: View {
Button {
routerPath.navigate(to: .accountDetailWithAccount(account: account))
} label: {
HStack(alignment: .center, spacing: 8) {
AvatarView(account.avatar, config: .list)
HStack(alignment: .center, spacing: 4) {
Image(systemName: "link")
Text("More from")
AvatarView(account.avatar, config: .boost)
.padding(.top, 2)
HStack(alignment: .firstTextBaseline, spacing: 0) {
Text("More from ")
EmojiTextApp(account.cachedDisplayName, emojis: account.emojis)
.fontWeight(.semibold)
.emojiText.size(Font.scaledFootnoteFont.emojiSize)
.emojiText.baselineOffset(Font.scaledFootnoteFont.emojiBaselineOffset)
}
.font(.scaledFootnote)
.lineLimit(1)
.padding(.top, 3)
Spacer()
Image(systemName: "chevron.right")
}
.padding(.vertical, 4)
.font(.scaledFootnote)
.lineLimit(1)
.padding(.top, 4)
}
.buttonStyle(.plain)
}

View file

@ -222,12 +222,18 @@ public struct TimelineView: View {
Text(timeline.localizedTitle())
.font(.caption)
.foregroundStyle(.secondary)
case .home:
case let .link(url, _):
Text(timeline.localizedTitle())
.font(.headline)
Text(url.host() ?? url.absoluteString)
.font(.caption)
.foregroundStyle(.secondary)
default:
Text(timeline.localizedTitle())
.font(.headline)
Text(client.server)
.font(.caption)
.foregroundStyle(.secondary)
}
}
.accessibilityRepresentation {

View file

@ -303,7 +303,7 @@ extension TimelineViewModel: StatusesFetcher {
}
}
// Fetch pages from the top most status of the tomeline.
// Fetch pages from the top most status of the timeline.
private func fetchNewPagesFrom(latestStatus: String, client: Client) async throws {
canStreamEvents = false
let initialTimeline = timeline