diff --git a/RiotSwiftUI/Modules/Room/PollHistory/PollHistoryViewModel.swift b/RiotSwiftUI/Modules/Room/PollHistory/PollHistoryViewModel.swift index dae1ee197b..eed1e6c6cf 100644 --- a/RiotSwiftUI/Modules/Room/PollHistory/PollHistoryViewModel.swift +++ b/RiotSwiftUI/Modules/Room/PollHistory/PollHistoryViewModel.swift @@ -49,7 +49,7 @@ private extension PollHistoryViewModel { state.isLoading = true pollService - .next() + .nextBatch() .collect() .sink { [weak self] _ in #warning("Handle errors") diff --git a/RiotSwiftUI/Modules/Room/PollHistory/Service/Mock/MockPollHistoryService.swift b/RiotSwiftUI/Modules/Room/PollHistory/Service/Mock/MockPollHistoryService.swift index 9cfa8da3b6..142b65d7e0 100644 --- a/RiotSwiftUI/Modules/Room/PollHistory/Service/Mock/MockPollHistoryService.swift +++ b/RiotSwiftUI/Modules/Room/PollHistory/Service/Mock/MockPollHistoryService.swift @@ -32,7 +32,7 @@ final class MockPollHistoryService: PollHistoryServiceProtocol { .setFailureType(to: Error.self) .eraseToAnyPublisher() - func next() -> AnyPublisher { + func nextBatch() -> AnyPublisher { nextPublisher } } diff --git a/RiotSwiftUI/Modules/Room/PollHistory/Service/PollHistoryServiceProtocol.swift b/RiotSwiftUI/Modules/Room/PollHistory/Service/PollHistoryServiceProtocol.swift index 3458c3d64a..637ba393f8 100644 --- a/RiotSwiftUI/Modules/Room/PollHistory/Service/PollHistoryServiceProtocol.swift +++ b/RiotSwiftUI/Modules/Room/PollHistory/Service/PollHistoryServiceProtocol.swift @@ -1,4 +1,4 @@ -// +// // Copyright 2023 New Vector Ltd // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,13 +18,13 @@ import Combine protocol PollHistoryServiceProtocol { /// Returns a Publisher publishing the polls in the next batch. - /// Implementations should return the same publisher if `next()` is called again before the previous publisher completes. - func next() -> AnyPublisher + /// Implementations should return the same publisher if `nextBatch()` is called again before the previous publisher completes. + func nextBatch() -> AnyPublisher - /// Publishes updates for the polls previously pusblished by the `next()` publishers. + /// Publishes updates for the polls previously pusblished by the `nextBatch()` publishers. var updates: AnyPublisher { get } /// Publishes errors regarding poll aggregations. - /// Note: `next()` will continue to publish new polls even if some poll isn't being aggregated correctly. + /// Note: `nextBatch()` will continue to publish new polls even if some poll isn't being aggregated correctly. var pollErrors: AnyPublisher { get } }