mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Compound - Swift 6.2 and Main actor isolation (#5109)
* compound is now using 6.2 and main actor isolation + some tweaks to make it build tests and EX * better handling of the nonisolated context for CompoundUIColors * improving docs * fix comment * remove unused Sendable conformance
This commit is contained in:
@@ -243,6 +243,7 @@ private struct VerifiedUserSendFailureView: View {
|
||||
}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
private extension EncryptionAuthenticity {
|
||||
var foregroundStyle: SwiftUI.Color {
|
||||
switch color {
|
||||
|
||||
@@ -16,10 +16,10 @@ extension View {
|
||||
/// - color: self explanatory, defaults to subtle secondary
|
||||
func bubbleBackground(isOutgoing: Bool = true,
|
||||
insets: EdgeInsets = .init(top: 8, leading: 12, bottom: 8, trailing: 12),
|
||||
color: Color? = .compound.bgSubtleSecondary) -> some View {
|
||||
color: @autoclosure @MainActor () -> Color? = .compound.bgSubtleSecondary) -> some View {
|
||||
modifier(TimelineItemBubbleBackgroundModifier(isOutgoing: isOutgoing,
|
||||
insets: insets,
|
||||
color: color))
|
||||
color: color()))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -238,6 +238,7 @@ struct TimelineItemBubbledStylerView<Content: View>: View {
|
||||
}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
private extension EventBasedTimelineItemProtocol {
|
||||
var bubbleBackgroundColor: Color? {
|
||||
let defaultColor: Color = isOutgoing ? .compound._bgBubbleOutgoing : .compound._bgBubbleIncoming
|
||||
|
||||
@@ -112,6 +112,7 @@ private struct TimelineItemSendInfoLabel: View {
|
||||
}
|
||||
|
||||
/// All the data needed to render a timeline item's send info label.
|
||||
@MainActor
|
||||
private struct TimelineItemSendInfo {
|
||||
enum Status {
|
||||
case sendingFailed
|
||||
@@ -185,6 +186,7 @@ private extension TimelineItemSendInfo {
|
||||
}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
private extension EncryptionAuthenticity {
|
||||
var foregroundStyle: SwiftUI.Color {
|
||||
switch color {
|
||||
|
||||
Reference in New Issue
Block a user