Run SwiftFormat.

This commit is contained in:
Doug
2026-05-27 14:38:50 +01:00
committed by Doug
parent 5138e05e47
commit fa67713726
573 changed files with 2426 additions and 2426 deletions
@@ -44,7 +44,7 @@ final class RoomPollsHistoryScreenCoordinator: CoordinatorProtocol {
}
.store(in: &cancellables)
}
func toPresentable() -> AnyView {
AnyView(RoomPollsHistoryScreen(context: viewModel.context))
}
@@ -33,7 +33,7 @@ struct RoomPollsHistoryScreenViewState: BindableState {
struct RoomPollsHistoryScreenViewStateBindings {
/// Polls list filter
var filter: RoomPollsHistoryFilter
/// Information describing the currently displayed alert.
var alertInfo: AlertInfo<RoomPollsHistoryScreenErrorType>?
}
@@ -30,7 +30,7 @@ class RoomPollsHistoryScreenViewModel: RoomPollsHistoryScreenViewModelType, Room
var actions: AnyPublisher<RoomPollsHistoryScreenViewModelAction, Never> {
actionsSubject.eraseToAnyPublisher()
}
init(pollInteractionHandler: PollInteractionHandlerProtocol,
timelineController: TimelineControllerProtocol,
userIndicatorController: UserIndicatorControllerProtocol) {
@@ -103,7 +103,7 @@ class RoomPollsHistoryScreenViewModel: RoomPollsHistoryScreenViewModelType, Room
private func displayError(message: String) {
state.bindings.alertInfo = .init(id: .alert, title: message)
}
// MARK: - Poll Interaction Handler
private func endPoll(pollStartID: String) {
@@ -162,7 +162,7 @@ class RoomPollsHistoryScreenViewModel: RoomPollsHistoryScreenViewModelType, Room
guard paginateBackwardsTask == nil else {
return
}
paginateBackwardsTask = Task { [weak self] in
guard let self else {
return
@@ -122,7 +122,7 @@ struct RoomPollsHistoryScreen_Previews: PreviewProvider, TestablePreview {
timelineController: timelineController,
userIndicatorController: UserIndicatorControllerMock())
}()
static let viewModel: RoomPollsHistoryScreenViewModel = {
let timelineController = MockTimelineController()
@@ -131,25 +131,25 @@ struct RoomPollsHistoryScreen_Previews: PreviewProvider, TestablePreview {
PollRoomTimelineItem.mock(poll: .emptyDisclosed, isEditable: true)]
timelineController.timelineItems = polls
for i in 0..<polls.count {
let item = polls[i]
let date: Date! = DateComponents(calendar: .current, timeZone: .gmt, year: 2023, month: 12, day: 1 + i, hour: 12).date
timelineController.timelineItemsTimestamp[item.id] = date
}
let roomProxyMockConfiguration = JoinedRoomProxyMockConfiguration(name: "Polls", timelineStartReached: true)
return RoomPollsHistoryScreenViewModel(pollInteractionHandler: PollInteractionHandlerMock(),
timelineController: timelineController,
userIndicatorController: UserIndicatorControllerMock())
}()
static var previews: some View {
ElementNavigationStack {
RoomPollsHistoryScreen(context: viewModelEmpty.context)
}
.previewDisplayName("No polls")
ElementNavigationStack {
RoomPollsHistoryScreen(context: viewModel.context)
}