Skip to content

Commit 6194763

Browse files
committed
Fix tests
1 parent 18c2bf7 commit 6194763

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

DemoApp/Shared/StreamChatWrapper.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ extension StreamChatWrapper {
138138
}
139139
}
140140

141-
func logOut(completion: @escaping () -> Void) {
141+
func logOut(completion: @escaping @MainActor @Sendable() -> Void) {
142142
guard let client = self.client else {
143143
logClientNotInstantiated()
144144
return

Sources/StreamChatUI/ChatMessageList/Attachments/Gallery/ChatMessageImageGallery+ImagePreview.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,8 @@ extension ChatMessageGalleryView {
9595
from: attachment?.payload,
9696
maxResolutionInPixels: components.imageAttachmentMaxPixels
9797
) { [weak self] _ in
98-
Task { @MainActor in
99-
self?.loadingIndicator.isVisible = false
100-
self?.imageTask = nil
101-
}
98+
self?.loadingIndicator.isVisible = false
99+
self?.imageTask = nil
102100
}
103101

104102
uploadingOverlay.content = content?.uploadingState

Tests/StreamChatTests/Controllers/SearchControllers/UserListController/UserListController_Tests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ final class UserListController_Tests: XCTestCase {
297297
// Simulate `loadNextUsers` call and catch the completion
298298
nonisolated(unsafe) var completionError: Error?
299299
controller.loadNextUsers { error in
300-
XCTAssertNil(error)
301300
completionError = error
302301
}
303302

Tests/StreamChatUITests/Mocks/ChatMessageList/ChatMessageListVCDelegate_Mock.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ChatMessageListVCDelegate_Mock: ChatMessageListVCDelegate {
2222
var shouldLoadPageAroundMessageCallCount = 0
2323
var shouldLoadPageAroundMessageResult: Error?
2424

25-
func chatMessageListVC(_ vc: ChatMessageListVC, shouldLoadPageAroundMessageId messageId: MessageId, _ completion: @escaping ((Error?) -> Void)) {
25+
func chatMessageListVC(_ vc: ChatMessageListVC, shouldLoadPageAroundMessageId messageId: MessageId, _ completion: @escaping @MainActor @Sendable(Error?) -> Void) {
2626
shouldLoadPageAroundMessageCallCount += 1
2727
if let result = shouldLoadPageAroundMessageResult {
2828
completion(result)

0 commit comments

Comments
 (0)