Fix various project warnings

This commit is contained in:
Stefan Ceriu
2026-07-03 16:01:32 +03:00
parent 2815b52f49
commit b8e6421551
6 changed files with 10 additions and 9 deletions
@@ -80,7 +80,7 @@ class LinkNewDeviceScreenViewModel: LinkNewDeviceScreenViewModelType, LinkNewDev
state.mode = .readyToLink(.idle)
return
case .error:
// TODO: Failure UX is pending product confirmation; using the generic error state for now.
// TODO: @pixlwave Failure UX is pending product confirmation; using the generic error state for now.
state.mode = .error(.unknown)
return
}
@@ -135,7 +135,8 @@ class SearchScreenViewModel: SearchScreenViewModelType, SearchScreenViewModelPro
} else {
roomSummaryProvider.setFilter(.search(query: searchQuery))
setQueryTask = Task { [weak self] in
await self?.searchService.setQuery(searchQuery)
// TODO: @stefanceriu Surface set query errors
_ = await self?.searchService.setQuery(searchQuery)
}
}
}
@@ -20,7 +20,7 @@ struct ContentScannerServiceTests {
#expect(service.scanResultFromSource(source) == nil, "A source should not have a verdict before being scanned.")
let result = await service.loadScanResultFromSource(source)
#expect(try result.get() == true) // swiftlint:disable:this force_try
#expect(try result.get() == true)
#expect(service.scanResultFromSource(source) == true)
@@ -37,7 +37,7 @@ struct ContentScannerServiceTests {
let source = makeSource("1")
let result = await service.loadScanResultFromSource(source)
#expect(try result.get() == false) // swiftlint:disable:this force_try
#expect(try result.get() == false)
#expect(service.scanResultFromSource(source) == false)
@@ -79,7 +79,7 @@ struct ContentScannerServiceTests {
proxy.scanMediaSourceReturnValue = .success(true)
result = await service.loadScanResultFromSource(source)
#expect(try result.get() == true) // swiftlint:disable:this force_try
#expect(try result.get() == true)
#expect(proxy.scanMediaSourceCallsCount == 2)
}
@@ -32,7 +32,7 @@ struct MessageForwardingScreenViewModelTests {
@Test
func initialState() {
#expect(!context.viewState.rooms.contains(where: { $0.id == forwardingItem.roomID }), "The source room ID shouldn't be shown")
#expect(!context.viewState.rooms.contains { $0.id == forwardingItem.roomID }, "The source room ID shouldn't be shown")
}
@Test
@@ -41,7 +41,7 @@ struct RoomChangeRolesScreenViewModelTests {
#expect(context.viewState.moderators == context.viewState.visibleModerators)
#expect(context.viewState.users == context.viewState.visibleUsers)
#expect(context.viewState.membersWithRole.count == 3)
#expect(context.viewState.membersWithRole.contains(where: { $0.id == RoomMemberProxyMock.mockModerator.userID }))
#expect(context.viewState.membersWithRole.contains { $0.id == RoomMemberProxyMock.mockModerator.userID })
#expect(!context.viewState.hasChanges)
#expect(!context.viewState.isSearching)
}
@@ -8,7 +8,7 @@
import SwiftUI
// TODO: Check if the primitive style is actually needed now the insets are part of ListRow.
// TODO: @pixlwave Check if the primitive style is actually needed now the insets are part of ListRow.
// It might still be useful for ListRow(kind: .custom) usage?
/// Default button styling for list rows.
@@ -35,7 +35,7 @@ public struct ListRowButtonStyle: PrimitiveButtonStyle {
// MARK: - Previews
// TODO: Fix the previews, either the style should expand the label to fill or
// TODO: @pixlwave Fix the previews, either the style should expand the label to fill or
// the previews need to do this manually for demonstration purposes.
public struct ListRowButtonStyle_Previews: PreviewProvider, TestablePreview {