mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-06 04:18:31 +00:00
vector-im/element-x-ios/issues/53 - Adopt MainActors, dispatch heavy operations do detached tasks and ensure combine publisher call back on the right queue
This commit is contained in:
committed by
Stefan Ceriu
parent
dde7786152
commit
f5890b68a2
@@ -8,6 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
@MainActor
|
||||
protocol EventBriefFactoryProtocol {
|
||||
func eventBriefForMessage(_ message: RoomMessageProtocol?) async -> EventBrief?
|
||||
}
|
||||
|
||||
@@ -98,13 +98,13 @@ class RoomSummary: RoomSummaryProtocol {
|
||||
}
|
||||
|
||||
await withTaskGroup(of: Void.self) { group in
|
||||
group.addTask {
|
||||
group.addTask(priority: .medium) {
|
||||
await self.loadDisplayName()
|
||||
}
|
||||
group.addTask {
|
||||
group.addTask(priority: .medium) {
|
||||
await self.loadAvatar()
|
||||
}
|
||||
group.addTask {
|
||||
group.addTask(priority: .medium) {
|
||||
await self.loadLastMessage()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ enum RoomSummaryCallback {
|
||||
case updatedData
|
||||
}
|
||||
|
||||
@MainActor
|
||||
protocol RoomSummaryProtocol {
|
||||
var id: String { get }
|
||||
var name: String? { get }
|
||||
|
||||
Reference in New Issue
Block a user