2023-05-18 12:45:34 +03:00
//
2024-09-06 16:34:30 +03:00
// C o p y r i g h t 2 0 2 3 , 2 0 2 4 N e w V e c t o r L t d .
2023-05-18 12:45:34 +03:00
//
2025-01-06 11:27:37 +01:00
// S P D X - L i c e n s e - I d e n t i f i e r : A G P L - 3 . 0 - o n l y O R L i c e n s e R e f - E l e m e n t - C o m m e r c i a l
// P l e a s e s e e L I C E N S E f i l e s i n t h e r e p o s i t o r y r o o t f o r f u l l d e t a i l s .
2023-05-18 12:45:34 +03:00
//
import XCTest
import Combine
@ testable import ElementX
@ MainActor
class RoomFlowCoordinatorTests : XCTestCase {
2024-04-19 17:04:18 +03:00
var clientProxy : ClientProxyMock !
2025-02-03 14:14:01 +00:00
var timelineControllerFactory : TimelineControllerFactoryMock !
2023-05-18 12:45:34 +03:00
var roomFlowCoordinator : RoomFlowCoordinator !
var navigationStackCoordinator : NavigationStackCoordinator !
2023-09-14 12:53:33 +03:00
var cancellables = Set < AnyCancellable > ( )
2023-05-18 12:45:34 +03:00
2023-07-27 12:38:48 +01:00
func testRoomPresentation ( ) async throws {
2024-04-19 17:04:18 +03:00
await setupRoomFlowCoordinator ( )
2024-04-04 11:30:38 +01:00
2024-05-09 12:25:54 +01:00
try await process ( route : . room ( roomID : " 1 " , via : [ ] ) )
2023-05-18 12:45:34 +03:00
XCTAssert ( navigationStackCoordinator . rootCoordinator is RoomScreenCoordinator )
2024-04-19 17:04:18 +03:00
try await clearRoute ( expectedActions : [ . finished ] )
2023-05-18 12:45:34 +03:00
XCTAssertNil ( navigationStackCoordinator . rootCoordinator )
}
2023-07-27 12:38:48 +01:00
func testRoomDetailsPresentation ( ) async throws {
2024-04-19 17:04:18 +03:00
await setupRoomFlowCoordinator ( )
2024-04-04 11:30:38 +01:00
2024-03-27 10:56:58 +00:00
try await process ( route : . roomDetails ( roomID : " 1 " ) )
2023-05-31 18:24:12 +02:00
XCTAssert ( navigationStackCoordinator . rootCoordinator is RoomDetailsScreenCoordinator )
2023-05-18 12:45:34 +03:00
2024-04-19 17:04:18 +03:00
try await clearRoute ( expectedActions : [ . finished ] )
2023-05-18 12:45:34 +03:00
XCTAssertNil ( navigationStackCoordinator . rootCoordinator )
}
2023-07-27 12:38:48 +01:00
func testNoOp ( ) async throws {
2024-04-19 17:04:18 +03:00
await setupRoomFlowCoordinator ( )
2024-04-04 11:30:38 +01:00
2024-03-27 10:56:58 +00:00
try await process ( route : . roomDetails ( roomID : " 1 " ) )
2023-05-31 18:24:12 +02:00
XCTAssert ( navigationStackCoordinator . rootCoordinator is RoomDetailsScreenCoordinator )
2024-03-27 10:56:58 +00:00
let detailsCoordinator = navigationStackCoordinator . rootCoordinator
2023-06-06 10:03:38 +02:00
roomFlowCoordinator . handleAppRoute ( . roomDetails ( roomID : " 1 " ) , animated : true )
await Task . yield ( )
2023-05-31 18:24:12 +02:00
XCTAssert ( navigationStackCoordinator . rootCoordinator is RoomDetailsScreenCoordinator )
2024-03-27 10:56:58 +00:00
XCTAssert ( navigationStackCoordinator . rootCoordinator = = = detailsCoordinator )
2023-05-31 18:24:12 +02:00
}
2023-07-27 12:38:48 +01:00
func testPushDetails ( ) async throws {
2024-04-19 17:04:18 +03:00
await setupRoomFlowCoordinator ( )
2024-04-04 11:30:38 +01:00
2024-05-09 12:25:54 +01:00
try await process ( route : . room ( roomID : " 1 " , via : [ ] ) )
2023-05-31 18:24:12 +02:00
XCTAssert ( navigationStackCoordinator . rootCoordinator is RoomScreenCoordinator )
2024-03-27 10:56:58 +00:00
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 0 )
2023-05-31 18:24:12 +02:00
2024-03-27 10:56:58 +00:00
try await process ( route : . roomDetails ( roomID : " 1 " ) )
2023-05-18 12:45:34 +03:00
XCTAssert ( navigationStackCoordinator . rootCoordinator is RoomScreenCoordinator )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 1 )
XCTAssert ( navigationStackCoordinator . stackCoordinators . first is RoomDetailsScreenCoordinator )
2023-05-31 18:24:12 +02:00
}
2024-04-08 16:44:03 +01:00
func testChildRoomFlow ( ) async throws {
2024-04-19 17:04:18 +03:00
await setupRoomFlowCoordinator ( )
2024-04-08 16:44:03 +01:00
2024-05-09 12:25:54 +01:00
try await process ( route : . room ( roomID : " 1 " , via : [ ] ) )
2024-04-08 16:44:03 +01:00
XCTAssert ( navigationStackCoordinator . rootCoordinator is RoomScreenCoordinator )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 0 )
2024-05-09 12:25:54 +01:00
try await process ( route : . childRoom ( roomID : " 2 " , via : [ ] ) )
2024-04-08 16:44:03 +01:00
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 1 )
XCTAssert ( navigationStackCoordinator . stackCoordinators . first is RoomScreenCoordinator )
2024-05-09 12:25:54 +01:00
try await process ( route : . childRoom ( roomID : " 3 " , via : [ ] ) )
2024-04-08 16:44:03 +01:00
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 2 )
XCTAssert ( navigationStackCoordinator . stackCoordinators . first is RoomScreenCoordinator )
XCTAssert ( navigationStackCoordinator . stackCoordinators . last is RoomScreenCoordinator )
2024-04-19 17:04:18 +03:00
try await clearRoute ( expectedActions : [ . finished ] )
2024-04-08 16:44:03 +01:00
XCTAssertNil ( navigationStackCoordinator . rootCoordinator )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 0 )
}
// / T e s t s t h e c h i l d f l o w t e a r d o w n i n i s o l a t i o n o f i t ' s p a r e n t .
2024-04-04 11:30:38 +01:00
func testChildFlowTearDown ( ) async throws {
2024-04-19 17:04:18 +03:00
await setupRoomFlowCoordinator ( asChildFlow : true )
2024-04-04 11:30:38 +01:00
navigationStackCoordinator . setRootCoordinator ( BlankFormCoordinator ( ) )
2024-05-09 12:25:54 +01:00
try await process ( route : . room ( roomID : " 1 " , via : [ ] ) )
2024-04-04 11:30:38 +01:00
try await process ( route : . roomDetails ( roomID : " 1 " ) )
XCTAssertTrue ( navigationStackCoordinator . rootCoordinator is BlankFormCoordinator , " A child room flow should push onto the stack, leaving the root alone. " )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 2 )
XCTAssertTrue ( navigationStackCoordinator . stackCoordinators . first is RoomScreenCoordinator )
XCTAssertTrue ( navigationStackCoordinator . stackCoordinators . last is RoomDetailsScreenCoordinator )
2024-04-19 17:04:18 +03:00
try await clearRoute ( expectedActions : [ . finished ] )
2024-04-04 11:30:38 +01:00
XCTAssertTrue ( navigationStackCoordinator . rootCoordinator is BlankFormCoordinator )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 2 , " A child room flow should leave its parent to clean up the stack. " )
XCTAssertTrue ( navigationStackCoordinator . stackCoordinators . first is RoomScreenCoordinator , " A child room flow should leave its parent to clean up the stack. " )
XCTAssertTrue ( navigationStackCoordinator . stackCoordinators . last is RoomDetailsScreenCoordinator , " A child room flow should leave its parent to clean up the stack. " )
}
2024-04-08 16:44:03 +01:00
func testChildRoomMemberDetails ( ) async throws {
2024-04-19 17:04:18 +03:00
await setupRoomFlowCoordinator ( )
2024-04-08 16:44:03 +01:00
2024-05-09 12:25:54 +01:00
try await process ( route : . room ( roomID : " 1 " , via : [ ] ) )
2024-04-08 16:44:03 +01:00
XCTAssert ( navigationStackCoordinator . rootCoordinator is RoomScreenCoordinator )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 0 )
2024-05-09 12:25:54 +01:00
try await process ( route : . childRoom ( roomID : " 2 " , via : [ ] ) )
2024-04-08 16:44:03 +01:00
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 1 )
XCTAssert ( navigationStackCoordinator . stackCoordinators . first is RoomScreenCoordinator )
try await process ( route : . roomMemberDetails ( userID : RoomMemberProxyMock . mockMe . userID ) )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 2 )
XCTAssert ( navigationStackCoordinator . stackCoordinators . first is RoomScreenCoordinator )
XCTAssert ( navigationStackCoordinator . stackCoordinators . last is RoomMemberDetailsScreenCoordinator )
}
2024-04-09 11:11:14 +01:00
func testChildRoomIgnoresDirectDuplicate ( ) async throws {
2024-04-19 17:04:18 +03:00
await setupRoomFlowCoordinator ( )
2024-04-09 11:11:14 +01:00
2024-05-09 12:25:54 +01:00
try await process ( route : . room ( roomID : " 1 " , via : [ ] ) )
2024-04-09 11:11:14 +01:00
XCTAssert ( navigationStackCoordinator . rootCoordinator is RoomScreenCoordinator )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 0 )
2024-05-09 12:25:54 +01:00
try await process ( route : . childRoom ( roomID : " 1 " , via : [ ] ) )
2024-04-09 11:11:14 +01:00
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 0 ,
" A room flow shouldn't present a direct child for the same room. " )
2024-05-09 12:25:54 +01:00
try await process ( route : . childRoom ( roomID : " 2 " , via : [ ] ) )
2024-04-09 11:11:14 +01:00
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 1 )
XCTAssert ( navigationStackCoordinator . stackCoordinators . first is RoomScreenCoordinator )
2024-05-09 12:25:54 +01:00
try await process ( route : . childRoom ( roomID : " 1 " , via : [ ] ) )
2024-04-09 11:11:14 +01:00
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 2 ,
" Presenting the same room multiple times should be allowed when it's not a direct child of itself. " )
XCTAssert ( navigationStackCoordinator . stackCoordinators . first is RoomScreenCoordinator )
XCTAssert ( navigationStackCoordinator . stackCoordinators . last is RoomScreenCoordinator )
}
2024-04-19 17:04:18 +03:00
func testRoomMembershipInvite ( ) async throws {
await setupRoomFlowCoordinator ( roomType : . invited ( roomID : " InvitedRoomID " ) )
2024-05-09 12:25:54 +01:00
try await process ( route : . room ( roomID : " InvitedRoomID " , via : [ ] ) )
2024-04-19 17:04:18 +03:00
XCTAssert ( navigationStackCoordinator . rootCoordinator is JoinRoomScreenCoordinator )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 0 )
try await clearRoute ( expectedActions : [ . finished ] )
XCTAssertNil ( navigationStackCoordinator . rootCoordinator )
2024-04-23 16:25:05 +03:00
await setupRoomFlowCoordinator ( roomType : . invited ( roomID : " InvitedRoomID " ) )
2024-05-09 12:25:54 +01:00
try await process ( route : . room ( roomID : " InvitedRoomID " , via : [ ] ) )
2024-04-19 17:04:18 +03:00
XCTAssert ( navigationStackCoordinator . rootCoordinator is JoinRoomScreenCoordinator )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 0 )
// " J o i n " t h e r o o m
clientProxy . roomForIdentifierClosure = { _ in
2024-08-20 16:13:27 +03:00
. joined ( JoinedRoomProxyMock ( . init ( ) ) )
2024-04-19 17:04:18 +03:00
}
2024-05-09 12:25:54 +01:00
try await process ( route : . room ( roomID : " InvitedRoomID " , via : [ ] ) )
2024-04-19 17:04:18 +03:00
XCTAssert ( navigationStackCoordinator . rootCoordinator is RoomScreenCoordinator )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 0 )
}
func testChildRoomMembershipInvite ( ) async throws {
await setupRoomFlowCoordinator ( asChildFlow : true , roomType : . invited ( roomID : " InvitedRoomID " ) )
navigationStackCoordinator . setRootCoordinator ( BlankFormCoordinator ( ) )
2024-05-09 12:25:54 +01:00
try await process ( route : . room ( roomID : " InvitedRoomID " , via : [ ] ) )
2024-04-19 17:04:18 +03:00
XCTAssertTrue ( navigationStackCoordinator . rootCoordinator is BlankFormCoordinator , " A child room flow should push onto the stack, leaving the root alone. " )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 1 )
XCTAssertTrue ( navigationStackCoordinator . stackCoordinators . last is JoinRoomScreenCoordinator )
try await clearRoute ( expectedActions : [ . finished ] )
XCTAssertNil ( navigationStackCoordinator . stackCoordinators . last , " A child room flow should remove the join room scren on dismissal " )
2024-04-23 16:25:05 +03:00
await setupRoomFlowCoordinator ( asChildFlow : true , roomType : . invited ( roomID : " InvitedRoomID " ) )
navigationStackCoordinator . setRootCoordinator ( BlankFormCoordinator ( ) )
2024-04-19 17:04:18 +03:00
2024-05-09 12:25:54 +01:00
try await process ( route : . room ( roomID : " InvitedRoomID " , via : [ ] ) )
2024-04-19 17:04:18 +03:00
XCTAssertTrue ( navigationStackCoordinator . rootCoordinator is BlankFormCoordinator , " A child room flow should push onto the stack, leaving the root alone. " )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 1 )
XCTAssertTrue ( navigationStackCoordinator . stackCoordinators . last is JoinRoomScreenCoordinator )
// " J o i n " t h e r o o m
clientProxy . roomForIdentifierClosure = { _ in
2024-08-20 16:13:27 +03:00
. joined ( JoinedRoomProxyMock ( . init ( ) ) )
2024-04-19 17:04:18 +03:00
}
2024-05-09 12:25:54 +01:00
try await process ( route : . room ( roomID : " InvitedRoomID " , via : [ ] ) )
2024-04-19 17:04:18 +03:00
XCTAssertTrue ( navigationStackCoordinator . rootCoordinator is BlankFormCoordinator , " A child room flow should push onto the stack, leaving the root alone. " )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 1 )
XCTAssertTrue ( navigationStackCoordinator . stackCoordinators . last is RoomScreenCoordinator )
}
2024-04-25 18:32:33 +01:00
func testEventRoute ( ) async throws {
await setupRoomFlowCoordinator ( )
2024-05-09 12:25:54 +01:00
try await process ( route : . event ( eventID : " 1 " , roomID : " 1 " , via : [ ] ) )
2024-04-25 18:32:33 +01:00
XCTAssert ( navigationStackCoordinator . rootCoordinator is RoomScreenCoordinator )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 0 )
2024-05-09 12:25:54 +01:00
try await process ( route : . childEvent ( eventID : " 2 " , roomID : " 1 " , via : [ ] ) )
2024-04-25 18:32:33 +01:00
XCTAssert ( navigationStackCoordinator . rootCoordinator is RoomScreenCoordinator )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 0 )
2024-05-09 12:25:54 +01:00
try await process ( route : . childEvent ( eventID : " 3 " , roomID : " 2 " , via : [ ] ) )
2024-04-25 18:32:33 +01:00
XCTAssert ( navigationStackCoordinator . rootCoordinator is RoomScreenCoordinator )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 1 )
XCTAssert ( navigationStackCoordinator . stackCoordinators . first is RoomScreenCoordinator )
}
2024-11-21 14:48:38 +00:00
func testShareMediaRoute ( ) async throws {
2024-11-13 14:02:47 +02:00
await setupRoomFlowCoordinator ( )
try await process ( route : . room ( roomID : " 1 " , via : [ ] ) )
XCTAssert ( navigationStackCoordinator . rootCoordinator is RoomScreenCoordinator )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 0 )
let sharePayload : ShareExtensionPayload = . mediaFile ( roomID : " 1 " , mediaFile : . init ( url : . picturesDirectory , suggestedName : nil ) )
try await process ( route : . share ( sharePayload ) )
XCTAssert ( navigationStackCoordinator . rootCoordinator is RoomScreenCoordinator )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 0 )
XCTAssertTrue ( ( navigationStackCoordinator . sheetCoordinator as ? NavigationStackCoordinator ) ? . rootCoordinator is MediaUploadPreviewScreenCoordinator )
try await process ( route : . childRoom ( roomID : " 2 " , via : [ ] ) )
XCTAssertNil ( navigationStackCoordinator . sheetCoordinator )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 1 )
try await process ( route : . share ( sharePayload ) )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 0 )
XCTAssertTrue ( ( navigationStackCoordinator . sheetCoordinator as ? NavigationStackCoordinator ) ? . rootCoordinator is MediaUploadPreviewScreenCoordinator )
}
2024-11-21 14:48:38 +00:00
func testShareTextRoute ( ) async throws {
await setupRoomFlowCoordinator ( )
try await process ( route : . room ( roomID : " 1 " , via : [ ] ) )
XCTAssert ( navigationStackCoordinator . rootCoordinator is RoomScreenCoordinator )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 0 )
let sharePayload : ShareExtensionPayload = . text ( roomID : " 1 " , text : " Important text " )
try await process ( route : . share ( sharePayload ) )
XCTAssert ( navigationStackCoordinator . rootCoordinator is RoomScreenCoordinator )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 0 )
XCTAssertNil ( navigationStackCoordinator . sheetCoordinator , " The media upload sheet shouldn't be shown when sharing text. " )
try await process ( route : . childRoom ( roomID : " 2 " , via : [ ] ) )
XCTAssertNil ( navigationStackCoordinator . sheetCoordinator )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 1 )
try await process ( route : . share ( sharePayload ) )
XCTAssertEqual ( navigationStackCoordinator . stackCoordinators . count , 0 )
XCTAssertNil ( navigationStackCoordinator . sheetCoordinator , " The media upload sheet shouldn't be shown when sharing text. " )
}
2023-05-18 12:45:34 +03:00
// MARK: - P r i v a t e
2024-03-27 10:56:58 +00:00
private func process ( route : AppRoute ) async throws {
roomFlowCoordinator . handleAppRoute ( route , animated : true )
2024-04-10 16:29:30 +03:00
// A s i n g l e y i e l d i s n ' t e n o u g h w h e n c r e a t i n g t h e n e w f l o w c o o r d i n a t o r .
try await Task . sleep ( for : . milliseconds ( 100 ) )
2024-03-27 10:56:58 +00:00
}
2024-04-19 17:04:18 +03:00
private func clearRoute ( expectedActions : [ RoomFlowCoordinatorAction ] ) async throws {
try await processRouteOrClear ( route : nil , expectedActions : expectedActions )
2023-06-06 10:03:38 +02:00
}
2023-07-27 12:38:48 +01:00
private func process ( route : AppRoute , expectedActions : [ RoomFlowCoordinatorAction ] ) async throws {
2024-04-19 17:04:18 +03:00
try await processRouteOrClear ( route : route , expectedActions : expectedActions )
}
private func processRouteOrClear ( route : AppRoute ? , expectedActions : [ RoomFlowCoordinatorAction ] ) async throws {
2023-09-26 13:28:29 +03:00
guard ! expectedActions . isEmpty else {
return
}
var fulfillments = [ DeferredFulfillment < RoomFlowCoordinatorAction > ] ( )
2023-07-27 12:38:48 +01:00
2023-09-26 13:28:29 +03:00
for expectedAction in expectedActions {
fulfillments . append ( deferFulfillment ( roomFlowCoordinator . actions ) { action in
action = = expectedAction
} )
2023-05-31 18:24:12 +02:00
}
2024-04-19 17:04:18 +03:00
if let route {
roomFlowCoordinator . handleAppRoute ( route , animated : true )
} else {
roomFlowCoordinator . clearRoute ( animated : true )
}
2023-09-26 13:28:29 +03:00
for fulfillment in fulfillments {
try await fulfillment . fulfill ( )
2023-05-31 18:24:12 +02:00
}
2023-05-18 12:45:34 +03:00
}
2024-04-04 11:30:38 +01:00
2024-04-19 17:04:18 +03:00
private func setupRoomFlowCoordinator ( asChildFlow : Bool = false , roomType : RoomType ? = nil ) async {
2024-04-04 11:30:38 +01:00
cancellables . removeAll ( )
2024-04-19 17:04:18 +03:00
clientProxy = ClientProxyMock ( . init ( userID : " hi@bob " , roomSummaryProvider : RoomSummaryProviderMock ( . init ( state : . loaded ( . mockRooms ) ) ) ) )
2025-02-03 14:14:01 +00:00
timelineControllerFactory = TimelineControllerFactoryMock ( . init ( ) )
2024-04-19 17:04:18 +03:00
2024-05-20 14:37:45 +02:00
clientProxy . roomPreviewForIdentifierViaClosure = { [ roomType ] roomID , _ in
2024-04-19 17:04:18 +03:00
switch roomType {
case . invited :
2025-01-20 19:07:11 +02:00
return . success ( RoomPreviewProxyMock . invited ( roomID : roomID ) )
2024-04-19 17:04:18 +03:00
default :
fatalError ( " Something isn't set up right " )
}
}
2024-04-04 11:30:38 +01:00
let navigationSplitCoordinator = NavigationSplitCoordinator ( placeholderCoordinator : PlaceholderScreenCoordinator ( ) )
navigationStackCoordinator = NavigationStackCoordinator ( )
navigationSplitCoordinator . setDetailCoordinator ( navigationStackCoordinator )
2024-04-19 17:04:18 +03:00
let roomID = switch roomType {
case . invited ( let roomID ) :
roomID
default :
" 1 "
}
roomFlowCoordinator = await RoomFlowCoordinator ( roomID : roomID ,
2024-05-27 14:44:15 +03:00
userSession : UserSessionMock ( . init ( clientProxy : clientProxy ) ) ,
2024-04-04 11:30:38 +01:00
isChildFlow : asChildFlow ,
2025-02-03 14:14:01 +00:00
timelineControllerFactory : timelineControllerFactory ,
2024-04-04 11:30:38 +01:00
navigationStackCoordinator : navigationStackCoordinator ,
2024-10-25 19:58:56 +03:00
emojiProvider : EmojiProvider ( appSettings : ServiceLocator . shared . settings ) ,
2024-08-21 17:48:57 +01:00
ongoingCallRoomIDPublisher : . init ( . init ( nil ) ) ,
2024-04-19 13:59:15 +03:00
appMediator : AppMediatorMock . default ,
2024-04-04 11:30:38 +01:00
appSettings : ServiceLocator . shared . settings ,
analytics : ServiceLocator . shared . analytics ,
2024-04-22 18:10:24 +03:00
userIndicatorController : ServiceLocator . shared . userIndicatorController )
2024-04-04 11:30:38 +01:00
}
2023-05-18 12:45:34 +03:00
}
2024-04-19 17:04:18 +03:00
private enum RoomType {
case invited ( roomID : String )
}