RoomCoordinator: Add setup completion on start methods to fit LegacyAppDelegate calls.

This commit is contained in:
SBiOSoftWhare
2021-10-05 17:35:15 +02:00
parent 372eb463bd
commit 87f27c7575
5 changed files with 44 additions and 28 deletions
@@ -29,5 +29,20 @@ protocol RoomCoordinatorDelegate: AnyObject {
protocol RoomCoordinatorProtocol: Coordinator, Presentable, RoomIdentifiable {
var delegate: RoomCoordinatorDelegate? { get }
// Indicate if the underlying RoomDataSource can be released
var canReleaseRoomDataSource: Bool { get }
/// Start the Coordinator with a setup completion.
/// NOTE: Completion closure has been added for legacy architecture purpose.
/// Remove this completion after LegacyAppDelegate refactor.
/// - Parameters:
/// - completion: called when the RoomDataSource has finish to load.
func start(withCompletion completion: (() -> Void)?)
/// Use this method when the room screen is already shown and you want to go to a specific event.
/// i.e User tap on push notification message for the current displayed room
/// - Parameters:
/// - eventId: The id of the event to display.
/// - completion: called when the RoomDataSource has finish to load.
func start(withEventId eventId: String, completion: (() -> Void)?)
}