RoomList : fix sample compilation
This commit is contained in:
parent
85a0ef3677
commit
3983670f8d
1 changed files with 22 additions and 15 deletions
|
|
@ -30,6 +30,7 @@ import io.element.android.features.roomlist.impl.datasource.RoomListDataSource
|
||||||
import io.element.android.features.roomlist.impl.datasource.RoomListRoomSummaryFactory
|
import io.element.android.features.roomlist.impl.datasource.RoomListRoomSummaryFactory
|
||||||
import io.element.android.features.roomlist.impl.migration.MigrationScreenPresenter
|
import io.element.android.features.roomlist.impl.migration.MigrationScreenPresenter
|
||||||
import io.element.android.features.roomlist.impl.migration.SharedPrefsMigrationScreenStore
|
import io.element.android.features.roomlist.impl.migration.SharedPrefsMigrationScreenStore
|
||||||
|
import io.element.android.features.roomlist.impl.search.RoomListSearchPresenter
|
||||||
import io.element.android.libraries.core.coroutine.CoroutineDispatchers
|
import io.element.android.libraries.core.coroutine.CoroutineDispatchers
|
||||||
import io.element.android.libraries.dateformatter.impl.DateFormatters
|
import io.element.android.libraries.dateformatter.impl.DateFormatters
|
||||||
import io.element.android.libraries.dateformatter.impl.DefaultLastMessageTimestampFormatter
|
import io.element.android.libraries.dateformatter.impl.DefaultLastMessageTimestampFormatter
|
||||||
|
|
@ -71,6 +72,21 @@ class RoomListScreen(
|
||||||
private val featureFlagService = DefaultFeatureFlagService(
|
private val featureFlagService = DefaultFeatureFlagService(
|
||||||
providers = setOf(StaticFeatureFlagProvider())
|
providers = setOf(StaticFeatureFlagProvider())
|
||||||
)
|
)
|
||||||
|
private val roomListRoomSummaryFactory = RoomListRoomSummaryFactory(
|
||||||
|
lastMessageTimestampFormatter = DefaultLastMessageTimestampFormatter(
|
||||||
|
localDateTimeProvider = dateTimeProvider,
|
||||||
|
dateFormatters = dateFormatters
|
||||||
|
),
|
||||||
|
roomLastMessageFormatter = DefaultRoomLastMessageFormatter(
|
||||||
|
sp = stringProvider,
|
||||||
|
roomMembershipContentFormatter = RoomMembershipContentFormatter(
|
||||||
|
matrixClient = matrixClient,
|
||||||
|
sp = stringProvider
|
||||||
|
),
|
||||||
|
profileChangeContentFormatter = ProfileChangeContentFormatter(stringProvider),
|
||||||
|
stateContentFormatter = StateContentFormatter(stringProvider),
|
||||||
|
),
|
||||||
|
)
|
||||||
private val presenter = RoomListPresenter(
|
private val presenter = RoomListPresenter(
|
||||||
client = matrixClient,
|
client = matrixClient,
|
||||||
sessionVerificationService = sessionVerificationService,
|
sessionVerificationService = sessionVerificationService,
|
||||||
|
|
@ -80,21 +96,7 @@ class RoomListScreen(
|
||||||
leaveRoomPresenter = LeaveRoomPresenterImpl(matrixClient, RoomMembershipObserver(), coroutineDispatchers),
|
leaveRoomPresenter = LeaveRoomPresenterImpl(matrixClient, RoomMembershipObserver(), coroutineDispatchers),
|
||||||
roomListDataSource = RoomListDataSource(
|
roomListDataSource = RoomListDataSource(
|
||||||
roomListService = matrixClient.roomListService,
|
roomListService = matrixClient.roomListService,
|
||||||
roomListRoomSummaryFactory = RoomListRoomSummaryFactory(
|
roomListRoomSummaryFactory = roomListRoomSummaryFactory,
|
||||||
lastMessageTimestampFormatter = DefaultLastMessageTimestampFormatter(
|
|
||||||
localDateTimeProvider = dateTimeProvider,
|
|
||||||
dateFormatters = dateFormatters
|
|
||||||
),
|
|
||||||
roomLastMessageFormatter = DefaultRoomLastMessageFormatter(
|
|
||||||
sp = stringProvider,
|
|
||||||
roomMembershipContentFormatter = RoomMembershipContentFormatter(
|
|
||||||
matrixClient = matrixClient,
|
|
||||||
sp = stringProvider
|
|
||||||
),
|
|
||||||
profileChangeContentFormatter = ProfileChangeContentFormatter(stringProvider),
|
|
||||||
stateContentFormatter = StateContentFormatter(stringProvider),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
coroutineDispatchers = coroutineDispatchers,
|
coroutineDispatchers = coroutineDispatchers,
|
||||||
notificationSettingsService = matrixClient.notificationSettingsService(),
|
notificationSettingsService = matrixClient.notificationSettingsService(),
|
||||||
appScope = Singleton.appScope
|
appScope = Singleton.appScope
|
||||||
|
|
@ -110,6 +112,11 @@ class RoomListScreen(
|
||||||
matrixClient = matrixClient,
|
matrixClient = matrixClient,
|
||||||
migrationScreenStore = SharedPrefsMigrationScreenStore(context.getSharedPreferences("migration", Context.MODE_PRIVATE))
|
migrationScreenStore = SharedPrefsMigrationScreenStore(context.getSharedPreferences("migration", Context.MODE_PRIVATE))
|
||||||
),
|
),
|
||||||
|
searchPresenter = RoomListSearchPresenter(
|
||||||
|
roomListService = matrixClient.roomListService,
|
||||||
|
roomSummaryFactory = roomListRoomSummaryFactory,
|
||||||
|
coroutineDispatchers = coroutineDispatchers,
|
||||||
|
),
|
||||||
sessionPreferencesStore = DefaultSessionPreferencesStore(
|
sessionPreferencesStore = DefaultSessionPreferencesStore(
|
||||||
context = context,
|
context = context,
|
||||||
sessionId = matrixClient.sessionId,
|
sessionId = matrixClient.sessionId,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue