From da92113e43f48a16495b1bcc3e5a2d2918893524 Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 2 Mar 2023 12:33:18 +0100 Subject: [PATCH 01/25] [Architecture] Introduce EntryPoint and use createNode for ParentNode too --- .../io/element/android/x/MainActivity.kt | 10 +-- .../android/x/node/LoggedInFlowNode.kt | 88 +++++++++++++------ .../android/x/node/NotLoggedInFlowNode.kt | 57 +++++++++--- .../io/element/android/x/node/RoomFlowNode.kt | 36 ++++++-- .../io/element/android/x/node/RootFlowNode.kt | 68 ++++++++++---- .../features/login/api/LoginEntryPoint.kt | 21 +++++ .../implementation/DefaultLoginEntryPoint.kt | 33 +++++++ .../{ => implementation}/LoginFlowNode.kt | 44 +++++++--- .../changeserver/ChangeServerEvents.kt | 2 +- .../changeserver/ChangeServerNode.kt | 2 +- .../changeserver/ChangeServerPresenter.kt | 2 +- .../changeserver/ChangeServerState.kt | 2 +- .../changeserver/ChangeServerStateProvider.kt | 2 +- .../changeserver/ChangeServerView.kt | 4 +- .../error/ErrorFormatter.kt | 4 +- .../root/LoginRootEvents.kt | 2 +- .../root/LoginRootNode.kt | 2 +- .../root/LoginRootPresenter.kt | 2 +- .../root/LoginRootScreen.kt | 4 +- .../root/LoginRootState.kt | 2 +- .../root/LoginRootStateProvider.kt | 2 +- .../changeserver/ChangeServerPresenterTest.kt | 2 + .../login/root/LoginRootPresenterTest.kt | 4 + features/onboarding/build.gradle.kts | 8 ++ .../onboarding/api/OnBoardingEntryPoint.kt | 27 ++++++ .../DefaultOnBoardingEntryPoint.kt | 33 +++++++ .../implementation/OnBoardingNode.kt | 56 ++++++++++++ .../{ => implementation}/OnBoardingScreen.kt | 4 +- .../SplashCarouselData.kt | 4 +- .../SplashCarouselDataFactory.kt | 5 +- .../preferences/PreferencesFlowNode.kt | 33 +++++-- .../bugreport/BugReportEntryPoint.kt | 26 ++++++ .../rageshake/bugreport/BugReportNode.kt | 6 +- .../bugreport/DefaultBugReportEntryPoint.kt | 32 +++++++ .../roomlist/api/RoomListEntryPoint.kt | 28 ++++++ .../impl/DefaultRoomListEntryPoint.kt | 33 +++++++ .../{model => impl}/RoomListEvents.kt | 2 +- .../roomlist/{ => impl}/RoomListNode.kt | 12 +-- .../roomlist/{ => impl}/RoomListPresenter.kt | 6 +- .../{model => impl}/RoomListRoomSummary.kt | 2 +- .../RoomListRoomSummaryPlaceholders.kt | 4 +- .../RoomListRoomSummaryProvider.kt | 4 +- .../roomlist/{model => impl}/RoomListState.kt | 2 +- .../{model => impl}/RoomListStateProvider.kt | 2 +- .../roomlist/{ => impl}/RoomListView.kt | 12 +-- .../{ => impl}/components/RoomListTopBar.kt | 4 +- .../{ => impl}/components/RoomSummaryRow.kt | 8 +- .../roomlist/RoomListPresenterTests.kt | 5 +- .../libraries/architecture/EntryPoint.kt | 25 ++++++ .../libraries/architecture/NodeFactories.kt | 14 ++- .../libraries/architecture/NodeInputs.kt | 36 ++++++++ .../designsystem/theme/ElementTheme.kt | 2 +- .../android/samples/minimal/LoginScreen.kt | 4 +- .../android/samples/minimal/RoomListScreen.kt | 4 +- 54 files changed, 674 insertions(+), 164 deletions(-) create mode 100644 features/login/src/main/kotlin/io/element/android/features/login/api/LoginEntryPoint.kt create mode 100644 features/login/src/main/kotlin/io/element/android/features/login/implementation/DefaultLoginEntryPoint.kt rename features/login/src/main/kotlin/io/element/android/features/login/{ => implementation}/LoginFlowNode.kt (60%) rename features/login/src/main/kotlin/io/element/android/features/login/{ => implementation}/changeserver/ChangeServerEvents.kt (91%) rename features/login/src/main/kotlin/io/element/android/features/login/{ => implementation}/changeserver/ChangeServerNode.kt (95%) rename features/login/src/main/kotlin/io/element/android/features/login/{ => implementation}/changeserver/ChangeServerPresenter.kt (97%) rename features/login/src/main/kotlin/io/element/android/features/login/{ => implementation}/changeserver/ChangeServerState.kt (92%) rename features/login/src/main/kotlin/io/element/android/features/login/{ => implementation}/changeserver/ChangeServerStateProvider.kt (95%) rename features/login/src/main/kotlin/io/element/android/features/login/{ => implementation}/changeserver/ChangeServerView.kt (98%) rename features/login/src/main/kotlin/io/element/android/features/login/{ => implementation}/error/ErrorFormatter.kt (91%) rename features/login/src/main/kotlin/io/element/android/features/login/{ => implementation}/root/LoginRootEvents.kt (93%) rename features/login/src/main/kotlin/io/element/android/features/login/{ => implementation}/root/LoginRootNode.kt (97%) rename features/login/src/main/kotlin/io/element/android/features/login/{ => implementation}/root/LoginRootPresenter.kt (98%) rename features/login/src/main/kotlin/io/element/android/features/login/{ => implementation}/root/LoginRootScreen.kt (98%) rename features/login/src/main/kotlin/io/element/android/features/login/{ => implementation}/root/LoginRootState.kt (95%) rename features/login/src/main/kotlin/io/element/android/features/login/{ => implementation}/root/LoginRootStateProvider.kt (92%) create mode 100644 features/onboarding/src/main/kotlin/io/element/android/features/onboarding/api/OnBoardingEntryPoint.kt create mode 100644 features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/DefaultOnBoardingEntryPoint.kt create mode 100644 features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/OnBoardingNode.kt rename features/onboarding/src/main/kotlin/io/element/android/features/onboarding/{ => implementation}/OnBoardingScreen.kt (98%) rename features/onboarding/src/main/kotlin/io/element/android/features/onboarding/{ => implementation}/SplashCarouselData.kt (89%) rename features/onboarding/src/main/kotlin/io/element/android/features/onboarding/{ => implementation}/SplashCarouselDataFactory.kt (95%) create mode 100644 features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportEntryPoint.kt create mode 100644 features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/DefaultBugReportEntryPoint.kt create mode 100644 features/roomlist/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt create mode 100644 features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/DefaultRoomListEntryPoint.kt rename features/roomlist/src/main/kotlin/io/element/android/features/roomlist/{model => impl}/RoomListEvents.kt (93%) rename features/roomlist/src/main/kotlin/io/element/android/features/roomlist/{ => impl}/RoomListNode.kt (85%) rename features/roomlist/src/main/kotlin/io/element/android/features/roomlist/{ => impl}/RoomListPresenter.kt (94%) rename features/roomlist/src/main/kotlin/io/element/android/features/roomlist/{model => impl}/RoomListRoomSummary.kt (95%) rename features/roomlist/src/main/kotlin/io/element/android/features/roomlist/{model => impl}/RoomListRoomSummaryPlaceholders.kt (93%) rename features/roomlist/src/main/kotlin/io/element/android/features/roomlist/{model => impl}/RoomListRoomSummaryProvider.kt (94%) rename features/roomlist/src/main/kotlin/io/element/android/features/roomlist/{model => impl}/RoomListState.kt (94%) rename features/roomlist/src/main/kotlin/io/element/android/features/roomlist/{model => impl}/RoomListStateProvider.kt (97%) rename features/roomlist/src/main/kotlin/io/element/android/features/roomlist/{ => impl}/RoomListView.kt (92%) rename features/roomlist/src/main/kotlin/io/element/android/features/roomlist/{ => impl}/components/RoomListTopBar.kt (98%) rename features/roomlist/src/main/kotlin/io/element/android/features/roomlist/{ => impl}/components/RoomSummaryRow.kt (96%) create mode 100644 libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/EntryPoint.kt create mode 100644 libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/NodeInputs.kt diff --git a/app/src/main/kotlin/io/element/android/x/MainActivity.kt b/app/src/main/kotlin/io/element/android/x/MainActivity.kt index c37a35476d..999f654727 100644 --- a/app/src/main/kotlin/io/element/android/x/MainActivity.kt +++ b/app/src/main/kotlin/io/element/android/x/MainActivity.kt @@ -26,8 +26,8 @@ import androidx.core.view.WindowCompat import com.bumble.appyx.core.integration.NodeHost import com.bumble.appyx.core.integrationpoint.NodeComponentActivity import io.element.android.libraries.architecture.bindings +import io.element.android.libraries.architecture.createNode import io.element.android.libraries.designsystem.theme.ElementTheme -import io.element.android.libraries.di.DaggerComponentOwner import io.element.android.x.di.AppBindings import io.element.android.x.node.RootFlowNode @@ -45,13 +45,7 @@ class MainActivity : NodeComponentActivity() { modifier = Modifier.fillMaxSize(), ) { NodeHost(integrationPoint = appyxIntegrationPoint) { - RootFlowNode( - buildContext = it, - appComponentOwner = applicationContext as DaggerComponentOwner, - authenticationService = appBindings.authenticationService(), - presenter = appBindings.rootPresenter(), - matrixClientsHolder = appBindings.matrixClientsHolder() - ) + createNode(it) } } } diff --git a/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt b/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt index 10e00d30ef..ac58edbc93 100644 --- a/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt +++ b/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt @@ -29,38 +29,69 @@ import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.node.ParentNode import com.bumble.appyx.core.node.node +import com.bumble.appyx.core.plugin.Plugin +import com.bumble.appyx.core.plugin.plugins import com.bumble.appyx.navmodel.backstack.BackStack import com.bumble.appyx.navmodel.backstack.operation.push +import dagger.assisted.Assisted +import dagger.assisted.AssistedInject +import io.element.android.anvilannotations.ContributesNode import io.element.android.features.preferences.PreferencesFlowNode -import io.element.android.features.roomlist.RoomListNode +import io.element.android.features.roomlist.api.RoomListEntryPoint +import io.element.android.libraries.architecture.NodeInputs import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler import io.element.android.libraries.architecture.bindings import io.element.android.libraries.architecture.createNode +import io.element.android.libraries.architecture.nodeInputs +import io.element.android.libraries.architecture.nodeInputsProvider import io.element.android.libraries.designsystem.theme.components.Text +import io.element.android.libraries.di.AppScope import io.element.android.libraries.di.DaggerComponentOwner import io.element.android.libraries.matrix.MatrixClient import io.element.android.libraries.matrix.core.RoomId -import io.element.android.libraries.matrix.core.SessionId import io.element.android.libraries.matrix.ui.di.MatrixUIBindings import io.element.android.x.di.SessionComponent import kotlinx.parcelize.Parcelize +@ContributesNode(AppScope::class) class LoggedInFlowNode( buildContext: BuildContext, - val sessionId: SessionId, - private val matrixClient: MatrixClient, - private val onOpenBugReport: () -> Unit, - private val backstack: BackStack = BackStack( - initialElement = NavTarget.RoomList, - savedStateMap = buildContext.savedStateMap, - ), + plugins: List, + private val backstack: BackStack, + private val roomListEntryPoint: RoomListEntryPoint, ) : ParentNode( navModel = backstack, - buildContext = buildContext + buildContext = buildContext, + plugins = plugins ), DaggerComponentOwner { + @AssistedInject + constructor( + @Assisted buildContext: BuildContext, + @Assisted plugins: List, + roomListEntryPoint: RoomListEntryPoint, + ) : this( + buildContext = buildContext, + plugins = plugins, + roomListEntryPoint = roomListEntryPoint, + backstack = BackStack( + initialElement = NavTarget.RoomList, + savedStateMap = buildContext.savedStateMap, + ) + ) + + interface Callback : Plugin { + fun onOpenBugReport() + } + + data class Inputs( + val matrixClient: MatrixClient + ) : NodeInputs + + private val inputs: Inputs by nodeInputs() + override val daggerComponent: Any by lazy { - parent!!.bindings().sessionComponentBuilder().client(matrixClient).build() + parent!!.bindings().sessionComponentBuilder().client(inputs.matrixClient).build() } override fun onBuilt() { @@ -69,7 +100,7 @@ class LoggedInFlowNode( onCreate = { val imageLoaderFactory = bindings().loggedInImageLoaderFactory() Coil.setImageLoader(imageLoaderFactory) - matrixClient.startSync() + inputs.matrixClient.startSync() }, onDestroy = { val imageLoaderFactory = bindings().notLoggedInImageLoaderFactory() @@ -78,16 +109,6 @@ class LoggedInFlowNode( ) } - private val roomListCallback = object : RoomListNode.Callback { - override fun onRoomClicked(roomId: RoomId) { - backstack.push(NavTarget.Room(roomId)) - } - - override fun onSettingsClicked() { - backstack.push(NavTarget.Settings) - } - } - sealed interface NavTarget : Parcelable { @Parcelize object RoomList : NavTarget @@ -102,10 +123,19 @@ class LoggedInFlowNode( override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node { return when (navTarget) { NavTarget.RoomList -> { - createNode(buildContext, plugins = listOf(roomListCallback)) + val callback = object : RoomListEntryPoint.Callback { + override fun onRoomClicked(roomId: RoomId) { + backstack.push(NavTarget.Room(roomId)) + } + + override fun onSettingsClicked() { + backstack.push(NavTarget.Settings) + } + } + roomListEntryPoint.node(this, buildContext, plugins = listOf(callback)) } is NavTarget.Room -> { - val room = matrixClient.getRoom(roomId = navTarget.roomId) + val room = inputs.matrixClient.getRoom(roomId = navTarget.roomId) if (room == null) { // TODO CREATE UNKNOWN ROOM NODE node(buildContext) { @@ -114,11 +144,17 @@ class LoggedInFlowNode( } } } else { - RoomFlowNode(buildContext, room) + val inputsProvider = nodeInputsProvider(RoomFlowNode.Inputs(room)) + createNode(buildContext, plugins = listOf(inputsProvider)) } } NavTarget.Settings -> { - PreferencesFlowNode(buildContext, onOpenBugReport) + val callback = object : PreferencesFlowNode.Callback { + override fun onOpenBugReport() { + plugins().forEach { it.onOpenBugReport() } + } + } + createNode(buildContext, plugins = listOf(callback)) } } } diff --git a/app/src/main/kotlin/io/element/android/x/node/NotLoggedInFlowNode.kt b/app/src/main/kotlin/io/element/android/x/node/NotLoggedInFlowNode.kt index b9e38d1063..6a8b66c7f9 100644 --- a/app/src/main/kotlin/io/element/android/x/node/NotLoggedInFlowNode.kt +++ b/app/src/main/kotlin/io/element/android/x/node/NotLoggedInFlowNode.kt @@ -24,25 +24,45 @@ import com.bumble.appyx.core.lifecycle.subscribe import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.node.ParentNode -import com.bumble.appyx.core.node.node +import com.bumble.appyx.core.plugin.Plugin import com.bumble.appyx.navmodel.backstack.BackStack import com.bumble.appyx.navmodel.backstack.operation.push -import io.element.android.features.login.LoginFlowNode -import io.element.android.features.onboarding.OnBoardingScreen +import dagger.assisted.Assisted +import dagger.assisted.AssistedInject +import io.element.android.anvilannotations.ContributesNode +import io.element.android.features.login.api.LoginEntryPoint +import io.element.android.features.onboarding.api.OnBoardingEntryPoint import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler +import io.element.android.libraries.di.AppScope import kotlinx.parcelize.Parcelize import timber.log.Timber -class NotLoggedInFlowNode( +@ContributesNode(AppScope::class) +class NotLoggedInFlowNode private constructor( buildContext: BuildContext, - private val backstack: BackStack = BackStack( - initialElement = NavTarget.OnBoarding, - savedStateMap = buildContext.savedStateMap, - ), + plugins: List, + private val onBoardingEntryPoint: OnBoardingEntryPoint, + private val loginEntryPoint: LoginEntryPoint, + private val backstack: BackStack, ) : ParentNode( navModel = backstack, - buildContext = buildContext + buildContext = buildContext, + plugins = plugins, ) { + @AssistedInject + constructor( + @Assisted buildContext: BuildContext, + @Assisted plugins: List, + onBoardingEntryPoint: OnBoardingEntryPoint, + loginEntryPoint: LoginEntryPoint, + ) + : this( + buildContext = buildContext, + plugins = plugins, + onBoardingEntryPoint = onBoardingEntryPoint, + loginEntryPoint = loginEntryPoint, + backstack = BackStack(initialElement = NavTarget.OnBoarding, savedStateMap = buildContext.savedStateMap), + ) init { lifecycle.subscribe( @@ -61,12 +81,21 @@ class NotLoggedInFlowNode( override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node { return when (navTarget) { - NavTarget.OnBoarding -> node(buildContext) { - OnBoardingScreen( - onSignIn = { backstack.push(NavTarget.LoginFlow) } - ) + NavTarget.OnBoarding -> { + val callback = object : OnBoardingEntryPoint.Callback { + override fun onSignUp() { + //NOOP + } + + override fun onSignIn() { + backstack.push(NavTarget.LoginFlow) + } + } + onBoardingEntryPoint.node(this, buildContext, plugins = listOf(callback)) + } + NavTarget.LoginFlow -> { + loginEntryPoint.node(this, buildContext) } - NavTarget.LoginFlow -> LoginFlowNode(buildContext) } } diff --git a/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt b/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt index bae60841d6..900d0f7989 100644 --- a/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt +++ b/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt @@ -24,30 +24,52 @@ import com.bumble.appyx.core.lifecycle.subscribe import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.node.ParentNode +import com.bumble.appyx.core.plugin.Plugin import com.bumble.appyx.navmodel.backstack.BackStack +import dagger.assisted.Assisted +import dagger.assisted.AssistedInject +import io.element.android.anvilannotations.ContributesNode import io.element.android.features.messages.MessagesNode +import io.element.android.libraries.architecture.NodeInputs import io.element.android.libraries.architecture.bindings import io.element.android.libraries.architecture.createNode +import io.element.android.libraries.architecture.nodeInputs import io.element.android.libraries.di.DaggerComponentOwner +import io.element.android.libraries.di.SessionScope import io.element.android.libraries.matrix.room.MatrixRoom import io.element.android.x.di.RoomComponent import kotlinx.parcelize.Parcelize import timber.log.Timber +@ContributesNode(SessionScope::class) class RoomFlowNode( buildContext: BuildContext, - private val room: MatrixRoom, - private val backstack: BackStack = BackStack( - initialElement = NavTarget.Messages, - savedStateMap = buildContext.savedStateMap, - ), + plugins: List, + private val backstack: BackStack, ) : ParentNode( navModel = backstack, - buildContext = buildContext + buildContext = buildContext, + plugins = plugins, ), DaggerComponentOwner { + data class Inputs( + val room: MatrixRoom, + ) : NodeInputs + + @AssistedInject + constructor(@Assisted buildContext: BuildContext, @Assisted plugins: List) : this( + buildContext = buildContext, + plugins = plugins, + backstack = BackStack( + initialElement = NavTarget.Messages, + savedStateMap = buildContext.savedStateMap, + ), + ) + + private val inputs: Inputs by nodeInputs() + override val daggerComponent: Any by lazy { - parent!!.bindings().roomComponentBuilder().room(room).build() + parent!!.bindings().roomComponentBuilder().room(inputs.room).build() } init { diff --git a/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt b/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt index 37fd284b3f..b35ddba736 100644 --- a/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt +++ b/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt @@ -16,6 +16,7 @@ package io.element.android.x.node +import android.content.Context import android.os.Parcelable import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize @@ -28,14 +29,21 @@ import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.node.ParentNode import com.bumble.appyx.core.node.node +import com.bumble.appyx.core.plugin.Plugin import com.bumble.appyx.navmodel.backstack.BackStack import com.bumble.appyx.navmodel.backstack.operation.newRoot import com.bumble.appyx.navmodel.backstack.operation.pop import com.bumble.appyx.navmodel.backstack.operation.push -import io.element.android.features.rageshake.bugreport.BugReportNode +import dagger.assisted.Assisted +import dagger.assisted.AssistedInject +import io.element.android.anvilannotations.ContributesNode +import io.element.android.features.rageshake.bugreport.BugReportEntryPoint import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler import io.element.android.libraries.architecture.createNode +import io.element.android.libraries.architecture.nodeInputsProvider import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator +import io.element.android.libraries.di.AppScope +import io.element.android.libraries.di.ApplicationContext import io.element.android.libraries.di.DaggerComponentOwner import io.element.android.libraries.matrix.auth.MatrixAuthenticationService import io.element.android.libraries.matrix.core.SessionId @@ -48,7 +56,8 @@ import kotlinx.coroutines.flow.onEach import kotlinx.parcelize.Parcelize import timber.log.Timber -class RootFlowNode( +@ContributesNode(AppScope::class) +class RootFlowNode private constructor( private val buildContext: BuildContext, private val backstack: BackStack = BackStack( initialElement = NavTarget.SplashScreen, @@ -57,7 +66,8 @@ class RootFlowNode( private val appComponentOwner: DaggerComponentOwner, private val authenticationService: MatrixAuthenticationService, private val matrixClientsHolder: MatrixClientsHolder, - private val presenter: RootPresenter + private val presenter: RootPresenter, + private val bugReportEntryPoint: BugReportEntryPoint, ) : ParentNode( navModel = backstack, @@ -66,6 +76,28 @@ class RootFlowNode( DaggerComponentOwner by appComponentOwner { + @AssistedInject + constructor( + @Assisted buildContext: BuildContext, + @Assisted plugins: List, + @ApplicationContext context: Context, + authenticationService: MatrixAuthenticationService, + matrixClientsHolder: MatrixClientsHolder, + presenter: RootPresenter, + bugReportEntryPoint: BugReportEntryPoint, + ) : this( + buildContext = buildContext, + backstack = BackStack( + initialElement = NavTarget.SplashScreen, + savedStateMap = buildContext.savedStateMap, + ), + appComponentOwner = context.applicationContext as DaggerComponentOwner, + authenticationService = authenticationService, + matrixClientsHolder = matrixClientsHolder, + presenter = presenter, + bugReportEntryPoint = bugReportEntryPoint, + ) + override fun onBuilt() { super.onBuilt() observeLoggedInState() @@ -140,12 +172,6 @@ class RootFlowNode( } } - private val bugReportNodeCallback = object : BugReportNode.Callback { - override fun onBugReportSent() { - backstack.pop() - } - } - sealed interface NavTarget : Parcelable { @Parcelize object SplashScreen : NavTarget @@ -167,16 +193,24 @@ class RootFlowNode( Timber.w("Couldn't find any session, go through SplashScreen") backstack.newRoot(NavTarget.SplashScreen) } - LoggedInFlowNode( - buildContext = buildContext, - sessionId = navTarget.sessionId, - matrixClient = matrixClient, - onOpenBugReport = this::onOpenBugReport - ) + val inputsProvider = nodeInputsProvider(LoggedInFlowNode.Inputs(matrixClient)) + val callback = object : LoggedInFlowNode.Callback { + override fun onOpenBugReport() { + backstack.push(NavTarget.BugReport) + } + } + createNode(buildContext, plugins = listOf(inputsProvider, callback)) } - NavTarget.NotLoggedInFlow -> NotLoggedInFlowNode(buildContext) + NavTarget.NotLoggedInFlow -> createNode(buildContext) NavTarget.SplashScreen -> splashNode(buildContext) - NavTarget.BugReport -> createNode(buildContext, plugins = listOf(bugReportNodeCallback)) + NavTarget.BugReport -> { + val callback = object : BugReportEntryPoint.Callback { + override fun onBugReportSent() { + backstack.pop() + } + } + bugReportEntryPoint.node(this, buildContext, plugins = listOf(callback)) + } } } diff --git a/features/login/src/main/kotlin/io/element/android/features/login/api/LoginEntryPoint.kt b/features/login/src/main/kotlin/io/element/android/features/login/api/LoginEntryPoint.kt new file mode 100644 index 0000000000..6a64b459d2 --- /dev/null +++ b/features/login/src/main/kotlin/io/element/android/features/login/api/LoginEntryPoint.kt @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.login.api + +import io.element.android.libraries.architecture.EntryPoint + +interface LoginEntryPoint : EntryPoint diff --git a/features/login/src/main/kotlin/io/element/android/features/login/implementation/DefaultLoginEntryPoint.kt b/features/login/src/main/kotlin/io/element/android/features/login/implementation/DefaultLoginEntryPoint.kt new file mode 100644 index 0000000000..08d7080baf --- /dev/null +++ b/features/login/src/main/kotlin/io/element/android/features/login/implementation/DefaultLoginEntryPoint.kt @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.login.implementation + +import com.bumble.appyx.core.modality.BuildContext +import com.bumble.appyx.core.node.Node +import com.bumble.appyx.core.plugin.Plugin +import com.squareup.anvil.annotations.ContributesBinding +import io.element.android.features.login.api.LoginEntryPoint +import io.element.android.libraries.architecture.createNode +import io.element.android.libraries.di.AppScope +import javax.inject.Inject + +@ContributesBinding(AppScope::class) +class DefaultLoginEntryPoint @Inject constructor() : LoginEntryPoint { + override fun node(parentNode: Node, buildContext: BuildContext, plugins: List): Node { + return parentNode.createNode(buildContext, plugins) + } +} diff --git a/features/login/src/main/kotlin/io/element/android/features/login/LoginFlowNode.kt b/features/login/src/main/kotlin/io/element/android/features/login/implementation/LoginFlowNode.kt similarity index 60% rename from features/login/src/main/kotlin/io/element/android/features/login/LoginFlowNode.kt rename to features/login/src/main/kotlin/io/element/android/features/login/implementation/LoginFlowNode.kt index 641435642d..923d2aacea 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/LoginFlowNode.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/implementation/LoginFlowNode.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login +package io.element.android.features.login.implementation import android.os.Parcelable import androidx.compose.runtime.Composable @@ -23,30 +23,39 @@ import com.bumble.appyx.core.composable.Children import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.node.ParentNode +import com.bumble.appyx.core.plugin.Plugin import com.bumble.appyx.navmodel.backstack.BackStack import com.bumble.appyx.navmodel.backstack.operation.push -import io.element.android.features.login.changeserver.ChangeServerNode -import io.element.android.features.login.root.LoginRootNode +import dagger.assisted.Assisted +import dagger.assisted.AssistedInject +import io.element.android.anvilannotations.ContributesNode +import io.element.android.features.login.implementation.changeserver.ChangeServerNode +import io.element.android.features.login.implementation.root.LoginRootNode import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler import io.element.android.libraries.architecture.createNode +import io.element.android.libraries.di.AppScope import kotlinx.parcelize.Parcelize +@ContributesNode(AppScope::class) class LoginFlowNode( buildContext: BuildContext, - private val backstack: BackStack = BackStack( - initialElement = NavTarget.Root, - savedStateMap = buildContext.savedStateMap, - ), + plugins: List, + private val backstack: BackStack, ) : ParentNode( navModel = backstack, - buildContext = buildContext + buildContext = buildContext, + plugins = plugins, ) { - private val loginRootCallback = object : LoginRootNode.Callback { - override fun onChangeHomeServer() { - backstack.push(NavTarget.ChangeServer) - } - } + @AssistedInject + constructor(@Assisted buildContext: BuildContext, @Assisted plugins: List) : this( + buildContext = buildContext, + plugins = plugins, + backstack = BackStack( + initialElement = NavTarget.Root, + savedStateMap = buildContext.savedStateMap, + ), + ) sealed interface NavTarget : Parcelable { @Parcelize @@ -58,7 +67,14 @@ class LoginFlowNode( override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node { return when (navTarget) { - NavTarget.Root -> createNode(buildContext, plugins = listOf(loginRootCallback)) + NavTarget.Root -> { + val callback = object : LoginRootNode.Callback { + override fun onChangeHomeServer() { + backstack.push(NavTarget.ChangeServer) + } + } + createNode(buildContext, plugins = listOf(callback)) + } NavTarget.ChangeServer -> createNode(buildContext) } } diff --git a/features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerEvents.kt b/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerEvents.kt similarity index 91% rename from features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerEvents.kt rename to features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerEvents.kt index 70b57b5038..8796c1b2cf 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerEvents.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerEvents.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.changeserver +package io.element.android.features.login.implementation.changeserver sealed interface ChangeServerEvents { data class SetServer(val server: String) : ChangeServerEvents diff --git a/features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerNode.kt b/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerNode.kt similarity index 95% rename from features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerNode.kt rename to features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerNode.kt index 232b0a6497..760f22ba2f 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerNode.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerNode.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.changeserver +package io.element.android.features.login.implementation.changeserver import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier diff --git a/features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerPresenter.kt b/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerPresenter.kt similarity index 97% rename from features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerPresenter.kt rename to features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerPresenter.kt index 038d2ecea1..4cfc4090d4 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerPresenter.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerPresenter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.changeserver +package io.element.android.features.login.implementation.changeserver import androidx.compose.runtime.Composable import androidx.compose.runtime.MutableState diff --git a/features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerState.kt b/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerState.kt similarity index 92% rename from features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerState.kt rename to features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerState.kt index 3463e1f238..bc1b8bc6c8 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerState.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerState.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.changeserver +package io.element.android.features.login.implementation.changeserver import io.element.android.libraries.architecture.Async diff --git a/features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerStateProvider.kt b/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerStateProvider.kt similarity index 95% rename from features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerStateProvider.kt rename to features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerStateProvider.kt index cc70345415..948d2dbc10 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerStateProvider.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerStateProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.changeserver +package io.element.android.features.login.implementation.changeserver import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.libraries.architecture.Async diff --git a/features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerView.kt b/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerView.kt similarity index 98% rename from features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerView.kt rename to features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerView.kt index 9610e43f3f..671b71b0dd 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerView.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerView.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.changeserver +package io.element.android.features.login.implementation.changeserver import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box @@ -46,7 +46,7 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import io.element.android.features.login.R -import io.element.android.features.login.error.changeServerError +import io.element.android.features.login.implementation.error.changeServerError import io.element.android.libraries.architecture.Async import io.element.android.libraries.designsystem.components.form.textFieldState import io.element.android.libraries.designsystem.preview.ElementPreviewDark diff --git a/features/login/src/main/kotlin/io/element/android/features/login/error/ErrorFormatter.kt b/features/login/src/main/kotlin/io/element/android/features/login/implementation/error/ErrorFormatter.kt similarity index 91% rename from features/login/src/main/kotlin/io/element/android/features/login/error/ErrorFormatter.kt rename to features/login/src/main/kotlin/io/element/android/features/login/implementation/error/ErrorFormatter.kt index 6527a3a141..c5954d9d57 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/error/ErrorFormatter.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/implementation/error/ErrorFormatter.kt @@ -14,11 +14,11 @@ * limitations under the License. */ -package io.element.android.features.login.error +package io.element.android.features.login.implementation.error import androidx.compose.runtime.Composable import androidx.compose.ui.res.stringResource -import io.element.android.features.login.root.LoginFormState +import io.element.android.features.login.implementation.root.LoginFormState import io.element.android.libraries.core.uri.isValidUrl import io.element.android.libraries.ui.strings.R as StringR diff --git a/features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootEvents.kt b/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootEvents.kt similarity index 93% rename from features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootEvents.kt rename to features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootEvents.kt index 623f80abc7..ed640018f6 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootEvents.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootEvents.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.root +package io.element.android.features.login.implementation.root sealed interface LoginRootEvents { object RefreshHomeServer : LoginRootEvents diff --git a/features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootNode.kt b/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootNode.kt similarity index 97% rename from features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootNode.kt rename to features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootNode.kt index f29eb2a7e5..0ac8f0a337 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootNode.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootNode.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.root +package io.element.android.features.login.implementation.root import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier diff --git a/features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootPresenter.kt b/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootPresenter.kt similarity index 98% rename from features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootPresenter.kt rename to features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootPresenter.kt index d51dc5b5f8..dde86ad67e 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootPresenter.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootPresenter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.root +package io.element.android.features.login.implementation.root import androidx.compose.runtime.Composable import androidx.compose.runtime.MutableState diff --git a/features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootScreen.kt b/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootScreen.kt similarity index 98% rename from features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootScreen.kt rename to features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootScreen.kt index 740b147bbd..0045d3d6ac 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootScreen.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootScreen.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.root +package io.element.android.features.login.implementation.root import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -48,7 +48,7 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import io.element.android.features.login.error.loginError +import io.element.android.features.login.implementation.error.loginError import io.element.android.libraries.designsystem.components.form.textFieldState import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight diff --git a/features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootState.kt b/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootState.kt similarity index 95% rename from features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootState.kt rename to features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootState.kt index 27af06b11e..f38c876f84 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootState.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootState.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.root +package io.element.android.features.login.implementation.root import android.os.Parcelable import io.element.android.libraries.matrix.core.SessionId diff --git a/features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootStateProvider.kt b/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootStateProvider.kt similarity index 92% rename from features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootStateProvider.kt rename to features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootStateProvider.kt index 2a5b737719..b532c6e790 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootStateProvider.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootStateProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.root +package io.element.android.features.login.implementation.root fun aLoginRootState() = LoginRootState( homeserver = "", diff --git a/features/login/src/test/kotlin/io/element/android/features/login/changeserver/ChangeServerPresenterTest.kt b/features/login/src/test/kotlin/io/element/android/features/login/changeserver/ChangeServerPresenterTest.kt index b22c03dc35..69cc327015 100644 --- a/features/login/src/test/kotlin/io/element/android/features/login/changeserver/ChangeServerPresenterTest.kt +++ b/features/login/src/test/kotlin/io/element/android/features/login/changeserver/ChangeServerPresenterTest.kt @@ -22,6 +22,8 @@ import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat +import io.element.android.features.login.implementation.changeserver.ChangeServerEvents +import io.element.android.features.login.implementation.changeserver.ChangeServerPresenter import io.element.android.libraries.architecture.Async import io.element.android.libraries.matrixtest.A_HOMESERVER import io.element.android.libraries.matrixtest.auth.FakeAuthenticationService diff --git a/features/login/src/test/kotlin/io/element/android/features/login/root/LoginRootPresenterTest.kt b/features/login/src/test/kotlin/io/element/android/features/login/root/LoginRootPresenterTest.kt index 3fa20ae93a..36f4081ca9 100644 --- a/features/login/src/test/kotlin/io/element/android/features/login/root/LoginRootPresenterTest.kt +++ b/features/login/src/test/kotlin/io/element/android/features/login/root/LoginRootPresenterTest.kt @@ -22,6 +22,10 @@ import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat +import io.element.android.features.login.implementation.root.LoggedInState +import io.element.android.features.login.implementation.root.LoginFormState +import io.element.android.features.login.implementation.root.LoginRootEvents +import io.element.android.features.login.implementation.root.LoginRootPresenter import io.element.android.libraries.matrix.core.SessionId import io.element.android.libraries.matrixtest.A_HOMESERVER import io.element.android.libraries.matrixtest.A_HOMESERVER_2 diff --git a/features/onboarding/build.gradle.kts b/features/onboarding/build.gradle.kts index fcefcb0068..d9636304aa 100644 --- a/features/onboarding/build.gradle.kts +++ b/features/onboarding/build.gradle.kts @@ -19,15 +19,23 @@ plugins { id("io.element.android-compose-library") alias(libs.plugins.ksp) + alias(libs.plugins.anvil) } android { namespace = "io.element.android.features.onboarding" } +anvil { + generateDaggerFactories.set(true) +} + + dependencies { implementation(projects.libraries.core) implementation(projects.libraries.elementresources) + implementation(projects.anvilannotations) + anvil(projects.anvilcodegen) implementation(projects.libraries.uiStrings) implementation(projects.libraries.designsystem) implementation(projects.libraries.architecture) diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/api/OnBoardingEntryPoint.kt b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/api/OnBoardingEntryPoint.kt new file mode 100644 index 0000000000..b603e8d40e --- /dev/null +++ b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/api/OnBoardingEntryPoint.kt @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.onboarding.api + +import com.bumble.appyx.core.plugin.Plugin +import io.element.android.libraries.architecture.EntryPoint + +interface OnBoardingEntryPoint : EntryPoint { + interface Callback : Plugin { + fun onSignUp() + fun onSignIn() + } +} diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/DefaultOnBoardingEntryPoint.kt b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/DefaultOnBoardingEntryPoint.kt new file mode 100644 index 0000000000..fc6b19d6a4 --- /dev/null +++ b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/DefaultOnBoardingEntryPoint.kt @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.onboarding.implementation + +import com.bumble.appyx.core.modality.BuildContext +import com.bumble.appyx.core.node.Node +import com.bumble.appyx.core.plugin.Plugin +import com.squareup.anvil.annotations.ContributesBinding +import io.element.android.features.onboarding.api.OnBoardingEntryPoint +import io.element.android.libraries.architecture.createNode +import io.element.android.libraries.di.AppScope +import javax.inject.Inject + +@ContributesBinding(AppScope::class) +class DefaultOnBoardingEntryPoint @Inject constructor() : OnBoardingEntryPoint { + override fun node(parentNode: Node, buildContext: BuildContext, plugins: List): Node { + return parentNode.createNode(buildContext, plugins) + } +} diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/OnBoardingNode.kt b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/OnBoardingNode.kt new file mode 100644 index 0000000000..f46d8e7b07 --- /dev/null +++ b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/OnBoardingNode.kt @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.onboarding.implementation + +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import com.bumble.appyx.core.modality.BuildContext +import com.bumble.appyx.core.node.Node +import com.bumble.appyx.core.plugin.Plugin +import com.bumble.appyx.core.plugin.plugins +import dagger.assisted.Assisted +import dagger.assisted.AssistedInject +import io.element.android.anvilannotations.ContributesNode +import io.element.android.features.onboarding.api.OnBoardingEntryPoint +import io.element.android.libraries.di.AppScope + +@ContributesNode(AppScope::class) +class OnBoardingNode @AssistedInject constructor( + @Assisted buildContext: BuildContext, + @Assisted plugins: List, +) : Node( + buildContext = buildContext, + plugins = plugins +) { + + private fun onSignIn() { + plugins().forEach { it.onSignIn() } + } + + private fun onSignUp() { + plugins().forEach { it.onSignUp() } + } + + @Composable + override fun View(modifier: Modifier) { + OnBoardingScreen( + modifier = modifier, + onSignIn = this::onSignIn, + onSignUp = this::onSignUp + ) + } +} diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/OnBoardingScreen.kt b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/OnBoardingScreen.kt similarity index 98% rename from features/onboarding/src/main/kotlin/io/element/android/features/onboarding/OnBoardingScreen.kt rename to features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/OnBoardingScreen.kt index a83043e199..d154aec02c 100644 --- a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/OnBoardingScreen.kt +++ b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/OnBoardingScreen.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.onboarding +package io.element.android.features.onboarding.implementation import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Box diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/SplashCarouselData.kt b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/SplashCarouselData.kt similarity index 89% rename from features/onboarding/src/main/kotlin/io/element/android/features/onboarding/SplashCarouselData.kt rename to features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/SplashCarouselData.kt index 58d1b6534c..184c85a90e 100644 --- a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/SplashCarouselData.kt +++ b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/SplashCarouselData.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.onboarding +package io.element.android.features.onboarding.implementation import androidx.annotation.DrawableRes import androidx.annotation.StringRes diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/SplashCarouselDataFactory.kt b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/SplashCarouselDataFactory.kt similarity index 95% rename from features/onboarding/src/main/kotlin/io/element/android/features/onboarding/SplashCarouselDataFactory.kt rename to features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/SplashCarouselDataFactory.kt index e2848839ce..a8d358387f 100644 --- a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/SplashCarouselDataFactory.kt +++ b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/SplashCarouselDataFactory.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,10 @@ * limitations under the License. */ -package io.element.android.features.onboarding +package io.element.android.features.onboarding.implementation import androidx.annotation.DrawableRes +import io.element.android.features.onboarding.R import io.element.android.libraries.ui.strings.R as StringR class SplashCarouselDataFactory { diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/PreferencesFlowNode.kt b/features/preferences/src/main/kotlin/io/element/android/features/preferences/PreferencesFlowNode.kt index 5407072398..54eb593ee7 100644 --- a/features/preferences/src/main/kotlin/io/element/android/features/preferences/PreferencesFlowNode.kt +++ b/features/preferences/src/main/kotlin/io/element/android/features/preferences/PreferencesFlowNode.kt @@ -23,27 +23,46 @@ import com.bumble.appyx.core.composable.Children import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.node.ParentNode +import com.bumble.appyx.core.plugin.Plugin +import com.bumble.appyx.core.plugin.plugins import com.bumble.appyx.navmodel.backstack.BackStack +import dagger.assisted.Assisted +import dagger.assisted.AssistedInject +import io.element.android.anvilannotations.ContributesNode import io.element.android.features.preferences.root.PreferencesRootNode import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler import io.element.android.libraries.architecture.createNode +import io.element.android.libraries.di.SessionScope import kotlinx.parcelize.Parcelize +@ContributesNode(SessionScope::class) class PreferencesFlowNode( buildContext: BuildContext, - private val onOpenBugReport: () -> Unit, - private val backstack: BackStack = BackStack( - initialElement = NavTarget.Root, - savedStateMap = buildContext.savedStateMap, - ), + plugins: List, + private val backstack: BackStack, ) : ParentNode( navModel = backstack, - buildContext = buildContext + buildContext = buildContext, + plugins = plugins ) { + @AssistedInject + constructor(@Assisted buildContext: BuildContext, @Assisted plugins: List) : this( + buildContext = buildContext, + plugins = plugins, + backstack = BackStack( + initialElement = NavTarget.Root, + savedStateMap = buildContext.savedStateMap, + ) + ) + + interface Callback : Plugin { + fun onOpenBugReport() + } + private val preferencesRootNodeCallback = object : PreferencesRootNode.Callback { override fun onOpenBugReport() { - onOpenBugReport.invoke() + plugins().forEach { it.onOpenBugReport() } } } diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportEntryPoint.kt b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportEntryPoint.kt new file mode 100644 index 0000000000..43f916328d --- /dev/null +++ b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportEntryPoint.kt @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.rageshake.bugreport + +import com.bumble.appyx.core.plugin.Plugin +import io.element.android.libraries.architecture.EntryPoint + +interface BugReportEntryPoint : EntryPoint { + interface Callback : Plugin { + fun onBugReportSent() + } +} diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportNode.kt b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportNode.kt index 8c0ffceee8..79c1beec0f 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportNode.kt +++ b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportNode.kt @@ -34,10 +34,6 @@ class BugReportNode @AssistedInject constructor( private val presenter: BugReportPresenter, ) : Node(buildContext, plugins = plugins) { - interface Callback : Plugin { - fun onBugReportSent() - } - @Composable override fun View(modifier: Modifier) { val state = presenter.present() @@ -49,6 +45,6 @@ class BugReportNode @AssistedInject constructor( } private fun onDone() { - plugins().forEach { it.onBugReportSent() } + plugins().forEach { it.onBugReportSent() } } } diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/DefaultBugReportEntryPoint.kt b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/DefaultBugReportEntryPoint.kt new file mode 100644 index 0000000000..819a33ca72 --- /dev/null +++ b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/DefaultBugReportEntryPoint.kt @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.rageshake.bugreport + +import com.bumble.appyx.core.modality.BuildContext +import com.bumble.appyx.core.node.Node +import com.bumble.appyx.core.plugin.Plugin +import com.squareup.anvil.annotations.ContributesBinding +import io.element.android.libraries.architecture.createNode +import io.element.android.libraries.di.AppScope +import javax.inject.Inject + +@ContributesBinding(AppScope::class) +class DefaultBugReportEntryPoint @Inject constructor() : BugReportEntryPoint { + override fun node(parentNode: Node, buildContext: BuildContext, plugins: List): Node { + return parentNode.createNode(buildContext, plugins) + } +} diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt new file mode 100644 index 0000000000..cadd4ea93d --- /dev/null +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.roomlist.api + +import com.bumble.appyx.core.plugin.Plugin +import io.element.android.libraries.architecture.EntryPoint +import io.element.android.libraries.matrix.core.RoomId + +interface RoomListEntryPoint : EntryPoint { + interface Callback : Plugin { + fun onRoomClicked(roomId: RoomId) + fun onSettingsClicked() + } +} diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/DefaultRoomListEntryPoint.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/DefaultRoomListEntryPoint.kt new file mode 100644 index 0000000000..4a1e5d6a09 --- /dev/null +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/DefaultRoomListEntryPoint.kt @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.roomlist.impl + +import com.bumble.appyx.core.modality.BuildContext +import com.bumble.appyx.core.node.Node +import com.bumble.appyx.core.plugin.Plugin +import com.squareup.anvil.annotations.ContributesBinding +import io.element.android.features.roomlist.api.RoomListEntryPoint +import io.element.android.libraries.architecture.createNode +import io.element.android.libraries.di.AppScope +import javax.inject.Inject + +@ContributesBinding(AppScope::class) +class DefaultRoomListEntryPoint @Inject constructor() : RoomListEntryPoint { + override fun node(parentNode: Node, buildContext: BuildContext, plugins: List): Node { + return parentNode.createNode(buildContext, plugins) + } +} diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListEvents.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListEvents.kt similarity index 93% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListEvents.kt rename to features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListEvents.kt index 4349c93341..40248b3723 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListEvents.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListEvents.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.roomlist.model +package io.element.android.features.roomlist.impl sealed interface RoomListEvents { data class UpdateFilter(val newFilter: String) : RoomListEvents diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListNode.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListNode.kt similarity index 85% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListNode.kt rename to features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListNode.kt index ecf6dc3c98..de2ea0bfee 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListNode.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListNode.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.roomlist +package io.element.android.features.roomlist.impl import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -25,6 +25,7 @@ import com.bumble.appyx.core.plugin.plugins import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode +import io.element.android.features.roomlist.api.RoomListEntryPoint import io.element.android.libraries.di.SessionScope import io.element.android.libraries.matrix.core.RoomId @@ -35,17 +36,12 @@ class RoomListNode @AssistedInject constructor( private val presenter: RoomListPresenter, ) : Node(buildContext, plugins = plugins) { - interface Callback : Plugin { - fun onRoomClicked(roomId: RoomId) - fun onSettingsClicked() - } - private fun onRoomClicked(roomId: RoomId) { - plugins().forEach { it.onRoomClicked(roomId) } + plugins().forEach { it.onRoomClicked(roomId) } } private fun onOpenSettings() { - plugins().forEach { it.onSettingsClicked() } + plugins().forEach { it.onSettingsClicked() } } @Composable diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListPresenter.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListPresenter.kt similarity index 94% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListPresenter.kt rename to features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListPresenter.kt index a36e7729a6..52758eadf6 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListPresenter.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListPresenter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.roomlist +package io.element.android.features.roomlist.impl import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -25,10 +25,6 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue -import io.element.android.features.roomlist.model.RoomListEvents -import io.element.android.features.roomlist.model.RoomListRoomSummary -import io.element.android.features.roomlist.model.RoomListRoomSummaryPlaceholders -import io.element.android.features.roomlist.model.RoomListState import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.core.coroutine.parallelMap import io.element.android.libraries.dateformatter.LastMessageFormatter diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListRoomSummary.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListRoomSummary.kt similarity index 95% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListRoomSummary.kt rename to features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListRoomSummary.kt index 5f9e883e5d..44fcc5dc26 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListRoomSummary.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListRoomSummary.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.roomlist.model +package io.element.android.features.roomlist.impl import androidx.compose.runtime.Immutable import io.element.android.libraries.designsystem.components.avatar.AvatarData diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListRoomSummaryPlaceholders.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListRoomSummaryPlaceholders.kt similarity index 93% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListRoomSummaryPlaceholders.kt rename to features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListRoomSummaryPlaceholders.kt index b1f48c8ab2..b81803f5a9 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListRoomSummaryPlaceholders.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListRoomSummaryPlaceholders.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.roomlist.model +package io.element.android.features.roomlist.impl import io.element.android.libraries.designsystem.components.avatar.AvatarData diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListRoomSummaryProvider.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListRoomSummaryProvider.kt similarity index 94% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListRoomSummaryProvider.kt rename to features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListRoomSummaryProvider.kt index 41a6f96473..9aef9fd732 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListRoomSummaryProvider.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListRoomSummaryProvider.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.roomlist.model +package io.element.android.features.roomlist.impl import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.libraries.designsystem.components.avatar.AvatarData diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListState.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListState.kt similarity index 94% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListState.kt rename to features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListState.kt index e9a48a7249..69e47a4250 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListState.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListState.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.roomlist.model +package io.element.android.features.roomlist.impl import androidx.compose.runtime.Immutable import io.element.android.libraries.matrix.ui.model.MatrixUser diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListStateProvider.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt similarity index 97% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListStateProvider.kt rename to features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt index fd361e6b02..9b4b2e93ca 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/model/RoomListStateProvider.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.roomlist.model +package io.element.android.features.roomlist.impl import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.libraries.designsystem.components.avatar.AvatarData diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListView.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListView.kt similarity index 92% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListView.kt rename to features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListView.kt index 1ebc2328db..ee6a267190 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListView.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListView.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.roomlist +package io.element.android.features.roomlist.impl import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.padding @@ -34,12 +34,8 @@ import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.Velocity -import io.element.android.features.roomlist.components.RoomListTopBar -import io.element.android.features.roomlist.components.RoomSummaryRow -import io.element.android.features.roomlist.model.RoomListEvents -import io.element.android.features.roomlist.model.RoomListRoomSummary -import io.element.android.features.roomlist.model.RoomListState -import io.element.android.features.roomlist.model.RoomListStateProvider +import io.element.android.features.roomlist.impl.components.RoomListTopBar +import io.element.android.features.roomlist.impl.components.RoomSummaryRow import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.theme.components.Scaffold diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/components/RoomListTopBar.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomListTopBar.kt similarity index 98% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/components/RoomListTopBar.kt rename to features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomListTopBar.kt index e27b8eaba9..f8dd16a873 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/components/RoomListTopBar.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomListTopBar.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ @file:OptIn(ExperimentalMaterial3Api::class) -package io.element.android.features.roomlist.components +package io.element.android.features.roomlist.impl.components import androidx.activity.compose.BackHandler import androidx.compose.foundation.layout.fillMaxWidth diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/components/RoomSummaryRow.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt similarity index 96% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/components/RoomSummaryRow.kt rename to features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt index 506ced9a1d..ebacfeb917 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/components/RoomSummaryRow.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.roomlist.components +package io.element.android.features.roomlist.impl.components import androidx.compose.foundation.background import androidx.compose.foundation.clickable @@ -53,8 +53,8 @@ import androidx.compose.ui.unit.LayoutDirection import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.google.accompanist.placeholder.material.placeholder -import io.element.android.features.roomlist.model.RoomListRoomSummary -import io.element.android.features.roomlist.model.RoomListRoomSummaryProvider +import io.element.android.features.roomlist.impl.RoomListRoomSummary +import io.element.android.features.roomlist.impl.RoomListRoomSummaryProvider import io.element.android.libraries.designsystem.components.avatar.Avatar import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight diff --git a/features/roomlist/src/test/kotlin/io/element/android/features/roomlist/RoomListPresenterTests.kt b/features/roomlist/src/test/kotlin/io/element/android/features/roomlist/RoomListPresenterTests.kt index 743fd2d888..b43efdab28 100644 --- a/features/roomlist/src/test/kotlin/io/element/android/features/roomlist/RoomListPresenterTests.kt +++ b/features/roomlist/src/test/kotlin/io/element/android/features/roomlist/RoomListPresenterTests.kt @@ -22,8 +22,9 @@ import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat -import io.element.android.features.roomlist.model.RoomListEvents -import io.element.android.features.roomlist.model.RoomListRoomSummary +import io.element.android.features.roomlist.impl.RoomListPresenter +import io.element.android.features.roomlist.impl.RoomListEvents +import io.element.android.features.roomlist.impl.RoomListRoomSummary import io.element.android.libraries.dateformatter.LastMessageFormatter import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.matrix.core.SessionId diff --git a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/EntryPoint.kt b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/EntryPoint.kt new file mode 100644 index 0000000000..4330b67e7e --- /dev/null +++ b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/EntryPoint.kt @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.libraries.architecture + +import com.bumble.appyx.core.modality.BuildContext +import com.bumble.appyx.core.node.Node +import com.bumble.appyx.core.plugin.Plugin + +interface EntryPoint { + fun node(parentNode: Node, buildContext: BuildContext, plugins: List = emptyList()): Node +} diff --git a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/NodeFactories.kt b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/NodeFactories.kt index 6a4d52d20e..82ec21667b 100644 --- a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/NodeFactories.kt +++ b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/NodeFactories.kt @@ -16,14 +16,24 @@ package io.element.android.libraries.architecture +import android.content.Context import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.plugin.Plugin inline fun Node.createNode(context: BuildContext, plugins: List = emptyList()): NODE { - val nodeClass = NODE::class.java val bindings: NodeFactoriesBindings = bindings() - val nodeFactoryMap = bindings.nodeFactories() + return bindings.createNode(context, plugins) +} + +inline fun Context.createNode(context: BuildContext, plugins: List = emptyList()): NODE { + val bindings: NodeFactoriesBindings = bindings() + return bindings.createNode(context, plugins) +} + +inline fun NodeFactoriesBindings.createNode(context: BuildContext, plugins: List = emptyList()): NODE { + val nodeClass = NODE::class.java + val nodeFactoryMap = nodeFactories() val nodeFactory = nodeFactoryMap[nodeClass] ?: error("Cannot find NodeFactory for ${nodeClass.name}.") @Suppress("UNCHECKED_CAST") diff --git a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/NodeInputs.kt b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/NodeInputs.kt new file mode 100644 index 0000000000..d51c49c118 --- /dev/null +++ b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/NodeInputs.kt @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.libraries.architecture + +import com.bumble.appyx.core.node.Node +import com.bumble.appyx.core.plugin.Plugin +import com.bumble.appyx.core.plugin.plugins +import kotlin.properties.ReadOnlyProperty + +interface NodeInputs + +interface NodeInputsProvider : Plugin { + fun inputs(): I +} + +inline fun nodeInputsProvider(inputs: I) = object : NodeInputsProvider { + override fun inputs() = inputs +} + +fun nodeInputs() = ReadOnlyProperty { thisRef, _ -> + thisRef.plugins>().first().inputs() +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ElementTheme.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ElementTheme.kt index cbeb84badb..545834ac3c 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ElementTheme.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ElementTheme.kt @@ -57,7 +57,7 @@ fun ElementTheme( ) { val systemUiController = rememberSystemUiController() val useDarkIcons = !darkTheme - val currentColor = remember { if (darkTheme) darkColors else lightColors } + val currentColor = remember(darkTheme) { if (darkTheme) darkColors else lightColors } val colorScheme = when { dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { val context = LocalContext.current diff --git a/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/LoginScreen.kt b/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/LoginScreen.kt index a6a28ed9d0..d735f9124b 100644 --- a/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/LoginScreen.kt +++ b/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/LoginScreen.kt @@ -19,8 +19,8 @@ package io.element.android.samples.minimal import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.Modifier -import io.element.android.features.login.root.LoginRootPresenter -import io.element.android.features.login.root.LoginRootScreen +import io.element.android.features.login.implementation.root.LoginRootPresenter +import io.element.android.features.login.implementation.root.LoginRootScreen import io.element.android.libraries.matrix.auth.MatrixAuthenticationService class LoginScreen(private val authenticationService: MatrixAuthenticationService) { diff --git a/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/RoomListScreen.kt b/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/RoomListScreen.kt index 0158c77eab..32d9820d4d 100644 --- a/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/RoomListScreen.kt +++ b/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/RoomListScreen.kt @@ -19,8 +19,8 @@ package io.element.android.samples.minimal import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffect import androidx.compose.ui.Modifier -import io.element.android.features.roomlist.RoomListPresenter -import io.element.android.features.roomlist.RoomListView +import io.element.android.features.roomlist.impl.RoomListPresenter +import io.element.android.features.roomlist.impl.RoomListView import io.element.android.libraries.dateformatter.impl.DateFormatters import io.element.android.libraries.dateformatter.impl.DefaultLastMessageFormatter import io.element.android.libraries.dateformatter.impl.LocalDateTimeProvider From 9d730d8b74c31881054dcf1608406480de7d6866 Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 2 Mar 2023 15:49:20 +0100 Subject: [PATCH 02/25] [Architecture] use impl instead of implementation --- .../{implementation => impl}/DefaultLoginEntryPoint.kt | 2 +- .../login/{implementation => impl}/LoginFlowNode.kt | 6 +++--- .../changeserver/ChangeServerEvents.kt | 2 +- .../changeserver/ChangeServerNode.kt | 2 +- .../changeserver/ChangeServerPresenter.kt | 2 +- .../changeserver/ChangeServerState.kt | 2 +- .../changeserver/ChangeServerStateProvider.kt | 2 +- .../changeserver/ChangeServerView.kt | 4 ++-- .../{implementation => impl}/error/ErrorFormatter.kt | 4 ++-- .../{implementation => impl}/root/LoginRootEvents.kt | 2 +- .../login/{implementation => impl}/root/LoginRootNode.kt | 2 +- .../{implementation => impl}/root/LoginRootPresenter.kt | 2 +- .../{implementation => impl}/root/LoginRootScreen.kt | 4 ++-- .../login/{implementation => impl}/root/LoginRootState.kt | 2 +- .../root/LoginRootStateProvider.kt | 2 +- .../login/changeserver/ChangeServerPresenterTest.kt | 4 ++-- .../android/features/login/root/LoginRootPresenterTest.kt | 8 ++++---- .../DefaultOnBoardingEntryPoint.kt | 2 +- .../onboarding/{implementation => impl}/OnBoardingNode.kt | 2 +- .../{implementation => impl}/OnBoardingScreen.kt | 2 +- .../{implementation => impl}/SplashCarouselData.kt | 2 +- .../{implementation => impl}/SplashCarouselDataFactory.kt | 2 +- .../io/element/android/samples/minimal/LoginScreen.kt | 4 ++-- 23 files changed, 33 insertions(+), 33 deletions(-) rename features/login/src/main/kotlin/io/element/android/features/login/{implementation => impl}/DefaultLoginEntryPoint.kt (95%) rename features/login/src/main/kotlin/io/element/android/features/login/{implementation => impl}/LoginFlowNode.kt (93%) rename features/login/src/main/kotlin/io/element/android/features/login/{implementation => impl}/changeserver/ChangeServerEvents.kt (91%) rename features/login/src/main/kotlin/io/element/android/features/login/{implementation => impl}/changeserver/ChangeServerNode.kt (95%) rename features/login/src/main/kotlin/io/element/android/features/login/{implementation => impl}/changeserver/ChangeServerPresenter.kt (97%) rename features/login/src/main/kotlin/io/element/android/features/login/{implementation => impl}/changeserver/ChangeServerState.kt (92%) rename features/login/src/main/kotlin/io/element/android/features/login/{implementation => impl}/changeserver/ChangeServerStateProvider.kt (95%) rename features/login/src/main/kotlin/io/element/android/features/login/{implementation => impl}/changeserver/ChangeServerView.kt (98%) rename features/login/src/main/kotlin/io/element/android/features/login/{implementation => impl}/error/ErrorFormatter.kt (91%) rename features/login/src/main/kotlin/io/element/android/features/login/{implementation => impl}/root/LoginRootEvents.kt (93%) rename features/login/src/main/kotlin/io/element/android/features/login/{implementation => impl}/root/LoginRootNode.kt (97%) rename features/login/src/main/kotlin/io/element/android/features/login/{implementation => impl}/root/LoginRootPresenter.kt (98%) rename features/login/src/main/kotlin/io/element/android/features/login/{implementation => impl}/root/LoginRootScreen.kt (98%) rename features/login/src/main/kotlin/io/element/android/features/login/{implementation => impl}/root/LoginRootState.kt (95%) rename features/login/src/main/kotlin/io/element/android/features/login/{implementation => impl}/root/LoginRootStateProvider.kt (92%) rename features/onboarding/src/main/kotlin/io/element/android/features/onboarding/{implementation => impl}/DefaultOnBoardingEntryPoint.kt (95%) rename features/onboarding/src/main/kotlin/io/element/android/features/onboarding/{implementation => impl}/OnBoardingNode.kt (96%) rename features/onboarding/src/main/kotlin/io/element/android/features/onboarding/{implementation => impl}/OnBoardingScreen.kt (99%) rename features/onboarding/src/main/kotlin/io/element/android/features/onboarding/{implementation => impl}/SplashCarouselData.kt (93%) rename features/onboarding/src/main/kotlin/io/element/android/features/onboarding/{implementation => impl}/SplashCarouselDataFactory.kt (97%) diff --git a/features/login/src/main/kotlin/io/element/android/features/login/implementation/DefaultLoginEntryPoint.kt b/features/login/src/main/kotlin/io/element/android/features/login/impl/DefaultLoginEntryPoint.kt similarity index 95% rename from features/login/src/main/kotlin/io/element/android/features/login/implementation/DefaultLoginEntryPoint.kt rename to features/login/src/main/kotlin/io/element/android/features/login/impl/DefaultLoginEntryPoint.kt index 08d7080baf..721e95c466 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/implementation/DefaultLoginEntryPoint.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/impl/DefaultLoginEntryPoint.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.implementation +package io.element.android.features.login.impl import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node diff --git a/features/login/src/main/kotlin/io/element/android/features/login/implementation/LoginFlowNode.kt b/features/login/src/main/kotlin/io/element/android/features/login/impl/LoginFlowNode.kt similarity index 93% rename from features/login/src/main/kotlin/io/element/android/features/login/implementation/LoginFlowNode.kt rename to features/login/src/main/kotlin/io/element/android/features/login/impl/LoginFlowNode.kt index 923d2aacea..a9061a2ef4 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/implementation/LoginFlowNode.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/impl/LoginFlowNode.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.implementation +package io.element.android.features.login.impl import android.os.Parcelable import androidx.compose.runtime.Composable @@ -29,8 +29,8 @@ import com.bumble.appyx.navmodel.backstack.operation.push import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode -import io.element.android.features.login.implementation.changeserver.ChangeServerNode -import io.element.android.features.login.implementation.root.LoginRootNode +import io.element.android.features.login.impl.changeserver.ChangeServerNode +import io.element.android.features.login.impl.root.LoginRootNode import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler import io.element.android.libraries.architecture.createNode import io.element.android.libraries.di.AppScope diff --git a/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerEvents.kt b/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerEvents.kt similarity index 91% rename from features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerEvents.kt rename to features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerEvents.kt index 8796c1b2cf..d510b25f20 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerEvents.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerEvents.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.implementation.changeserver +package io.element.android.features.login.impl.changeserver sealed interface ChangeServerEvents { data class SetServer(val server: String) : ChangeServerEvents diff --git a/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerNode.kt b/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerNode.kt similarity index 95% rename from features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerNode.kt rename to features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerNode.kt index 760f22ba2f..9d000a5a44 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerNode.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerNode.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.implementation.changeserver +package io.element.android.features.login.impl.changeserver import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier diff --git a/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerPresenter.kt b/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt similarity index 97% rename from features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerPresenter.kt rename to features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt index 4cfc4090d4..b4c872853e 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerPresenter.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.implementation.changeserver +package io.element.android.features.login.impl.changeserver import androidx.compose.runtime.Composable import androidx.compose.runtime.MutableState diff --git a/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerState.kt b/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerState.kt similarity index 92% rename from features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerState.kt rename to features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerState.kt index bc1b8bc6c8..e65d7df5f9 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerState.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerState.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.implementation.changeserver +package io.element.android.features.login.impl.changeserver import io.element.android.libraries.architecture.Async diff --git a/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerStateProvider.kt b/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerStateProvider.kt similarity index 95% rename from features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerStateProvider.kt rename to features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerStateProvider.kt index 948d2dbc10..cb2672ef8e 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerStateProvider.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerStateProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.implementation.changeserver +package io.element.android.features.login.impl.changeserver import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.libraries.architecture.Async diff --git a/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerView.kt b/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerView.kt similarity index 98% rename from features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerView.kt rename to features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerView.kt index 671b71b0dd..ee72761cff 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/implementation/changeserver/ChangeServerView.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerView.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.implementation.changeserver +package io.element.android.features.login.impl.changeserver import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box @@ -46,7 +46,7 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import io.element.android.features.login.R -import io.element.android.features.login.implementation.error.changeServerError +import io.element.android.features.login.impl.error.changeServerError import io.element.android.libraries.architecture.Async import io.element.android.libraries.designsystem.components.form.textFieldState import io.element.android.libraries.designsystem.preview.ElementPreviewDark diff --git a/features/login/src/main/kotlin/io/element/android/features/login/implementation/error/ErrorFormatter.kt b/features/login/src/main/kotlin/io/element/android/features/login/impl/error/ErrorFormatter.kt similarity index 91% rename from features/login/src/main/kotlin/io/element/android/features/login/implementation/error/ErrorFormatter.kt rename to features/login/src/main/kotlin/io/element/android/features/login/impl/error/ErrorFormatter.kt index c5954d9d57..9d8ede62ab 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/implementation/error/ErrorFormatter.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/impl/error/ErrorFormatter.kt @@ -14,11 +14,11 @@ * limitations under the License. */ -package io.element.android.features.login.implementation.error +package io.element.android.features.login.impl.error import androidx.compose.runtime.Composable import androidx.compose.ui.res.stringResource -import io.element.android.features.login.implementation.root.LoginFormState +import io.element.android.features.login.impl.root.LoginFormState import io.element.android.libraries.core.uri.isValidUrl import io.element.android.libraries.ui.strings.R as StringR diff --git a/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootEvents.kt b/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootEvents.kt similarity index 93% rename from features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootEvents.kt rename to features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootEvents.kt index ed640018f6..01f33aa7d5 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootEvents.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootEvents.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.implementation.root +package io.element.android.features.login.impl.root sealed interface LoginRootEvents { object RefreshHomeServer : LoginRootEvents diff --git a/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootNode.kt b/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootNode.kt similarity index 97% rename from features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootNode.kt rename to features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootNode.kt index 0ac8f0a337..3eff826db9 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootNode.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootNode.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.implementation.root +package io.element.android.features.login.impl.root import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier diff --git a/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootPresenter.kt b/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootPresenter.kt similarity index 98% rename from features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootPresenter.kt rename to features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootPresenter.kt index dde86ad67e..da2787da6d 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootPresenter.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootPresenter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.implementation.root +package io.element.android.features.login.impl.root import androidx.compose.runtime.Composable import androidx.compose.runtime.MutableState diff --git a/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootScreen.kt b/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootScreen.kt similarity index 98% rename from features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootScreen.kt rename to features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootScreen.kt index 0045d3d6ac..310ee53936 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootScreen.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootScreen.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.implementation.root +package io.element.android.features.login.impl.root import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -48,7 +48,7 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import io.element.android.features.login.implementation.error.loginError +import io.element.android.features.login.impl.error.loginError import io.element.android.libraries.designsystem.components.form.textFieldState import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight diff --git a/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootState.kt b/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootState.kt similarity index 95% rename from features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootState.kt rename to features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootState.kt index f38c876f84..39a54b96f4 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootState.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootState.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.implementation.root +package io.element.android.features.login.impl.root import android.os.Parcelable import io.element.android.libraries.matrix.core.SessionId diff --git a/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootStateProvider.kt b/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootStateProvider.kt similarity index 92% rename from features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootStateProvider.kt rename to features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootStateProvider.kt index b532c6e790..11d6f10f16 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/implementation/root/LoginRootStateProvider.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootStateProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.implementation.root +package io.element.android.features.login.impl.root fun aLoginRootState() = LoginRootState( homeserver = "", diff --git a/features/login/src/test/kotlin/io/element/android/features/login/changeserver/ChangeServerPresenterTest.kt b/features/login/src/test/kotlin/io/element/android/features/login/changeserver/ChangeServerPresenterTest.kt index 69cc327015..6cab31bbb7 100644 --- a/features/login/src/test/kotlin/io/element/android/features/login/changeserver/ChangeServerPresenterTest.kt +++ b/features/login/src/test/kotlin/io/element/android/features/login/changeserver/ChangeServerPresenterTest.kt @@ -22,8 +22,8 @@ import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat -import io.element.android.features.login.implementation.changeserver.ChangeServerEvents -import io.element.android.features.login.implementation.changeserver.ChangeServerPresenter +import io.element.android.features.login.impl.changeserver.ChangeServerEvents +import io.element.android.features.login.impl.changeserver.ChangeServerPresenter import io.element.android.libraries.architecture.Async import io.element.android.libraries.matrixtest.A_HOMESERVER import io.element.android.libraries.matrixtest.auth.FakeAuthenticationService diff --git a/features/login/src/test/kotlin/io/element/android/features/login/root/LoginRootPresenterTest.kt b/features/login/src/test/kotlin/io/element/android/features/login/root/LoginRootPresenterTest.kt index 36f4081ca9..6a69311438 100644 --- a/features/login/src/test/kotlin/io/element/android/features/login/root/LoginRootPresenterTest.kt +++ b/features/login/src/test/kotlin/io/element/android/features/login/root/LoginRootPresenterTest.kt @@ -22,10 +22,10 @@ import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat -import io.element.android.features.login.implementation.root.LoggedInState -import io.element.android.features.login.implementation.root.LoginFormState -import io.element.android.features.login.implementation.root.LoginRootEvents -import io.element.android.features.login.implementation.root.LoginRootPresenter +import io.element.android.features.login.impl.root.LoggedInState +import io.element.android.features.login.impl.root.LoginFormState +import io.element.android.features.login.impl.root.LoginRootEvents +import io.element.android.features.login.impl.root.LoginRootPresenter import io.element.android.libraries.matrix.core.SessionId import io.element.android.libraries.matrixtest.A_HOMESERVER import io.element.android.libraries.matrixtest.A_HOMESERVER_2 diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/DefaultOnBoardingEntryPoint.kt b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/DefaultOnBoardingEntryPoint.kt similarity index 95% rename from features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/DefaultOnBoardingEntryPoint.kt rename to features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/DefaultOnBoardingEntryPoint.kt index fc6b19d6a4..1475d18778 100644 --- a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/DefaultOnBoardingEntryPoint.kt +++ b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/DefaultOnBoardingEntryPoint.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.onboarding.implementation +package io.element.android.features.onboarding.impl import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/OnBoardingNode.kt b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingNode.kt similarity index 96% rename from features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/OnBoardingNode.kt rename to features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingNode.kt index f46d8e7b07..a6cb0a3b49 100644 --- a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/OnBoardingNode.kt +++ b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingNode.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.onboarding.implementation +package io.element.android.features.onboarding.impl import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/OnBoardingScreen.kt b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingScreen.kt similarity index 99% rename from features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/OnBoardingScreen.kt rename to features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingScreen.kt index d154aec02c..f189bd0afc 100644 --- a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/OnBoardingScreen.kt +++ b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingScreen.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.onboarding.implementation +package io.element.android.features.onboarding.impl import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Box diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/SplashCarouselData.kt b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/SplashCarouselData.kt similarity index 93% rename from features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/SplashCarouselData.kt rename to features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/SplashCarouselData.kt index 184c85a90e..c4674b3ead 100644 --- a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/SplashCarouselData.kt +++ b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/SplashCarouselData.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.onboarding.implementation +package io.element.android.features.onboarding.impl import androidx.annotation.DrawableRes import androidx.annotation.StringRes diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/SplashCarouselDataFactory.kt b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/SplashCarouselDataFactory.kt similarity index 97% rename from features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/SplashCarouselDataFactory.kt rename to features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/SplashCarouselDataFactory.kt index a8d358387f..0ae33d70b4 100644 --- a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/implementation/SplashCarouselDataFactory.kt +++ b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/SplashCarouselDataFactory.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.onboarding.implementation +package io.element.android.features.onboarding.impl import androidx.annotation.DrawableRes import io.element.android.features.onboarding.R diff --git a/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/LoginScreen.kt b/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/LoginScreen.kt index d735f9124b..1b5be5ebeb 100644 --- a/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/LoginScreen.kt +++ b/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/LoginScreen.kt @@ -19,8 +19,8 @@ package io.element.android.samples.minimal import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.Modifier -import io.element.android.features.login.implementation.root.LoginRootPresenter -import io.element.android.features.login.implementation.root.LoginRootScreen +import io.element.android.features.login.impl.root.LoginRootPresenter +import io.element.android.features.login.impl.root.LoginRootScreen import io.element.android.libraries.matrix.auth.MatrixAuthenticationService class LoginScreen(private val authenticationService: MatrixAuthenticationService) { From 15ed58b7564fbc740aa1164aa2c1c53dec08e46b Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 2 Mar 2023 15:59:25 +0100 Subject: [PATCH 03/25] [Architecture] use FeatureEntryPoint on Preferences --- .../android/x/node/LoggedInFlowNode.kt | 9 +++-- .../io/element/android/x/node/RoomFlowNode.kt | 2 +- .../features/login/api/LoginEntryPoint.kt | 4 +-- .../onboarding/api/OnBoardingEntryPoint.kt | 4 +-- .../preferences/api/PreferencesEntryPoint.kt | 26 +++++++++++++++ .../impl/DefaultPreferencesEntryPoint.kt | 33 +++++++++++++++++++ .../{ => impl}/PreferencesFlowNode.kt | 24 +++++++------- .../{ => impl}/root/PreferencesRootNode.kt | 2 +- .../root/PreferencesRootPresenter.kt | 2 +- .../{ => impl}/root/PreferencesRootState.kt | 2 +- .../root/PreferencesRootStateProvider.kt | 2 +- .../{ => impl}/root/PreferencesRootView.kt | 4 +-- .../{ => impl}/user/UserPreferences.kt | 2 +- .../root/PreferencesRootPresenterTest.kt | 1 + .../bugreport/BugReportEntryPoint.kt | 4 +-- .../roomlist/api/RoomListEntryPoint.kt | 4 +-- .../{EntryPoint.kt => FeatureEntryPoint.kt} | 2 +- 17 files changed, 94 insertions(+), 33 deletions(-) create mode 100644 features/preferences/src/main/kotlin/io/element/android/features/preferences/api/PreferencesEntryPoint.kt create mode 100644 features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/DefaultPreferencesEntryPoint.kt rename features/preferences/src/main/kotlin/io/element/android/features/preferences/{ => impl}/PreferencesFlowNode.kt (80%) rename features/preferences/src/main/kotlin/io/element/android/features/preferences/{ => impl}/root/PreferencesRootNode.kt (96%) rename features/preferences/src/main/kotlin/io/element/android/features/preferences/{ => impl}/root/PreferencesRootPresenter.kt (96%) rename features/preferences/src/main/kotlin/io/element/android/features/preferences/{ => impl}/root/PreferencesRootState.kt (94%) rename features/preferences/src/main/kotlin/io/element/android/features/preferences/{ => impl}/root/PreferencesRootStateProvider.kt (94%) rename features/preferences/src/main/kotlin/io/element/android/features/preferences/{ => impl}/root/PreferencesRootView.kt (95%) rename features/preferences/src/main/kotlin/io/element/android/features/preferences/{ => impl}/user/UserPreferences.kt (97%) rename libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/{EntryPoint.kt => FeatureEntryPoint.kt} (96%) diff --git a/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt b/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt index ac58edbc93..a86daa5380 100644 --- a/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt +++ b/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt @@ -36,7 +36,7 @@ import com.bumble.appyx.navmodel.backstack.operation.push import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode -import io.element.android.features.preferences.PreferencesFlowNode +import io.element.android.features.preferences.api.PreferencesEntryPoint import io.element.android.features.roomlist.api.RoomListEntryPoint import io.element.android.libraries.architecture.NodeInputs import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler @@ -59,6 +59,7 @@ class LoggedInFlowNode( plugins: List, private val backstack: BackStack, private val roomListEntryPoint: RoomListEntryPoint, + private val preferencesEntryPoint: PreferencesEntryPoint, ) : ParentNode( navModel = backstack, buildContext = buildContext, @@ -70,10 +71,12 @@ class LoggedInFlowNode( @Assisted buildContext: BuildContext, @Assisted plugins: List, roomListEntryPoint: RoomListEntryPoint, + preferencesEntryPoint: PreferencesEntryPoint, ) : this( buildContext = buildContext, plugins = plugins, roomListEntryPoint = roomListEntryPoint, + preferencesEntryPoint = preferencesEntryPoint, backstack = BackStack( initialElement = NavTarget.RoomList, savedStateMap = buildContext.savedStateMap, @@ -149,12 +152,12 @@ class LoggedInFlowNode( } } NavTarget.Settings -> { - val callback = object : PreferencesFlowNode.Callback { + val callback = object : PreferencesEntryPoint.Callback { override fun onOpenBugReport() { plugins().forEach { it.onOpenBugReport() } } } - createNode(buildContext, plugins = listOf(callback)) + preferencesEntryPoint.node(this, buildContext, plugins = listOf(callback)) } } } diff --git a/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt b/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt index 900d0f7989..4d5c120958 100644 --- a/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt +++ b/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt @@ -42,7 +42,7 @@ import kotlinx.parcelize.Parcelize import timber.log.Timber @ContributesNode(SessionScope::class) -class RoomFlowNode( +class RoomFlowNode private constructor( buildContext: BuildContext, plugins: List, private val backstack: BackStack, diff --git a/features/login/src/main/kotlin/io/element/android/features/login/api/LoginEntryPoint.kt b/features/login/src/main/kotlin/io/element/android/features/login/api/LoginEntryPoint.kt index 6a64b459d2..59fe87007d 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/api/LoginEntryPoint.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/api/LoginEntryPoint.kt @@ -16,6 +16,6 @@ package io.element.android.features.login.api -import io.element.android.libraries.architecture.EntryPoint +import io.element.android.libraries.architecture.FeatureEntryPoint -interface LoginEntryPoint : EntryPoint +interface LoginEntryPoint : FeatureEntryPoint diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/api/OnBoardingEntryPoint.kt b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/api/OnBoardingEntryPoint.kt index b603e8d40e..8c256547c3 100644 --- a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/api/OnBoardingEntryPoint.kt +++ b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/api/OnBoardingEntryPoint.kt @@ -17,9 +17,9 @@ package io.element.android.features.onboarding.api import com.bumble.appyx.core.plugin.Plugin -import io.element.android.libraries.architecture.EntryPoint +import io.element.android.libraries.architecture.FeatureEntryPoint -interface OnBoardingEntryPoint : EntryPoint { +interface OnBoardingEntryPoint : FeatureEntryPoint { interface Callback : Plugin { fun onSignUp() fun onSignIn() diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/api/PreferencesEntryPoint.kt b/features/preferences/src/main/kotlin/io/element/android/features/preferences/api/PreferencesEntryPoint.kt new file mode 100644 index 0000000000..1ed5fe3823 --- /dev/null +++ b/features/preferences/src/main/kotlin/io/element/android/features/preferences/api/PreferencesEntryPoint.kt @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.preferences.api + +import com.bumble.appyx.core.plugin.Plugin +import io.element.android.libraries.architecture.FeatureEntryPoint + +interface PreferencesEntryPoint: FeatureEntryPoint { + interface Callback : Plugin { + fun onOpenBugReport() + } +} diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/DefaultPreferencesEntryPoint.kt b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/DefaultPreferencesEntryPoint.kt new file mode 100644 index 0000000000..91ba3bf0a3 --- /dev/null +++ b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/DefaultPreferencesEntryPoint.kt @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.preferences.impl + +import com.bumble.appyx.core.modality.BuildContext +import com.bumble.appyx.core.node.Node +import com.bumble.appyx.core.plugin.Plugin +import com.squareup.anvil.annotations.ContributesBinding +import io.element.android.features.preferences.api.PreferencesEntryPoint +import io.element.android.libraries.architecture.createNode +import io.element.android.libraries.di.AppScope +import javax.inject.Inject + +@ContributesBinding(AppScope::class) +class DefaultPreferencesEntryPoint @Inject constructor() : PreferencesEntryPoint { + override fun node(parentNode: Node, buildContext: BuildContext, plugins: List): Node { + return parentNode.createNode(buildContext, plugins) + } +} diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/PreferencesFlowNode.kt b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/PreferencesFlowNode.kt similarity index 80% rename from features/preferences/src/main/kotlin/io/element/android/features/preferences/PreferencesFlowNode.kt rename to features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/PreferencesFlowNode.kt index 54eb593ee7..fa76f5b3e7 100644 --- a/features/preferences/src/main/kotlin/io/element/android/features/preferences/PreferencesFlowNode.kt +++ b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/PreferencesFlowNode.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.preferences +package io.element.android.features.preferences.impl import android.os.Parcelable import androidx.compose.runtime.Composable @@ -29,7 +29,8 @@ import com.bumble.appyx.navmodel.backstack.BackStack import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode -import io.element.android.features.preferences.root.PreferencesRootNode +import io.element.android.features.preferences.api.PreferencesEntryPoint +import io.element.android.features.preferences.impl.root.PreferencesRootNode import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler import io.element.android.libraries.architecture.createNode import io.element.android.libraries.di.SessionScope @@ -56,16 +57,6 @@ class PreferencesFlowNode( ) ) - interface Callback : Plugin { - fun onOpenBugReport() - } - - private val preferencesRootNodeCallback = object : PreferencesRootNode.Callback { - override fun onOpenBugReport() { - plugins().forEach { it.onOpenBugReport() } - } - } - sealed interface NavTarget : Parcelable { @Parcelize object Root : NavTarget @@ -73,7 +64,14 @@ class PreferencesFlowNode( override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node { return when (navTarget) { - NavTarget.Root -> createNode(buildContext, plugins = listOf(preferencesRootNodeCallback)) + NavTarget.Root -> { + val callback = object : PreferencesRootNode.Callback { + override fun onOpenBugReport() { + plugins().forEach { it.onOpenBugReport() } + } + } + createNode(buildContext, plugins = listOf(callback)) + } } } diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootNode.kt b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt similarity index 96% rename from features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootNode.kt rename to features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt index cd9ed99302..36e4afab84 100644 --- a/features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootNode.kt +++ b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.preferences.root +package io.element.android.features.preferences.impl.root import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootPresenter.kt b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenter.kt similarity index 96% rename from features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootPresenter.kt rename to features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenter.kt index b9df73853c..eebc52ab36 100644 --- a/features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootPresenter.kt +++ b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.preferences.root +package io.element.android.features.preferences.impl.root import androidx.compose.runtime.Composable import io.element.android.features.logout.LogoutPreferencePresenter diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootState.kt b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootState.kt similarity index 94% rename from features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootState.kt rename to features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootState.kt index 2bcc9fc549..38704b3674 100644 --- a/features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootState.kt +++ b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootState.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.preferences.root +package io.element.android.features.preferences.impl.root import io.element.android.features.logout.LogoutPreferenceState import io.element.android.features.rageshake.preferences.RageshakePreferencesState diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootStateProvider.kt b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootStateProvider.kt similarity index 94% rename from features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootStateProvider.kt rename to features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootStateProvider.kt index dc9f23afd7..619c20a047 100644 --- a/features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootStateProvider.kt +++ b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootStateProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.preferences.root +package io.element.android.features.preferences.impl.root import io.element.android.features.logout.aLogoutPreferenceState import io.element.android.features.rageshake.preferences.aRageshakePreferencesState diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootView.kt b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt similarity index 95% rename from features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootView.kt rename to features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt index 8e84ed8ae0..39827dcd7e 100644 --- a/features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootView.kt +++ b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.preferences.root +package io.element.android.features.preferences.impl.root import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -22,7 +22,7 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import io.element.android.features.logout.LogoutPreferenceView -import io.element.android.features.preferences.user.UserPreferences +import io.element.android.features.preferences.impl.user.UserPreferences import io.element.android.features.rageshake.preferences.RageshakePreferencesView import io.element.android.libraries.architecture.Async import io.element.android.libraries.designsystem.components.preferences.PreferenceView diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/user/UserPreferences.kt b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/user/UserPreferences.kt similarity index 97% rename from features/preferences/src/main/kotlin/io/element/android/features/preferences/user/UserPreferences.kt rename to features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/user/UserPreferences.kt index 34e0137137..5b9dda8c28 100644 --- a/features/preferences/src/main/kotlin/io/element/android/features/preferences/user/UserPreferences.kt +++ b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/user/UserPreferences.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.preferences.user +package io.element.android.features.preferences.impl.user import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.height diff --git a/features/preferences/src/test/kotlin/io/element/android/features/preferences/root/PreferencesRootPresenterTest.kt b/features/preferences/src/test/kotlin/io/element/android/features/preferences/root/PreferencesRootPresenterTest.kt index 77d5ff9a07..cf303c8384 100644 --- a/features/preferences/src/test/kotlin/io/element/android/features/preferences/root/PreferencesRootPresenterTest.kt +++ b/features/preferences/src/test/kotlin/io/element/android/features/preferences/root/PreferencesRootPresenterTest.kt @@ -23,6 +23,7 @@ import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat import io.element.android.features.logout.LogoutPreferencePresenter +import io.element.android.features.preferences.impl.root.PreferencesRootPresenter import io.element.android.features.rageshake.preferences.RageshakePreferencesPresenter import io.element.android.libraries.architecture.Async import io.element.android.libraries.matrixtest.FakeMatrixClient diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportEntryPoint.kt b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportEntryPoint.kt index 43f916328d..46a3e3bbf4 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportEntryPoint.kt +++ b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportEntryPoint.kt @@ -17,9 +17,9 @@ package io.element.android.features.rageshake.bugreport import com.bumble.appyx.core.plugin.Plugin -import io.element.android.libraries.architecture.EntryPoint +import io.element.android.libraries.architecture.FeatureEntryPoint -interface BugReportEntryPoint : EntryPoint { +interface BugReportEntryPoint : FeatureEntryPoint { interface Callback : Plugin { fun onBugReportSent() } diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt index cadd4ea93d..5b5608c589 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt @@ -17,10 +17,10 @@ package io.element.android.features.roomlist.api import com.bumble.appyx.core.plugin.Plugin -import io.element.android.libraries.architecture.EntryPoint +import io.element.android.libraries.architecture.FeatureEntryPoint import io.element.android.libraries.matrix.core.RoomId -interface RoomListEntryPoint : EntryPoint { +interface RoomListEntryPoint : FeatureEntryPoint { interface Callback : Plugin { fun onRoomClicked(roomId: RoomId) fun onSettingsClicked() diff --git a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/EntryPoint.kt b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/FeatureEntryPoint.kt similarity index 96% rename from libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/EntryPoint.kt rename to libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/FeatureEntryPoint.kt index 4330b67e7e..974d3d553c 100644 --- a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/EntryPoint.kt +++ b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/FeatureEntryPoint.kt @@ -20,6 +20,6 @@ import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.plugin.Plugin -interface EntryPoint { +interface FeatureEntryPoint { fun node(parentNode: Node, buildContext: BuildContext, plugins: List = emptyList()): Node } From c581f0b3835bb89a67bdfad86cbb9469ffa1bb70 Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 2 Mar 2023 17:55:26 +0100 Subject: [PATCH 04/25] [Architecture] introduce BackstackNode --- .../android/x/node/LoggedInFlowNode.kt | 33 ++++---------- .../android/x/node/NotLoggedInFlowNode.kt | 31 ++++--------- .../io/element/android/x/node/RoomFlowNode.kt | 26 ++++------- .../io/element/android/x/node/RootFlowNode.kt | 44 +++++-------------- features/login/build.gradle.kts | 2 +- .../features/login/impl/LoginFlowNode.kt | 25 ++++------- features/logout/build.gradle.kts | 2 +- features/messages/build.gradle.kts | 2 +- features/onboarding/build.gradle.kts | 2 +- features/preferences/build.gradle.kts | 2 +- .../preferences/impl/PreferencesFlowNode.kt | 26 ++++------- features/rageshake/build.gradle.kts | 2 +- features/roomlist/build.gradle.kts | 2 +- features/template/build.gradle.kts | 2 +- .../libraries/architecture/BackstackNode.kt | 38 ++++++++++++++++ 15 files changed, 103 insertions(+), 136 deletions(-) create mode 100644 libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/BackstackNode.kt diff --git a/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt b/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt index a86daa5380..e627f0d448 100644 --- a/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt +++ b/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt @@ -27,7 +27,6 @@ import com.bumble.appyx.core.composable.Children import com.bumble.appyx.core.lifecycle.subscribe import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node -import com.bumble.appyx.core.node.ParentNode import com.bumble.appyx.core.node.node import com.bumble.appyx.core.plugin.Plugin import com.bumble.appyx.core.plugin.plugins @@ -38,6 +37,7 @@ import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode import io.element.android.features.preferences.api.PreferencesEntryPoint import io.element.android.features.roomlist.api.RoomListEntryPoint +import io.element.android.libraries.architecture.BackstackNode import io.element.android.libraries.architecture.NodeInputs import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler import io.element.android.libraries.architecture.bindings @@ -54,35 +54,20 @@ import io.element.android.x.di.SessionComponent import kotlinx.parcelize.Parcelize @ContributesNode(AppScope::class) -class LoggedInFlowNode( - buildContext: BuildContext, - plugins: List, - private val backstack: BackStack, +class LoggedInFlowNode @AssistedInject constructor( + @Assisted buildContext: BuildContext, + @Assisted plugins: List, private val roomListEntryPoint: RoomListEntryPoint, private val preferencesEntryPoint: PreferencesEntryPoint, -) : ParentNode( - navModel = backstack, +) : BackstackNode( + backstack = BackStack( + initialElement = NavTarget.RoomList, + savedStateMap = buildContext.savedStateMap, + ), buildContext = buildContext, plugins = plugins ), DaggerComponentOwner { - @AssistedInject - constructor( - @Assisted buildContext: BuildContext, - @Assisted plugins: List, - roomListEntryPoint: RoomListEntryPoint, - preferencesEntryPoint: PreferencesEntryPoint, - ) : this( - buildContext = buildContext, - plugins = plugins, - roomListEntryPoint = roomListEntryPoint, - preferencesEntryPoint = preferencesEntryPoint, - backstack = BackStack( - initialElement = NavTarget.RoomList, - savedStateMap = buildContext.savedStateMap, - ) - ) - interface Callback : Plugin { fun onOpenBugReport() } diff --git a/app/src/main/kotlin/io/element/android/x/node/NotLoggedInFlowNode.kt b/app/src/main/kotlin/io/element/android/x/node/NotLoggedInFlowNode.kt index 6a8b66c7f9..4b4c4be66c 100644 --- a/app/src/main/kotlin/io/element/android/x/node/NotLoggedInFlowNode.kt +++ b/app/src/main/kotlin/io/element/android/x/node/NotLoggedInFlowNode.kt @@ -23,7 +23,6 @@ import com.bumble.appyx.core.composable.Children import com.bumble.appyx.core.lifecycle.subscribe import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node -import com.bumble.appyx.core.node.ParentNode import com.bumble.appyx.core.plugin.Plugin import com.bumble.appyx.navmodel.backstack.BackStack import com.bumble.appyx.navmodel.backstack.operation.push @@ -32,38 +31,26 @@ import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode import io.element.android.features.login.api.LoginEntryPoint import io.element.android.features.onboarding.api.OnBoardingEntryPoint +import io.element.android.libraries.architecture.BackstackNode import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler import io.element.android.libraries.di.AppScope import kotlinx.parcelize.Parcelize import timber.log.Timber @ContributesNode(AppScope::class) -class NotLoggedInFlowNode private constructor( - buildContext: BuildContext, - plugins: List, +class NotLoggedInFlowNode @AssistedInject constructor( + @Assisted buildContext: BuildContext, + @Assisted plugins: List, private val onBoardingEntryPoint: OnBoardingEntryPoint, private val loginEntryPoint: LoginEntryPoint, - private val backstack: BackStack, -) : ParentNode( - navModel = backstack, +) : BackstackNode( + backstack = BackStack( + initialElement = NavTarget.OnBoarding, + savedStateMap = buildContext.savedStateMap + ), buildContext = buildContext, plugins = plugins, ) { - @AssistedInject - constructor( - @Assisted buildContext: BuildContext, - @Assisted plugins: List, - onBoardingEntryPoint: OnBoardingEntryPoint, - loginEntryPoint: LoginEntryPoint, - ) - : this( - buildContext = buildContext, - plugins = plugins, - onBoardingEntryPoint = onBoardingEntryPoint, - loginEntryPoint = loginEntryPoint, - backstack = BackStack(initialElement = NavTarget.OnBoarding, savedStateMap = buildContext.savedStateMap), - ) - init { lifecycle.subscribe( onCreate = { Timber.v("OnCreate") }, diff --git a/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt b/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt index 4d5c120958..d00b2e2414 100644 --- a/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt +++ b/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt @@ -23,13 +23,13 @@ import com.bumble.appyx.core.composable.Children import com.bumble.appyx.core.lifecycle.subscribe import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node -import com.bumble.appyx.core.node.ParentNode import com.bumble.appyx.core.plugin.Plugin import com.bumble.appyx.navmodel.backstack.BackStack import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode import io.element.android.features.messages.MessagesNode +import io.element.android.libraries.architecture.BackstackNode import io.element.android.libraries.architecture.NodeInputs import io.element.android.libraries.architecture.bindings import io.element.android.libraries.architecture.createNode @@ -42,12 +42,14 @@ import kotlinx.parcelize.Parcelize import timber.log.Timber @ContributesNode(SessionScope::class) -class RoomFlowNode private constructor( - buildContext: BuildContext, - plugins: List, - private val backstack: BackStack, -) : ParentNode( - navModel = backstack, +class RoomFlowNode @AssistedInject constructor( + @Assisted buildContext: BuildContext, + @Assisted plugins: List, +) : BackstackNode( + backstack = BackStack( + initialElement = NavTarget.Messages, + savedStateMap = buildContext.savedStateMap, + ), buildContext = buildContext, plugins = plugins, ), DaggerComponentOwner { @@ -56,16 +58,6 @@ class RoomFlowNode private constructor( val room: MatrixRoom, ) : NodeInputs - @AssistedInject - constructor(@Assisted buildContext: BuildContext, @Assisted plugins: List) : this( - buildContext = buildContext, - plugins = plugins, - backstack = BackStack( - initialElement = NavTarget.Messages, - savedStateMap = buildContext.savedStateMap, - ), - ) - private val inputs: Inputs by nodeInputs() override val daggerComponent: Any by lazy { diff --git a/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt b/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt index b35ddba736..6120833e15 100644 --- a/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt +++ b/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt @@ -27,7 +27,6 @@ import androidx.lifecycle.lifecycleScope import com.bumble.appyx.core.composable.Children import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node -import com.bumble.appyx.core.node.ParentNode import com.bumble.appyx.core.node.node import com.bumble.appyx.core.plugin.Plugin import com.bumble.appyx.navmodel.backstack.BackStack @@ -38,6 +37,8 @@ import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode import io.element.android.features.rageshake.bugreport.BugReportEntryPoint +import io.element.android.features.rageshake.bugreport.BugReportNode +import io.element.android.libraries.architecture.BackstackNode import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler import io.element.android.libraries.architecture.createNode import io.element.android.libraries.architecture.nodeInputsProvider @@ -57,46 +58,25 @@ import kotlinx.parcelize.Parcelize import timber.log.Timber @ContributesNode(AppScope::class) -class RootFlowNode private constructor( - private val buildContext: BuildContext, - private val backstack: BackStack = BackStack( - initialElement = NavTarget.SplashScreen, - savedStateMap = buildContext.savedStateMap, - ), - private val appComponentOwner: DaggerComponentOwner, +class RootFlowNode @AssistedInject constructor( + @Assisted buildContext: BuildContext, + @Assisted plugins: List, + @ApplicationContext context: Context, private val authenticationService: MatrixAuthenticationService, private val matrixClientsHolder: MatrixClientsHolder, private val presenter: RootPresenter, private val bugReportEntryPoint: BugReportEntryPoint, ) : - ParentNode( - navModel = backstack, - buildContext = buildContext - ), - - DaggerComponentOwner by appComponentOwner { - - @AssistedInject - constructor( - @Assisted buildContext: BuildContext, - @Assisted plugins: List, - @ApplicationContext context: Context, - authenticationService: MatrixAuthenticationService, - matrixClientsHolder: MatrixClientsHolder, - presenter: RootPresenter, - bugReportEntryPoint: BugReportEntryPoint, - ) : this( - buildContext = buildContext, + BackstackNode( backstack = BackStack( initialElement = NavTarget.SplashScreen, savedStateMap = buildContext.savedStateMap, ), - appComponentOwner = context.applicationContext as DaggerComponentOwner, - authenticationService = authenticationService, - matrixClientsHolder = matrixClientsHolder, - presenter = presenter, - bugReportEntryPoint = bugReportEntryPoint, - ) + buildContext = buildContext, + plugins = plugins + ), + + DaggerComponentOwner by (context as DaggerComponentOwner) { override fun onBuilt() { super.onBuilt() diff --git a/features/login/build.gradle.kts b/features/login/build.gradle.kts index f4f8ca4844..29ddbec57d 100644 --- a/features/login/build.gradle.kts +++ b/features/login/build.gradle.kts @@ -18,8 +18,8 @@ @Suppress("DSL_SCOPE_VIOLATION") plugins { id("io.element.android-compose-library") - alias(libs.plugins.ksp) alias(libs.plugins.anvil) + alias(libs.plugins.ksp) id("kotlin-parcelize") } diff --git a/features/login/src/main/kotlin/io/element/android/features/login/impl/LoginFlowNode.kt b/features/login/src/main/kotlin/io/element/android/features/login/impl/LoginFlowNode.kt index a9061a2ef4..75735f698f 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/impl/LoginFlowNode.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/impl/LoginFlowNode.kt @@ -31,32 +31,25 @@ import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode import io.element.android.features.login.impl.changeserver.ChangeServerNode import io.element.android.features.login.impl.root.LoginRootNode +import io.element.android.libraries.architecture.BackstackNode import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler import io.element.android.libraries.architecture.createNode import io.element.android.libraries.di.AppScope import kotlinx.parcelize.Parcelize @ContributesNode(AppScope::class) -class LoginFlowNode( - buildContext: BuildContext, - plugins: List, - private val backstack: BackStack, -) : ParentNode( - navModel = backstack, +class LoginFlowNode @AssistedInject constructor( + @Assisted buildContext: BuildContext, + @Assisted plugins: List, +) : BackstackNode( + backstack = BackStack( + initialElement = NavTarget.Root, + savedStateMap = buildContext.savedStateMap, + ), buildContext = buildContext, plugins = plugins, ) { - @AssistedInject - constructor(@Assisted buildContext: BuildContext, @Assisted plugins: List) : this( - buildContext = buildContext, - plugins = plugins, - backstack = BackStack( - initialElement = NavTarget.Root, - savedStateMap = buildContext.savedStateMap, - ), - ) - sealed interface NavTarget : Parcelable { @Parcelize object Root : NavTarget diff --git a/features/logout/build.gradle.kts b/features/logout/build.gradle.kts index 2935965b80..16581ba58a 100644 --- a/features/logout/build.gradle.kts +++ b/features/logout/build.gradle.kts @@ -18,8 +18,8 @@ @Suppress("DSL_SCOPE_VIOLATION") plugins { id("io.element.android-compose-library") - alias(libs.plugins.ksp) alias(libs.plugins.anvil) + alias(libs.plugins.ksp) } android { diff --git a/features/messages/build.gradle.kts b/features/messages/build.gradle.kts index 1eb054d3d0..a6ecc71a80 100644 --- a/features/messages/build.gradle.kts +++ b/features/messages/build.gradle.kts @@ -18,8 +18,8 @@ @Suppress("DSL_SCOPE_VIOLATION") plugins { id("io.element.android-compose-library") - alias(libs.plugins.ksp) alias(libs.plugins.anvil) + alias(libs.plugins.ksp) } android { diff --git a/features/onboarding/build.gradle.kts b/features/onboarding/build.gradle.kts index d9636304aa..61e5371095 100644 --- a/features/onboarding/build.gradle.kts +++ b/features/onboarding/build.gradle.kts @@ -18,8 +18,8 @@ @Suppress("DSL_SCOPE_VIOLATION") plugins { id("io.element.android-compose-library") - alias(libs.plugins.ksp) alias(libs.plugins.anvil) + alias(libs.plugins.ksp) } android { diff --git a/features/preferences/build.gradle.kts b/features/preferences/build.gradle.kts index ba069e6333..fadd8a7e05 100644 --- a/features/preferences/build.gradle.kts +++ b/features/preferences/build.gradle.kts @@ -18,8 +18,8 @@ @Suppress("DSL_SCOPE_VIOLATION") plugins { id("io.element.android-compose-library") - alias(libs.plugins.ksp) alias(libs.plugins.anvil) + alias(libs.plugins.ksp) id("kotlin-parcelize") } diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/PreferencesFlowNode.kt b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/PreferencesFlowNode.kt index fa76f5b3e7..30b4d0a65c 100644 --- a/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/PreferencesFlowNode.kt +++ b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/PreferencesFlowNode.kt @@ -22,7 +22,6 @@ import androidx.compose.ui.Modifier import com.bumble.appyx.core.composable.Children import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node -import com.bumble.appyx.core.node.ParentNode import com.bumble.appyx.core.plugin.Plugin import com.bumble.appyx.core.plugin.plugins import com.bumble.appyx.navmodel.backstack.BackStack @@ -31,32 +30,25 @@ import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode import io.element.android.features.preferences.api.PreferencesEntryPoint import io.element.android.features.preferences.impl.root.PreferencesRootNode +import io.element.android.libraries.architecture.BackstackNode import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler import io.element.android.libraries.architecture.createNode import io.element.android.libraries.di.SessionScope import kotlinx.parcelize.Parcelize @ContributesNode(SessionScope::class) -class PreferencesFlowNode( - buildContext: BuildContext, - plugins: List, - private val backstack: BackStack, -) : ParentNode( - navModel = backstack, +class PreferencesFlowNode @AssistedInject constructor( + @Assisted buildContext: BuildContext, + @Assisted plugins: List, +) : BackstackNode( + backstack = BackStack( + initialElement = NavTarget.Root, + savedStateMap = buildContext.savedStateMap, + ), buildContext = buildContext, plugins = plugins ) { - @AssistedInject - constructor(@Assisted buildContext: BuildContext, @Assisted plugins: List) : this( - buildContext = buildContext, - plugins = plugins, - backstack = BackStack( - initialElement = NavTarget.Root, - savedStateMap = buildContext.savedStateMap, - ) - ) - sealed interface NavTarget : Parcelable { @Parcelize object Root : NavTarget diff --git a/features/rageshake/build.gradle.kts b/features/rageshake/build.gradle.kts index 45cc9cdd64..37fb8e1d3f 100644 --- a/features/rageshake/build.gradle.kts +++ b/features/rageshake/build.gradle.kts @@ -18,8 +18,8 @@ @Suppress("DSL_SCOPE_VIOLATION") plugins { id("io.element.android-compose-library") - alias(libs.plugins.ksp) alias(libs.plugins.anvil) + alias(libs.plugins.ksp) id("kotlin-parcelize") } diff --git a/features/roomlist/build.gradle.kts b/features/roomlist/build.gradle.kts index fe8112fb81..60f8c83b3c 100644 --- a/features/roomlist/build.gradle.kts +++ b/features/roomlist/build.gradle.kts @@ -18,8 +18,8 @@ @Suppress("DSL_SCOPE_VIOLATION") plugins { id("io.element.android-compose-library") - alias(libs.plugins.ksp) alias(libs.plugins.anvil) + alias(libs.plugins.ksp) } android { diff --git a/features/template/build.gradle.kts b/features/template/build.gradle.kts index 47cf8f490c..5dd2946f96 100644 --- a/features/template/build.gradle.kts +++ b/features/template/build.gradle.kts @@ -18,8 +18,8 @@ @Suppress("DSL_SCOPE_VIOLATION") plugins { id("io.element.android-compose-library") - alias(libs.plugins.ksp) alias(libs.plugins.anvil) + alias(libs.plugins.ksp) } android { diff --git a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/BackstackNode.kt b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/BackstackNode.kt new file mode 100644 index 0000000000..c59a4a4483 --- /dev/null +++ b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/BackstackNode.kt @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.libraries.architecture + +import androidx.compose.runtime.Stable +import com.bumble.appyx.Appyx +import com.bumble.appyx.core.children.ChildEntry +import com.bumble.appyx.core.modality.BuildContext +import com.bumble.appyx.core.node.ParentNode +import com.bumble.appyx.core.plugin.Plugin +import com.bumble.appyx.navmodel.backstack.BackStack + +@Stable +abstract class BackstackNode( + val backstack: BackStack, + buildContext: BuildContext, + childKeepMode: ChildEntry.KeepMode = Appyx.defaultChildKeepMode, + plugins: List +) : ParentNode( + navModel = backstack, + buildContext = buildContext, + plugins = plugins, + childKeepMode = childKeepMode, +) From d1cbd907e76555780eefe54427ced4663c8ab648 Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 2 Mar 2023 18:06:31 +0100 Subject: [PATCH 05/25] [Architecture] clean up --- features/onboarding/build.gradle.kts | 1 - .../reporter/BugReporterMultipartBody.java | 18 +++++++++--------- .../rageshake/reporter/DefaultBugReporter.kt | 16 ++++++++-------- 3 files changed, 17 insertions(+), 18 deletions(-) rename features/rageshake/src/main/{java => kotlin}/io/element/android/features/rageshake/reporter/BugReporterMultipartBody.java (95%) diff --git a/features/onboarding/build.gradle.kts b/features/onboarding/build.gradle.kts index 61e5371095..85016fd90e 100644 --- a/features/onboarding/build.gradle.kts +++ b/features/onboarding/build.gradle.kts @@ -30,7 +30,6 @@ anvil { generateDaggerFactories.set(true) } - dependencies { implementation(projects.libraries.core) implementation(projects.libraries.elementresources) diff --git a/features/rageshake/src/main/java/io/element/android/features/rageshake/reporter/BugReporterMultipartBody.java b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/BugReporterMultipartBody.java similarity index 95% rename from features/rageshake/src/main/java/io/element/android/features/rageshake/reporter/BugReporterMultipartBody.java rename to features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/BugReporterMultipartBody.java index fdd858abfd..aa499c3f86 100755 --- a/features/rageshake/src/main/java/io/element/android/features/rageshake/reporter/BugReporterMultipartBody.java +++ b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/BugReporterMultipartBody.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,7 +39,7 @@ public class BugReporterMultipartBody extends RequestBody { /** * Upload listener * - * @param totalWritten total written bytes + * @param totalWritten total written bytes * @param contentLength content length */ void onWrite(long totalWritten, long contentLength); @@ -132,24 +132,24 @@ public class BugReporterMultipartBody extends RequestBody { if (headers != null) { for (int h = 0, headerCount = headers.size(); h < headerCount; h++) { sink.writeUtf8(headers.name(h)) - .write(COLONSPACE) - .writeUtf8(headers.value(h)) - .write(CRLF); + .write(COLONSPACE) + .writeUtf8(headers.value(h)) + .write(CRLF); } } MediaType contentType = body.contentType(); if (contentType != null) { sink.writeUtf8("Content-Type: ") - .writeUtf8(contentType.toString()) - .write(CRLF); + .writeUtf8(contentType.toString()) + .write(CRLF); } int contentLength = (int) body.contentLength(); if (contentLength != -1) { sink.writeUtf8("Content-Length: ") - .writeUtf8(contentLength + "") - .write(CRLF); + .writeUtf8(contentLength + "") + .write(CRLF); } else if (countBytes) { // We can't measure the body's size without the sizes of its components. byteCountBuffer.clear(); diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/DefaultBugReporter.kt b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/DefaultBugReporter.kt index cfc0c68561..97acad889b 100755 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/DefaultBugReporter.kt +++ b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/DefaultBugReporter.kt @@ -260,15 +260,15 @@ class DefaultBugReporter @Inject constructor( ?.toUri() ?.toFile() ?.let { screenshotFile -> - try { - builder.addFormDataPart( - "file", - screenshotFile.name, screenshotFile.asRequestBody(MimeTypes.OctetStream.toMediaTypeOrNull()) - ) - } catch (e: Exception) { - Timber.e(e, "## sendBugReport() : fail to write screenshot") + try { + builder.addFormDataPart( + "file", + screenshotFile.name, screenshotFile.asRequestBody(MimeTypes.OctetStream.toMediaTypeOrNull()) + ) + } catch (e: Exception) { + Timber.e(e, "## sendBugReport() : fail to write screenshot") + } } - } } // add some github labels From bc14afe05d71d01dc65a25b971dfad30627aefa1 Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 2 Mar 2023 18:16:17 +0100 Subject: [PATCH 06/25] [Architecture]: use FeatureEntryPoint on Messages feature --- .../io/element/android/x/node/RoomFlowNode.kt | 8 +++-- .../messages/api/MessagesEntryPoint.kt | 21 ++++++++++++ .../impl/DefaultMessagesEntryPoint.kt | 33 +++++++++++++++++++ .../messages/{ => impl}/MessagesEvents.kt | 6 ++-- .../messages/{ => impl}/MessagesNode.kt | 2 +- .../messages/{ => impl}/MessagesPresenter.kt | 20 +++++------ .../messages/{ => impl}/MessagesState.kt | 8 ++--- .../{ => impl}/MessagesStateProvider.kt | 12 +++---- .../messages/{ => impl}/MessagesView.kt | 16 ++++----- .../{ => impl}/actionlist/ActionListEvents.kt | 4 +-- .../actionlist/ActionListPresenter.kt | 8 ++--- .../{ => impl}/actionlist/ActionListState.kt | 6 ++-- .../actionlist/ActionListStateProvider.kt | 6 ++-- .../{ => impl}/actionlist/ActionListView.kt | 6 ++-- .../actionlist/model/TimelineItemAction.kt | 2 +- .../textcomposer/MessageComposerEvents.kt | 2 +- .../textcomposer/MessageComposerPresenter.kt | 2 +- .../textcomposer/MessageComposerState.kt | 2 +- .../MessageComposerStateProvider.kt | 2 +- .../textcomposer/MessageComposerView.kt | 2 +- .../{ => impl}/timeline/TimelineEvents.kt | 2 +- .../{ => impl}/timeline/TimelinePresenter.kt | 4 +-- .../{ => impl}/timeline/TimelineState.kt | 4 +-- .../timeline/TimelineStateProvider.kt | 14 ++++---- .../{ => impl}/timeline/TimelineView.kt | 24 +++++++------- .../timeline/components/MessageEventBubble.kt | 8 ++--- .../components/MessagesReactionButton.kt | 6 ++-- .../components/TimelineItemReactionsView.kt | 6 ++-- .../event/TimelineItemContentView.kt | 14 ++++---- .../event/TimelineItemEncryptedView.kt | 4 +-- .../components/event/TimelineItemImageView.kt | 6 ++-- .../event/TimelineItemInformativeView.kt | 2 +- .../event/TimelineItemRedactedView.kt | 4 +-- .../components/event/TimelineItemTextView.kt | 8 ++--- .../event/TimelineItemUnknownView.kt | 4 +-- .../components/html/DocumentProvider.kt | 2 +- .../timeline/components/html/HtmlDocument.kt | 2 +- .../virtual/TimelineItemDaySeparatorView.kt | 14 +++++--- .../TimelineItemLoadingMoreIndicator.kt | 2 +- .../timeline/diff/CacheInvalidator.kt | 6 ++-- .../diff/MatrixTimelineItemsDiffCallback.kt | 2 +- .../factories/TimelineItemsFactory.kt | 12 +++---- .../event/TimelineItemContentFactory.kt | 4 +-- ...eItemContentFailedToParseMessageFactory.kt | 6 ++-- ...ineItemContentFailedToParseStateFactory.kt | 6 ++-- .../TimelineItemContentMessageFactory.kt | 16 ++++----- ...TimelineItemContentProfileChangeFactory.kt | 6 ++-- .../TimelineItemContentRedactedFactory.kt | 6 ++-- ...imelineItemContentRoomMembershipFactory.kt | 6 ++-- .../event/TimelineItemContentStateFactory.kt | 6 ++-- .../TimelineItemContentStickerFactory.kt | 6 ++-- .../event/TimelineItemContentUTDFactory.kt | 6 ++-- .../event/TimelineItemEventFactory.kt | 10 +++--- .../TimelineItemDaySeparatorFactory.kt | 6 ++-- .../virtual/TimelineItemVirtualFactory.kt | 12 +++---- .../timeline/model/AggregatedReaction.kt | 2 +- .../model/AggregatedReactionProvider.kt | 2 +- .../{ => impl}/timeline/model/TimelineItem.kt | 6 ++-- .../model/TimelineItemGroupPosition.kt | 2 +- .../TimelineItemGroupPositionProvider.kt | 2 +- .../timeline/model/TimelineItemReactions.kt | 2 +- .../model/TimelineItemReactionsProvider.kt | 2 +- .../timeline/model/bubble/BubbleState.kt | 4 +-- .../model/bubble/BubbleStateProvider.kt | 4 +-- .../model/event/TimelineItemEmoteContent.kt | 2 +- .../event/TimelineItemEncryptedContent.kt | 2 +- .../model/event/TimelineItemEventContent.kt | 2 +- .../event/TimelineItemEventContentProvider.kt | 2 +- .../model/event/TimelineItemImageContent.kt | 2 +- .../event/TimelineItemImageContentProvider.kt | 2 +- .../model/event/TimelineItemNoticeContent.kt | 2 +- .../event/TimelineItemRedactedContent.kt | 2 +- .../event/TimelineItemTextBasedContent.kt | 2 +- .../model/event/TimelineItemTextContent.kt | 2 +- .../model/event/TimelineItemUnknownContent.kt | 2 +- .../virtual/TimelineItemDaySeparatorModel.kt | 2 +- .../TimelineItemDaySeparatorModelProvider.kt | 2 +- .../model/virtual/TimelineItemLoadingModel.kt | 2 +- .../virtual/TimelineItemReadMarkerModel.kt | 2 +- .../virtual/TimelineItemTimelineStartModel.kt | 2 +- .../TimelineItemUnknownVirtualModel.kt | 2 +- .../model/virtual/TimelineItemVirtualModel.kt | 2 +- .../timeline/util/MutableListExt.kt | 2 +- .../timeline/util/toHtmlDocument.kt | 2 +- .../messages/MessagesPresenterTest.kt | 21 ++++-------- .../actionlist/ActionListPresenterTest.kt | 16 +++++---- .../messages/fixtures/aMessageEvent.kt | 8 ++--- .../messages/fixtures/timelineItemsFactory.kt | 28 ++++++++-------- .../MessageComposerPresenterTest.kt | 3 ++ .../timeline/TimelinePresenterTest.kt | 2 ++ 90 files changed, 308 insertions(+), 250 deletions(-) create mode 100644 features/messages/src/main/kotlin/io/element/android/features/messages/api/MessagesEntryPoint.kt create mode 100644 features/messages/src/main/kotlin/io/element/android/features/messages/impl/DefaultMessagesEntryPoint.kt rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/MessagesEvents.kt (77%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/MessagesNode.kt (96%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/MessagesPresenter.kt (86%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/MessagesState.kt (79%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/MessagesStateProvider.kt (78%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/MessagesView.kt (93%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/actionlist/ActionListEvents.kt (84%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/actionlist/ActionListPresenter.kt (89%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/actionlist/ActionListState.kt (83%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/actionlist/ActionListStateProvider.kt (88%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/actionlist/ActionListView.kt (96%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/actionlist/model/TimelineItemAction.kt (94%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/textcomposer/MessageComposerEvents.kt (94%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/textcomposer/MessageComposerPresenter.kt (98%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/textcomposer/MessageComposerState.kt (94%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/textcomposer/MessageComposerStateProvider.kt (95%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/textcomposer/MessageComposerView.kt (97%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/TimelineEvents.kt (93%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/TimelinePresenter.kt (96%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/TimelineState.kt (88%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/TimelineStateProvider.kt (84%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/TimelineView.kt (91%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/components/MessageEventBubble.kt (93%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/components/MessagesReactionButton.kt (92%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/components/TimelineItemReactionsView.kt (87%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/components/event/TimelineItemContentView.kt (73%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/components/event/TimelineItemEncryptedView.kt (91%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/components/event/TimelineItemImageView.kt (91%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/components/event/TimelineItemInformativeView.kt (97%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/components/event/TimelineItemRedactedView.kt (90%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/components/event/TimelineItemTextView.kt (91%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/components/event/TimelineItemUnknownView.kt (90%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/components/html/DocumentProvider.kt (97%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/components/html/HtmlDocument.kt (99%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/components/virtual/TimelineItemDaySeparatorView.kt (81%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/components/virtual/TimelineItemLoadingMoreIndicator.kt (96%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/diff/CacheInvalidator.kt (89%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/diff/MatrixTimelineItemsDiffCallback.kt (96%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/factories/TimelineItemsFactory.kt (88%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/factories/event/TimelineItemContentFactory.kt (93%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/factories/event/TimelineItemContentFailedToParseMessageFactory.kt (77%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/factories/event/TimelineItemContentFailedToParseStateFactory.kt (77%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/factories/event/TimelineItemContentMessageFactory.kt (77%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/factories/event/TimelineItemContentProfileChangeFactory.kt (77%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/factories/event/TimelineItemContentRedactedFactory.kt (77%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/factories/event/TimelineItemContentRoomMembershipFactory.kt (77%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/factories/event/TimelineItemContentStateFactory.kt (76%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/factories/event/TimelineItemContentStickerFactory.kt (76%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/factories/event/TimelineItemContentUTDFactory.kt (77%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/factories/event/TimelineItemEventFactory.kt (90%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/factories/virtual/TimelineItemDaySeparatorFactory.kt (80%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/factories/virtual/TimelineItemVirtualFactory.kt (75%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/AggregatedReaction.kt (91%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/AggregatedReactionProvider.kt (94%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/TimelineItem.kt (86%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/TimelineItemGroupPosition.kt (93%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/TimelineItemGroupPositionProvider.kt (93%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/TimelineItemReactions.kt (91%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/TimelineItemReactionsProvider.kt (92%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/bubble/BubbleState.kt (82%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/bubble/BubbleStateProvider.kt (89%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/event/TimelineItemEmoteContent.kt (91%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/event/TimelineItemEncryptedContent.kt (91%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/event/TimelineItemEventContent.kt (90%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/event/TimelineItemEventContentProvider.kt (96%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/event/TimelineItemImageContent.kt (92%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/event/TimelineItemImageContentProvider.kt (94%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/event/TimelineItemNoticeContent.kt (91%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/event/TimelineItemRedactedContent.kt (90%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/event/TimelineItemTextBasedContent.kt (91%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/event/TimelineItemTextContent.kt (91%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/event/TimelineItemUnknownContent.kt (90%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/virtual/TimelineItemDaySeparatorModel.kt (90%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/virtual/TimelineItemDaySeparatorModelProvider.kt (93%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/virtual/TimelineItemLoadingModel.kt (90%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/virtual/TimelineItemReadMarkerModel.kt (90%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/virtual/TimelineItemTimelineStartModel.kt (90%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/virtual/TimelineItemUnknownVirtualModel.kt (90%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/model/virtual/TimelineItemVirtualModel.kt (90%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/util/MutableListExt.kt (92%) rename features/messages/src/main/kotlin/io/element/android/features/messages/{ => impl}/timeline/util/toHtmlDocument.kt (93%) diff --git a/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt b/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt index d00b2e2414..e0bd39b252 100644 --- a/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt +++ b/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt @@ -28,11 +28,10 @@ import com.bumble.appyx.navmodel.backstack.BackStack import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode -import io.element.android.features.messages.MessagesNode +import io.element.android.features.messages.api.MessagesEntryPoint import io.element.android.libraries.architecture.BackstackNode import io.element.android.libraries.architecture.NodeInputs import io.element.android.libraries.architecture.bindings -import io.element.android.libraries.architecture.createNode import io.element.android.libraries.architecture.nodeInputs import io.element.android.libraries.di.DaggerComponentOwner import io.element.android.libraries.di.SessionScope @@ -45,6 +44,7 @@ import timber.log.Timber class RoomFlowNode @AssistedInject constructor( @Assisted buildContext: BuildContext, @Assisted plugins: List, + private val messagesEntryPoint: MessagesEntryPoint, ) : BackstackNode( backstack = BackStack( initialElement = NavTarget.Messages, @@ -73,7 +73,9 @@ class RoomFlowNode @AssistedInject constructor( override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node { return when (navTarget) { - NavTarget.Messages -> createNode(buildContext) + NavTarget.Messages -> { + messagesEntryPoint.node(this, buildContext) + } } } diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/api/MessagesEntryPoint.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/api/MessagesEntryPoint.kt new file mode 100644 index 0000000000..3509df342b --- /dev/null +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/api/MessagesEntryPoint.kt @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.messages.api + +import io.element.android.libraries.architecture.FeatureEntryPoint + +interface MessagesEntryPoint : FeatureEntryPoint diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/DefaultMessagesEntryPoint.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/DefaultMessagesEntryPoint.kt new file mode 100644 index 0000000000..6545e3ac66 --- /dev/null +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/DefaultMessagesEntryPoint.kt @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.messages.impl + +import com.bumble.appyx.core.modality.BuildContext +import com.bumble.appyx.core.node.Node +import com.bumble.appyx.core.plugin.Plugin +import com.squareup.anvil.annotations.ContributesBinding +import io.element.android.features.messages.api.MessagesEntryPoint +import io.element.android.libraries.architecture.createNode +import io.element.android.libraries.di.AppScope +import javax.inject.Inject + +@ContributesBinding(AppScope::class) +class DefaultMessagesEntryPoint @Inject constructor() : MessagesEntryPoint { + override fun node(parentNode: Node, buildContext: BuildContext, plugins: List): Node { + return parentNode.createNode(buildContext, plugins) + } +} diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/MessagesEvents.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesEvents.kt similarity index 77% rename from features/messages/src/main/kotlin/io/element/android/features/messages/MessagesEvents.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesEvents.kt index 4e6505f31c..249e94e0e1 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/MessagesEvents.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesEvents.kt @@ -14,10 +14,10 @@ * limitations under the License. */ -package io.element.android.features.messages +package io.element.android.features.messages.impl -import io.element.android.features.messages.actionlist.model.TimelineItemAction -import io.element.android.features.messages.timeline.model.TimelineItem +import io.element.android.features.messages.impl.actionlist.model.TimelineItemAction +import io.element.android.features.messages.impl.timeline.model.TimelineItem sealed interface MessagesEvents { data class HandleAction(val action: TimelineItemAction, val event: TimelineItem.Event) : MessagesEvents diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/MessagesNode.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt similarity index 96% rename from features/messages/src/main/kotlin/io/element/android/features/messages/MessagesNode.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt index 0b3db020bf..2ef24c0158 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/MessagesNode.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages +package io.element.android.features.messages.impl import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/MessagesPresenter.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt similarity index 86% rename from features/messages/src/main/kotlin/io/element/android/features/messages/MessagesPresenter.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt index da149fbe0c..a6316585f4 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/MessagesPresenter.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages +package io.element.android.features.messages.impl import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -24,15 +24,15 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.saveable.rememberSaveable -import io.element.android.features.messages.actionlist.ActionListPresenter -import io.element.android.features.messages.actionlist.model.TimelineItemAction -import io.element.android.features.messages.textcomposer.MessageComposerEvents -import io.element.android.features.messages.textcomposer.MessageComposerPresenter -import io.element.android.features.messages.textcomposer.MessageComposerState -import io.element.android.features.messages.timeline.TimelineEvents -import io.element.android.features.messages.timeline.TimelinePresenter -import io.element.android.features.messages.timeline.model.TimelineItem -import io.element.android.features.messages.timeline.model.event.TimelineItemTextBasedContent +import io.element.android.features.messages.impl.actionlist.ActionListPresenter +import io.element.android.features.messages.impl.actionlist.model.TimelineItemAction +import io.element.android.features.messages.impl.textcomposer.MessageComposerEvents +import io.element.android.features.messages.impl.textcomposer.MessageComposerPresenter +import io.element.android.features.messages.impl.textcomposer.MessageComposerState +import io.element.android.features.messages.impl.timeline.TimelineEvents +import io.element.android.features.messages.impl.timeline.TimelinePresenter +import io.element.android.features.messages.impl.timeline.model.TimelineItem +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemTextBasedContent import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.designsystem.components.avatar.AvatarSize diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/MessagesState.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt similarity index 79% rename from features/messages/src/main/kotlin/io/element/android/features/messages/MessagesState.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt index 4270c9f2e6..c2f90160da 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/MessagesState.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt @@ -14,12 +14,12 @@ * limitations under the License. */ -package io.element.android.features.messages +package io.element.android.features.messages.impl import androidx.compose.runtime.Immutable -import io.element.android.features.messages.actionlist.ActionListState -import io.element.android.features.messages.textcomposer.MessageComposerState -import io.element.android.features.messages.timeline.TimelineState +import io.element.android.features.messages.impl.actionlist.ActionListState +import io.element.android.features.messages.impl.textcomposer.MessageComposerState +import io.element.android.features.messages.impl.timeline.TimelineState import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.matrix.core.RoomId diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/MessagesStateProvider.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt similarity index 78% rename from features/messages/src/main/kotlin/io/element/android/features/messages/MessagesStateProvider.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt index 7310ba76f4..e403791509 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/MessagesStateProvider.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt @@ -14,14 +14,14 @@ * limitations under the License. */ -package io.element.android.features.messages +package io.element.android.features.messages.impl import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.features.messages.actionlist.anActionListState -import io.element.android.features.messages.textcomposer.aMessageComposerState -import io.element.android.features.messages.timeline.aTimelineItemContent -import io.element.android.features.messages.timeline.aTimelineItemList -import io.element.android.features.messages.timeline.aTimelineState +import io.element.android.features.messages.impl.actionlist.anActionListState +import io.element.android.features.messages.impl.textcomposer.aMessageComposerState +import io.element.android.features.messages.impl.timeline.aTimelineItemContent +import io.element.android.features.messages.impl.timeline.aTimelineItemList +import io.element.android.features.messages.impl.timeline.aTimelineState import io.element.android.libraries.core.data.StableCharSequence import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.matrix.core.RoomId diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/MessagesView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt similarity index 93% rename from features/messages/src/main/kotlin/io/element/android/features/messages/MessagesView.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt index ae6f5326d0..6a408b3044 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/MessagesView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ ExperimentalMaterialApi::class, ExperimentalMaterial3Api::class, ) -package io.element.android.features.messages +package io.element.android.features.messages.impl import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row @@ -53,12 +53,12 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import io.element.android.features.messages.actionlist.ActionListEvents -import io.element.android.features.messages.actionlist.ActionListView -import io.element.android.features.messages.actionlist.model.TimelineItemAction -import io.element.android.features.messages.textcomposer.MessageComposerView -import io.element.android.features.messages.timeline.TimelineView -import io.element.android.features.messages.timeline.model.TimelineItem +import io.element.android.features.messages.impl.actionlist.ActionListEvents +import io.element.android.features.messages.impl.actionlist.ActionListView +import io.element.android.features.messages.impl.actionlist.model.TimelineItemAction +import io.element.android.features.messages.impl.textcomposer.MessageComposerView +import io.element.android.features.messages.impl.timeline.TimelineView +import io.element.android.features.messages.impl.timeline.model.TimelineItem import io.element.android.libraries.designsystem.components.avatar.Avatar import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.designsystem.preview.ElementPreviewDark diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListEvents.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListEvents.kt similarity index 84% rename from features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListEvents.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListEvents.kt index 99e41de3e1..a6244a72e3 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListEvents.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListEvents.kt @@ -14,9 +14,9 @@ * limitations under the License. */ -package io.element.android.features.messages.actionlist +package io.element.android.features.messages.impl.actionlist -import io.element.android.features.messages.timeline.model.TimelineItem +import io.element.android.features.messages.impl.timeline.model.TimelineItem sealed interface ActionListEvents { object Clear : ActionListEvents diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListPresenter.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenter.kt similarity index 89% rename from features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListPresenter.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenter.kt index 194a7f103e..cdffa9c618 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListPresenter.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenter.kt @@ -14,16 +14,16 @@ * limitations under the License. */ -package io.element.android.features.messages.actionlist +package io.element.android.features.messages.impl.actionlist import androidx.compose.runtime.Composable import androidx.compose.runtime.MutableState import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope -import io.element.android.features.messages.actionlist.model.TimelineItemAction -import io.element.android.features.messages.timeline.model.TimelineItem -import io.element.android.features.messages.timeline.model.event.TimelineItemRedactedContent +import io.element.android.features.messages.impl.actionlist.model.TimelineItemAction +import io.element.android.features.messages.impl.timeline.model.TimelineItem +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemRedactedContent import io.element.android.libraries.architecture.Presenter import kotlinx.collections.immutable.toImmutableList import kotlinx.coroutines.CoroutineScope diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListState.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListState.kt similarity index 83% rename from features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListState.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListState.kt index 0bb8f9dd5d..faf41160be 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListState.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListState.kt @@ -14,11 +14,11 @@ * limitations under the License. */ -package io.element.android.features.messages.actionlist +package io.element.android.features.messages.impl.actionlist import androidx.compose.runtime.Immutable -import io.element.android.features.messages.actionlist.model.TimelineItemAction -import io.element.android.features.messages.timeline.model.TimelineItem +import io.element.android.features.messages.impl.actionlist.model.TimelineItemAction +import io.element.android.features.messages.impl.timeline.model.TimelineItem import kotlinx.collections.immutable.ImmutableList @Immutable diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListStateProvider.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListStateProvider.kt similarity index 88% rename from features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListStateProvider.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListStateProvider.kt index 8d63af518c..7df34bf36e 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListStateProvider.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListStateProvider.kt @@ -14,11 +14,11 @@ * limitations under the License. */ -package io.element.android.features.messages.actionlist +package io.element.android.features.messages.impl.actionlist import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.features.messages.actionlist.model.TimelineItemAction -import io.element.android.features.messages.timeline.aTimelineItemEvent +import io.element.android.features.messages.impl.actionlist.model.TimelineItemAction +import io.element.android.features.messages.impl.timeline.aTimelineItemEvent import kotlinx.collections.immutable.persistentListOf open class ActionListStateProvider : PreviewParameterProvider { diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt similarity index 96% rename from features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListView.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt index 9b0ee80ed5..dc71d1d834 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt @@ -16,7 +16,7 @@ @file:OptIn(ExperimentalMaterialApi::class) -package io.element.android.features.messages.actionlist +package io.element.android.features.messages.impl.actionlist import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Box @@ -40,8 +40,8 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp -import io.element.android.features.messages.actionlist.model.TimelineItemAction -import io.element.android.features.messages.timeline.model.TimelineItem +import io.element.android.features.messages.impl.actionlist.model.TimelineItemAction +import io.element.android.features.messages.impl.timeline.model.TimelineItem import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.theme.components.Icon diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/model/TimelineItemAction.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/model/TimelineItemAction.kt similarity index 94% rename from features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/model/TimelineItemAction.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/model/TimelineItemAction.kt index ea48797824..fc3f114ac4 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/model/TimelineItemAction.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/model/TimelineItemAction.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.actionlist.model +package io.element.android.features.messages.impl.actionlist.model import androidx.annotation.DrawableRes import androidx.compose.runtime.Immutable diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerEvents.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerEvents.kt similarity index 94% rename from features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerEvents.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerEvents.kt index 656229555b..1da1188ee4 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerEvents.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerEvents.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.textcomposer +package io.element.android.features.messages.impl.textcomposer import io.element.android.libraries.textcomposer.MessageComposerMode diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerPresenter.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerPresenter.kt similarity index 98% rename from features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerPresenter.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerPresenter.kt index 4f7cbc287f..43d8cafd3b 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerPresenter.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerPresenter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.textcomposer +package io.element.android.features.messages.impl.textcomposer import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerState.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerState.kt similarity index 94% rename from features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerState.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerState.kt index 2b5396cb9e..ce6d68f8f7 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerState.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerState.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.textcomposer +package io.element.android.features.messages.impl.textcomposer import androidx.compose.runtime.Immutable import io.element.android.libraries.core.data.StableCharSequence diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerStateProvider.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerStateProvider.kt similarity index 95% rename from features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerStateProvider.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerStateProvider.kt index d777893d58..6a8ec37e30 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerStateProvider.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerStateProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.textcomposer +package io.element.android.features.messages.impl.textcomposer import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.libraries.core.data.StableCharSequence diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerView.kt similarity index 97% rename from features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerView.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerView.kt index b720ab5fbb..e94ebb0a2a 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerView.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.textcomposer +package io.element.android.features.messages.impl.textcomposer import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelineEvents.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineEvents.kt similarity index 93% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelineEvents.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineEvents.kt index c59b99fe3f..bf953f5883 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelineEvents.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineEvents.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline +package io.element.android.features.messages.impl.timeline import io.element.android.libraries.matrix.core.EventId diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelinePresenter.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt similarity index 96% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelinePresenter.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt index 514ec34d78..8e4d7f77de 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelinePresenter.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline +package io.element.android.features.messages.impl.timeline import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffect @@ -24,7 +24,7 @@ import androidx.compose.runtime.collectAsState import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.saveable.rememberSaveable -import io.element.android.features.messages.timeline.factories.TimelineItemsFactory +import io.element.android.features.messages.impl.timeline.factories.TimelineItemsFactory import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.matrix.core.EventId import io.element.android.libraries.matrix.room.MatrixRoom diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelineState.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineState.kt similarity index 88% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelineState.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineState.kt index affe32ee66..eb21b12fc1 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelineState.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineState.kt @@ -14,10 +14,10 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline +package io.element.android.features.messages.impl.timeline import androidx.compose.runtime.Immutable -import io.element.android.features.messages.timeline.model.TimelineItem +import io.element.android.features.messages.impl.timeline.model.TimelineItem import io.element.android.libraries.matrix.core.EventId import io.element.android.libraries.matrix.timeline.MatrixTimeline import kotlinx.collections.immutable.ImmutableList diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelineStateProvider.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineStateProvider.kt similarity index 84% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelineStateProvider.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineStateProvider.kt index 6f3c04a7c6..53712fb928 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelineStateProvider.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineStateProvider.kt @@ -14,14 +14,14 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline +package io.element.android.features.messages.impl.timeline -import io.element.android.features.messages.timeline.model.AggregatedReaction -import io.element.android.features.messages.timeline.model.TimelineItem -import io.element.android.features.messages.timeline.model.TimelineItemGroupPosition -import io.element.android.features.messages.timeline.model.TimelineItemReactions -import io.element.android.features.messages.timeline.model.event.TimelineItemEventContent -import io.element.android.features.messages.timeline.model.event.TimelineItemTextContent +import io.element.android.features.messages.impl.timeline.model.AggregatedReaction +import io.element.android.features.messages.impl.timeline.model.TimelineItem +import io.element.android.features.messages.impl.timeline.model.TimelineItemGroupPosition +import io.element.android.features.messages.impl.timeline.model.TimelineItemReactions +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemTextContent import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.matrix.core.EventId import io.element.android.libraries.matrix.timeline.MatrixTimeline diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelineView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt similarity index 91% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelineView.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt index 856a756f7c..7ea427a8cf 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelineView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline +package io.element.android.features.messages.impl.timeline import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.layout.Arrangement @@ -54,17 +54,17 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import androidx.compose.ui.zIndex -import io.element.android.features.messages.timeline.components.MessageEventBubble -import io.element.android.features.messages.timeline.components.TimelineItemReactionsView -import io.element.android.features.messages.timeline.components.event.TimelineItemEventContentView -import io.element.android.features.messages.timeline.components.virtual.TimelineItemDaySeparatorView -import io.element.android.features.messages.timeline.components.virtual.TimelineLoadingMoreIndicator -import io.element.android.features.messages.timeline.model.TimelineItem -import io.element.android.features.messages.timeline.model.bubble.BubbleState -import io.element.android.features.messages.timeline.model.event.TimelineItemEventContent -import io.element.android.features.messages.timeline.model.event.TimelineItemEventContentProvider -import io.element.android.features.messages.timeline.model.virtual.TimelineItemDaySeparatorModel -import io.element.android.features.messages.timeline.model.virtual.TimelineItemLoadingModel +import io.element.android.features.messages.impl.timeline.components.MessageEventBubble +import io.element.android.features.messages.impl.timeline.components.TimelineItemReactionsView +import io.element.android.features.messages.impl.timeline.components.event.TimelineItemEventContentView +import io.element.android.features.messages.impl.timeline.components.virtual.TimelineItemDaySeparatorView +import io.element.android.features.messages.impl.timeline.components.virtual.TimelineLoadingMoreIndicator +import io.element.android.features.messages.impl.timeline.model.TimelineItem +import io.element.android.features.messages.impl.timeline.model.bubble.BubbleState +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContentProvider +import io.element.android.features.messages.impl.timeline.model.virtual.TimelineItemDaySeparatorModel +import io.element.android.features.messages.impl.timeline.model.virtual.TimelineItemLoadingModel import io.element.android.libraries.designsystem.components.avatar.Avatar import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.designsystem.preview.ElementPreviewDark diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/MessageEventBubble.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessageEventBubble.kt similarity index 93% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/MessageEventBubble.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessageEventBubble.kt index 4ae30c86ec..b696b63f92 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/MessageEventBubble.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessageEventBubble.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.components +package io.element.android.features.messages.impl.timeline.components import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.combinedClickable @@ -35,9 +35,9 @@ import androidx.compose.ui.graphics.Shape import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp -import io.element.android.features.messages.timeline.model.TimelineItemGroupPosition -import io.element.android.features.messages.timeline.model.bubble.BubbleState -import io.element.android.features.messages.timeline.model.bubble.BubbleStateProvider +import io.element.android.features.messages.impl.timeline.model.TimelineItemGroupPosition +import io.element.android.features.messages.impl.timeline.model.bubble.BubbleState +import io.element.android.features.messages.impl.timeline.model.bubble.BubbleStateProvider import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.theme.ElementTheme diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/MessagesReactionButton.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt similarity index 92% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/MessagesReactionButton.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt index dd8cb53fe1..c0b6f91c9e 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/MessagesReactionButton.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.components +package io.element.android.features.messages.impl.timeline.components import androidx.compose.foundation.BorderStroke import androidx.compose.foundation.layout.Row @@ -31,8 +31,8 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import io.element.android.features.messages.timeline.model.AggregatedReaction -import io.element.android.features.messages.timeline.model.AggregatedReactionProvider +import io.element.android.features.messages.impl.timeline.model.AggregatedReaction +import io.element.android.features.messages.impl.timeline.model.AggregatedReactionProvider import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.theme.components.Surface diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/TimelineItemReactionsView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsView.kt similarity index 87% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/TimelineItemReactionsView.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsView.kt index 92b4fa6dd6..48507629dd 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/TimelineItemReactionsView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsView.kt @@ -14,15 +14,15 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.components +package io.element.android.features.messages.impl.timeline.components import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.google.accompanist.flowlayout.FlowRow -import io.element.android.features.messages.timeline.model.TimelineItemReactions -import io.element.android.features.messages.timeline.model.aTimelineItemReactions +import io.element.android.features.messages.impl.timeline.model.TimelineItemReactions +import io.element.android.features.messages.impl.timeline.model.aTimelineItemReactions import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemContentView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemContentView.kt similarity index 73% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemContentView.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemContentView.kt index 7ab6f14ec6..bfb1d7f0c7 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemContentView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemContentView.kt @@ -14,17 +14,17 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.components.event +package io.element.android.features.messages.impl.timeline.components.event import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import io.element.android.features.messages.timeline.model.event.TimelineItemEncryptedContent -import io.element.android.features.messages.timeline.model.event.TimelineItemEventContent -import io.element.android.features.messages.timeline.model.event.TimelineItemImageContent -import io.element.android.features.messages.timeline.model.event.TimelineItemRedactedContent -import io.element.android.features.messages.timeline.model.event.TimelineItemTextBasedContent -import io.element.android.features.messages.timeline.model.event.TimelineItemUnknownContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEncryptedContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemImageContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemRedactedContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemTextBasedContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemUnknownContent @Composable fun TimelineItemEventContentView( diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemEncryptedView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEncryptedView.kt similarity index 91% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemEncryptedView.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEncryptedView.kt index 30e0480ca1..2d98005eba 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemEncryptedView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEncryptedView.kt @@ -14,14 +14,14 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.components.event +package io.element.android.features.messages.impl.timeline.components.event import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Warning import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview -import io.element.android.features.messages.timeline.model.event.TimelineItemEncryptedContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEncryptedContent import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight import org.matrix.rustcomponents.sdk.EncryptedMessage diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemImageView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemImageView.kt similarity index 91% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemImageView.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemImageView.kt index fcac353e81..a532557ffb 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemImageView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemImageView.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.components.event +package io.element.android.features.messages.impl.timeline.components.event import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.aspectRatio @@ -32,8 +32,8 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import coil.compose.AsyncImage import coil.request.ImageRequest -import io.element.android.features.messages.timeline.model.event.TimelineItemImageContent -import io.element.android.features.messages.timeline.model.event.TimelineItemImageContentProvider +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemImageContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemImageContentProvider import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.preview.debugPlaceholderBackground diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemInformativeView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt similarity index 97% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemInformativeView.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt index a3718dae22..94aa89d1f6 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemInformativeView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.components.event +package io.element.android.features.messages.impl.timeline.components.event import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemRedactedView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemRedactedView.kt similarity index 90% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemRedactedView.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemRedactedView.kt index cbc33d28fb..2424e76ae1 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemRedactedView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemRedactedView.kt @@ -14,14 +14,14 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.components.event +package io.element.android.features.messages.impl.timeline.components.event import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Delete import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview -import io.element.android.features.messages.timeline.model.event.TimelineItemRedactedContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemRedactedContent import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemTextView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemTextView.kt similarity index 91% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemTextView.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemTextView.kt index b41ae6a09e..e2ff060c12 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemTextView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemTextView.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.components.event +package io.element.android.features.messages.impl.timeline.components.event import android.text.SpannableString import android.text.style.URLSpan @@ -30,9 +30,9 @@ import androidx.compose.ui.text.buildAnnotatedString import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.core.text.util.LinkifyCompat -import io.element.android.features.messages.timeline.components.html.HtmlDocument -import io.element.android.features.messages.timeline.model.event.TimelineItemTextBasedContent -import io.element.android.features.messages.timeline.model.event.TimelineItemTextBasedContentProvider +import io.element.android.features.messages.impl.timeline.components.html.HtmlDocument +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemTextBasedContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemTextBasedContentProvider import io.element.android.libraries.designsystem.LinkColor import io.element.android.libraries.designsystem.components.ClickableLinkText import io.element.android.libraries.designsystem.preview.ElementPreviewDark diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemUnknownView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemUnknownView.kt similarity index 90% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemUnknownView.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemUnknownView.kt index 43acfe43eb..00732c6882 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/event/TimelineItemUnknownView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemUnknownView.kt @@ -14,14 +14,14 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.components.event +package io.element.android.features.messages.impl.timeline.components.event import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Info import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview -import io.element.android.features.messages.timeline.model.event.TimelineItemUnknownContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemUnknownContent import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/html/DocumentProvider.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/html/DocumentProvider.kt similarity index 97% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/html/DocumentProvider.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/html/DocumentProvider.kt index 2a8833911a..249334cace 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/html/DocumentProvider.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/html/DocumentProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.components.html +package io.element.android.features.messages.impl.timeline.components.html import androidx.compose.ui.tooling.preview.PreviewParameterProvider import org.jsoup.Jsoup diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/html/HtmlDocument.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/html/HtmlDocument.kt similarity index 99% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/html/HtmlDocument.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/html/HtmlDocument.kt index 94db09090e..a151c4c7e6 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/html/HtmlDocument.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/html/HtmlDocument.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.components.html +package io.element.android.features.messages.impl.timeline.components.html import androidx.compose.foundation.background import androidx.compose.foundation.interaction.MutableInteractionSource diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/virtual/TimelineItemDaySeparatorView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemDaySeparatorView.kt similarity index 81% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/virtual/TimelineItemDaySeparatorView.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemDaySeparatorView.kt index 753723a88d..4fcb1013a5 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/virtual/TimelineItemDaySeparatorView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemDaySeparatorView.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.components.virtual +package io.element.android.features.messages.impl.timeline.components.virtual import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxWidth @@ -27,8 +27,8 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp -import io.element.android.features.messages.timeline.model.virtual.TimelineItemDaySeparatorModel -import io.element.android.features.messages.timeline.model.virtual.TimelineItemDaySeparatorModelProvider +import io.element.android.features.messages.impl.timeline.model.virtual.TimelineItemDaySeparatorModel +import io.element.android.features.messages.impl.timeline.model.virtual.TimelineItemDaySeparatorModelProvider import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.theme.components.Text @@ -54,12 +54,16 @@ internal fun TimelineItemDaySeparatorView( @Preview @Composable -internal fun TimelineItemDaySeparatorViewLightPreview(@PreviewParameter(TimelineItemDaySeparatorModelProvider::class) model: TimelineItemDaySeparatorModel) = +internal fun TimelineItemDaySeparatorViewLightPreview(@PreviewParameter( + TimelineItemDaySeparatorModelProvider::class) model: TimelineItemDaySeparatorModel +) = ElementPreviewLight { ContentToPreview(model) } @Preview @Composable -internal fun TimelineItemDaySeparatorViewDarkPreview(@PreviewParameter(TimelineItemDaySeparatorModelProvider::class) model: TimelineItemDaySeparatorModel) = +internal fun TimelineItemDaySeparatorViewDarkPreview(@PreviewParameter( + TimelineItemDaySeparatorModelProvider::class) model: TimelineItemDaySeparatorModel +) = ElementPreviewDark { ContentToPreview(model) } @Composable diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/virtual/TimelineItemLoadingMoreIndicator.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemLoadingMoreIndicator.kt similarity index 96% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/virtual/TimelineItemLoadingMoreIndicator.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemLoadingMoreIndicator.kt index ace9b8d58b..388be95381 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/virtual/TimelineItemLoadingMoreIndicator.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemLoadingMoreIndicator.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.components.virtual +package io.element.android.features.messages.impl.timeline.components.virtual import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxWidth diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/diff/CacheInvalidator.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/diff/CacheInvalidator.kt similarity index 89% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/diff/CacheInvalidator.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/diff/CacheInvalidator.kt index c71fa7bcd1..c2f3b33667 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/diff/CacheInvalidator.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/diff/CacheInvalidator.kt @@ -14,11 +14,11 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.diff +package io.element.android.features.messages.impl.timeline.diff import androidx.recyclerview.widget.ListUpdateCallback -import io.element.android.features.messages.timeline.model.TimelineItem -import io.element.android.features.messages.timeline.util.invalidateLast +import io.element.android.features.messages.impl.timeline.model.TimelineItem +import io.element.android.features.messages.impl.timeline.util.invalidateLast import timber.log.Timber internal class CacheInvalidator(private val itemStatesCache: MutableList) : diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/diff/MatrixTimelineItemsDiffCallback.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/diff/MatrixTimelineItemsDiffCallback.kt similarity index 96% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/diff/MatrixTimelineItemsDiffCallback.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/diff/MatrixTimelineItemsDiffCallback.kt index fd5119cc2a..142ee69608 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/diff/MatrixTimelineItemsDiffCallback.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/diff/MatrixTimelineItemsDiffCallback.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.diff +package io.element.android.features.messages.impl.timeline.diff import androidx.recyclerview.widget.DiffUtil import io.element.android.libraries.matrix.timeline.MatrixTimelineItem diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/TimelineItemsFactory.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/TimelineItemsFactory.kt similarity index 88% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/TimelineItemsFactory.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/TimelineItemsFactory.kt index ff3318de5e..a04e003a1b 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/TimelineItemsFactory.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/TimelineItemsFactory.kt @@ -14,14 +14,14 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.factories +package io.element.android.features.messages.impl.timeline.factories import androidx.recyclerview.widget.DiffUtil -import io.element.android.features.messages.timeline.diff.CacheInvalidator -import io.element.android.features.messages.timeline.diff.MatrixTimelineItemsDiffCallback -import io.element.android.features.messages.timeline.factories.event.TimelineItemEventFactory -import io.element.android.features.messages.timeline.factories.virtual.TimelineItemVirtualFactory -import io.element.android.features.messages.timeline.model.TimelineItem +import io.element.android.features.messages.impl.timeline.diff.CacheInvalidator +import io.element.android.features.messages.impl.timeline.diff.MatrixTimelineItemsDiffCallback +import io.element.android.features.messages.impl.timeline.factories.event.TimelineItemEventFactory +import io.element.android.features.messages.impl.timeline.factories.virtual.TimelineItemVirtualFactory +import io.element.android.features.messages.impl.timeline.model.TimelineItem import io.element.android.libraries.core.coroutine.CoroutineDispatchers import io.element.android.libraries.matrix.timeline.MatrixTimelineItem import kotlinx.coroutines.flow.MutableStateFlow diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentFactory.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFactory.kt similarity index 93% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentFactory.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFactory.kt index 121e5e38e8..c3417bc3c9 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentFactory.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFactory.kt @@ -14,9 +14,9 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.factories.event +package io.element.android.features.messages.impl.timeline.factories.event -import io.element.android.features.messages.timeline.model.event.TimelineItemEventContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContent import org.matrix.rustcomponents.sdk.TimelineItemContentKind import javax.inject.Inject diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentFailedToParseMessageFactory.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFailedToParseMessageFactory.kt similarity index 77% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentFailedToParseMessageFactory.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFailedToParseMessageFactory.kt index 5839cd06da..f5923e34af 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentFailedToParseMessageFactory.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFailedToParseMessageFactory.kt @@ -14,10 +14,10 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.factories.event +package io.element.android.features.messages.impl.timeline.factories.event -import io.element.android.features.messages.timeline.model.event.TimelineItemEventContent -import io.element.android.features.messages.timeline.model.event.TimelineItemUnknownContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemUnknownContent import org.matrix.rustcomponents.sdk.TimelineItemContentKind import javax.inject.Inject diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentFailedToParseStateFactory.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFailedToParseStateFactory.kt similarity index 77% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentFailedToParseStateFactory.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFailedToParseStateFactory.kt index a64950a77f..7ef7bfecab 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentFailedToParseStateFactory.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFailedToParseStateFactory.kt @@ -14,10 +14,10 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.factories.event +package io.element.android.features.messages.impl.timeline.factories.event -import io.element.android.features.messages.timeline.model.event.TimelineItemEventContent -import io.element.android.features.messages.timeline.model.event.TimelineItemUnknownContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemUnknownContent import org.matrix.rustcomponents.sdk.TimelineItemContentKind import javax.inject.Inject diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentMessageFactory.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactory.kt similarity index 77% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentMessageFactory.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactory.kt index ce38a9e96f..ecf52d44f4 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentMessageFactory.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactory.kt @@ -14,15 +14,15 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.factories.event +package io.element.android.features.messages.impl.timeline.factories.event -import io.element.android.features.messages.timeline.model.event.TimelineItemEventContent -import io.element.android.features.messages.timeline.model.event.TimelineItemEmoteContent -import io.element.android.features.messages.timeline.model.event.TimelineItemImageContent -import io.element.android.features.messages.timeline.model.event.TimelineItemNoticeContent -import io.element.android.features.messages.timeline.model.event.TimelineItemTextContent -import io.element.android.features.messages.timeline.model.event.TimelineItemUnknownContent -import io.element.android.features.messages.timeline.util.toHtmlDocument +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEmoteContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemImageContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemNoticeContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemTextContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemUnknownContent +import io.element.android.features.messages.impl.timeline.util.toHtmlDocument import io.element.android.libraries.matrix.media.MediaResolver import org.matrix.rustcomponents.sdk.Message import org.matrix.rustcomponents.sdk.MessageType diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentProfileChangeFactory.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentProfileChangeFactory.kt similarity index 77% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentProfileChangeFactory.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentProfileChangeFactory.kt index 6f775ac80f..8e7683d51d 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentProfileChangeFactory.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentProfileChangeFactory.kt @@ -14,10 +14,10 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.factories.event +package io.element.android.features.messages.impl.timeline.factories.event -import io.element.android.features.messages.timeline.model.event.TimelineItemEventContent -import io.element.android.features.messages.timeline.model.event.TimelineItemUnknownContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemUnknownContent import org.matrix.rustcomponents.sdk.TimelineItemContentKind import javax.inject.Inject diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentRedactedFactory.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentRedactedFactory.kt similarity index 77% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentRedactedFactory.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentRedactedFactory.kt index 4d6b9257a3..968c51070c 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentRedactedFactory.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentRedactedFactory.kt @@ -14,10 +14,10 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.factories.event +package io.element.android.features.messages.impl.timeline.factories.event -import io.element.android.features.messages.timeline.model.event.TimelineItemEventContent -import io.element.android.features.messages.timeline.model.event.TimelineItemRedactedContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemRedactedContent import org.matrix.rustcomponents.sdk.TimelineItemContentKind import javax.inject.Inject diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentRoomMembershipFactory.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentRoomMembershipFactory.kt similarity index 77% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentRoomMembershipFactory.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentRoomMembershipFactory.kt index 1764087a2d..037338cbbe 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentRoomMembershipFactory.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentRoomMembershipFactory.kt @@ -14,10 +14,10 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.factories.event +package io.element.android.features.messages.impl.timeline.factories.event -import io.element.android.features.messages.timeline.model.event.TimelineItemEventContent -import io.element.android.features.messages.timeline.model.event.TimelineItemUnknownContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemUnknownContent import org.matrix.rustcomponents.sdk.TimelineItemContentKind import javax.inject.Inject diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentStateFactory.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStateFactory.kt similarity index 76% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentStateFactory.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStateFactory.kt index 176a540e00..e2dcec5a8c 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentStateFactory.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStateFactory.kt @@ -14,10 +14,10 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.factories.event +package io.element.android.features.messages.impl.timeline.factories.event -import io.element.android.features.messages.timeline.model.event.TimelineItemEventContent -import io.element.android.features.messages.timeline.model.event.TimelineItemUnknownContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemUnknownContent import org.matrix.rustcomponents.sdk.TimelineItemContentKind import javax.inject.Inject diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentStickerFactory.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStickerFactory.kt similarity index 76% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentStickerFactory.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStickerFactory.kt index 8e8a81ccf5..de7ad74ef5 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentStickerFactory.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStickerFactory.kt @@ -14,10 +14,10 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.factories.event +package io.element.android.features.messages.impl.timeline.factories.event -import io.element.android.features.messages.timeline.model.event.TimelineItemEventContent -import io.element.android.features.messages.timeline.model.event.TimelineItemUnknownContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemUnknownContent import org.matrix.rustcomponents.sdk.TimelineItemContentKind import javax.inject.Inject diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentUTDFactory.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentUTDFactory.kt similarity index 77% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentUTDFactory.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentUTDFactory.kt index 77d9dcfefd..495059be73 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemContentUTDFactory.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentUTDFactory.kt @@ -14,10 +14,10 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.factories.event +package io.element.android.features.messages.impl.timeline.factories.event -import io.element.android.features.messages.timeline.model.event.TimelineItemEventContent -import io.element.android.features.messages.timeline.model.event.TimelineItemEncryptedContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEncryptedContent import org.matrix.rustcomponents.sdk.TimelineItemContentKind import javax.inject.Inject diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemEventFactory.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemEventFactory.kt similarity index 90% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemEventFactory.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemEventFactory.kt index 4dbf72b8e2..7856494c6b 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/event/TimelineItemEventFactory.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemEventFactory.kt @@ -14,12 +14,12 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.factories.event +package io.element.android.features.messages.impl.timeline.factories.event -import io.element.android.features.messages.timeline.model.AggregatedReaction -import io.element.android.features.messages.timeline.model.TimelineItem -import io.element.android.features.messages.timeline.model.TimelineItemGroupPosition -import io.element.android.features.messages.timeline.model.TimelineItemReactions +import io.element.android.features.messages.impl.timeline.model.AggregatedReaction +import io.element.android.features.messages.impl.timeline.model.TimelineItem +import io.element.android.features.messages.impl.timeline.model.TimelineItemGroupPosition +import io.element.android.features.messages.impl.timeline.model.TimelineItemReactions import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.designsystem.components.avatar.AvatarSize import io.element.android.libraries.matrix.timeline.MatrixTimelineItem diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/virtual/TimelineItemDaySeparatorFactory.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/virtual/TimelineItemDaySeparatorFactory.kt similarity index 80% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/virtual/TimelineItemDaySeparatorFactory.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/virtual/TimelineItemDaySeparatorFactory.kt index 43a6beada7..4a6dd5fdf1 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/virtual/TimelineItemDaySeparatorFactory.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/virtual/TimelineItemDaySeparatorFactory.kt @@ -14,10 +14,10 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.factories.virtual +package io.element.android.features.messages.impl.timeline.factories.virtual -import io.element.android.features.messages.timeline.model.virtual.TimelineItemDaySeparatorModel -import io.element.android.features.messages.timeline.model.virtual.TimelineItemVirtualModel +import io.element.android.features.messages.impl.timeline.model.virtual.TimelineItemDaySeparatorModel +import io.element.android.features.messages.impl.timeline.model.virtual.TimelineItemVirtualModel import io.element.android.libraries.dateformatter.DaySeparatorFormatter import org.matrix.rustcomponents.sdk.VirtualTimelineItem import javax.inject.Inject diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/virtual/TimelineItemVirtualFactory.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/virtual/TimelineItemVirtualFactory.kt similarity index 75% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/virtual/TimelineItemVirtualFactory.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/virtual/TimelineItemVirtualFactory.kt index e92171caa7..b22ba1ed83 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/factories/virtual/TimelineItemVirtualFactory.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/virtual/TimelineItemVirtualFactory.kt @@ -14,13 +14,13 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.factories.virtual +package io.element.android.features.messages.impl.timeline.factories.virtual -import io.element.android.features.messages.timeline.model.TimelineItem -import io.element.android.features.messages.timeline.model.virtual.TimelineItemLoadingModel -import io.element.android.features.messages.timeline.model.virtual.TimelineItemReadMarkerModel -import io.element.android.features.messages.timeline.model.virtual.TimelineItemUnknownVirtualModel -import io.element.android.features.messages.timeline.model.virtual.TimelineItemVirtualModel +import io.element.android.features.messages.impl.timeline.model.TimelineItem +import io.element.android.features.messages.impl.timeline.model.virtual.TimelineItemLoadingModel +import io.element.android.features.messages.impl.timeline.model.virtual.TimelineItemReadMarkerModel +import io.element.android.features.messages.impl.timeline.model.virtual.TimelineItemUnknownVirtualModel +import io.element.android.features.messages.impl.timeline.model.virtual.TimelineItemVirtualModel import io.element.android.libraries.matrix.timeline.MatrixTimelineItem import org.matrix.rustcomponents.sdk.VirtualTimelineItem import javax.inject.Inject diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/AggregatedReaction.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/AggregatedReaction.kt similarity index 91% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/AggregatedReaction.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/AggregatedReaction.kt index c40396a5c2..d7fde40968 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/AggregatedReaction.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/AggregatedReaction.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model +package io.element.android.features.messages.impl.timeline.model data class AggregatedReaction( val key: String, diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/AggregatedReactionProvider.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/AggregatedReactionProvider.kt similarity index 94% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/AggregatedReactionProvider.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/AggregatedReactionProvider.kt index 681e57b2ef..301a9db36c 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/AggregatedReactionProvider.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/AggregatedReactionProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model +package io.element.android.features.messages.impl.timeline.model import androidx.compose.ui.tooling.preview.PreviewParameterProvider diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/TimelineItem.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItem.kt similarity index 86% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/TimelineItem.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItem.kt index 86ea70956f..e6963235fc 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/TimelineItem.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItem.kt @@ -14,11 +14,11 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model +package io.element.android.features.messages.impl.timeline.model import androidx.compose.runtime.Immutable -import io.element.android.features.messages.timeline.model.event.TimelineItemEventContent -import io.element.android.features.messages.timeline.model.virtual.TimelineItemVirtualModel +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContent +import io.element.android.features.messages.impl.timeline.model.virtual.TimelineItemVirtualModel import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.matrix.core.EventId diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/TimelineItemGroupPosition.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPosition.kt similarity index 93% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/TimelineItemGroupPosition.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPosition.kt index 11912b3047..ec3a94519b 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/TimelineItemGroupPosition.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPosition.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model +package io.element.android.features.messages.impl.timeline.model import androidx.compose.runtime.Immutable diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/TimelineItemGroupPositionProvider.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPositionProvider.kt similarity index 93% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/TimelineItemGroupPositionProvider.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPositionProvider.kt index 4a4c3296d7..8d8d1231ec 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/TimelineItemGroupPositionProvider.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPositionProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model +package io.element.android.features.messages.impl.timeline.model import androidx.compose.ui.tooling.preview.PreviewParameterProvider diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/TimelineItemReactions.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemReactions.kt similarity index 91% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/TimelineItemReactions.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemReactions.kt index 1884af9c70..3912844f20 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/TimelineItemReactions.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemReactions.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model +package io.element.android.features.messages.impl.timeline.model import kotlinx.collections.immutable.ImmutableList diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/TimelineItemReactionsProvider.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemReactionsProvider.kt similarity index 92% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/TimelineItemReactionsProvider.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemReactionsProvider.kt index 998413e9df..cbd6373d6a 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/TimelineItemReactionsProvider.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemReactionsProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model +package io.element.android.features.messages.impl.timeline.model import kotlinx.collections.immutable.toPersistentList diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/bubble/BubbleState.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/bubble/BubbleState.kt similarity index 82% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/bubble/BubbleState.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/bubble/BubbleState.kt index 0daeef1417..1912aac668 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/bubble/BubbleState.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/bubble/BubbleState.kt @@ -14,9 +14,9 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.bubble +package io.element.android.features.messages.impl.timeline.model.bubble -import io.element.android.features.messages.timeline.model.TimelineItemGroupPosition +import io.element.android.features.messages.impl.timeline.model.TimelineItemGroupPosition data class BubbleState( val groupPosition: TimelineItemGroupPosition, diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/bubble/BubbleStateProvider.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/bubble/BubbleStateProvider.kt similarity index 89% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/bubble/BubbleStateProvider.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/bubble/BubbleStateProvider.kt index bd0dfe53e6..91804278ae 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/bubble/BubbleStateProvider.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/bubble/BubbleStateProvider.kt @@ -14,10 +14,10 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.bubble +package io.element.android.features.messages.impl.timeline.model.bubble import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.features.messages.timeline.model.TimelineItemGroupPosition +import io.element.android.features.messages.impl.timeline.model.TimelineItemGroupPosition open class BubbleStateProvider : PreviewParameterProvider { override val values: Sequence diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemEmoteContent.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEmoteContent.kt similarity index 91% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemEmoteContent.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEmoteContent.kt index e6b4c9b439..67fefb665e 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemEmoteContent.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEmoteContent.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.event +package io.element.android.features.messages.impl.timeline.model.event import org.jsoup.nodes.Document diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemEncryptedContent.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEncryptedContent.kt similarity index 91% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemEncryptedContent.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEncryptedContent.kt index a57378dfd8..cdb9b1a274 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemEncryptedContent.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEncryptedContent.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.event +package io.element.android.features.messages.impl.timeline.model.event import org.matrix.rustcomponents.sdk.EncryptedMessage diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemEventContent.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContent.kt similarity index 90% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemEventContent.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContent.kt index ee09cfb979..7e166dba97 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemEventContent.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContent.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.event +package io.element.android.features.messages.impl.timeline.model.event import androidx.compose.runtime.Immutable diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemEventContentProvider.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContentProvider.kt similarity index 96% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemEventContentProvider.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContentProvider.kt index 2cd8e78c29..e8df9d9639 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemEventContentProvider.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContentProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.event +package io.element.android.features.messages.impl.timeline.model.event import androidx.compose.ui.tooling.preview.PreviewParameterProvider import org.jsoup.Jsoup diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemImageContent.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemImageContent.kt similarity index 92% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemImageContent.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemImageContent.kt index 92912d952a..7dbfc5ccfb 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemImageContent.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemImageContent.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.event +package io.element.android.features.messages.impl.timeline.model.event import io.element.android.libraries.matrix.media.MediaResolver diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemImageContentProvider.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemImageContentProvider.kt similarity index 94% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemImageContentProvider.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemImageContentProvider.kt index f2a1bee698..4b2de362fa 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemImageContentProvider.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemImageContentProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.event +package io.element.android.features.messages.impl.timeline.model.event import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.libraries.matrix.media.MediaResolver diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemNoticeContent.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemNoticeContent.kt similarity index 91% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemNoticeContent.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemNoticeContent.kt index 0b6ca6c26d..6c647158c4 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemNoticeContent.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemNoticeContent.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.event +package io.element.android.features.messages.impl.timeline.model.event import org.jsoup.nodes.Document diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemRedactedContent.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemRedactedContent.kt similarity index 90% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemRedactedContent.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemRedactedContent.kt index 4ddae9be32..de98b22bbb 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemRedactedContent.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemRedactedContent.kt @@ -14,6 +14,6 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.event +package io.element.android.features.messages.impl.timeline.model.event object TimelineItemRedactedContent : TimelineItemEventContent diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemTextBasedContent.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemTextBasedContent.kt similarity index 91% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemTextBasedContent.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemTextBasedContent.kt index 6ca23a4e16..2fa8eb4f67 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemTextBasedContent.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemTextBasedContent.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.event +package io.element.android.features.messages.impl.timeline.model.event import org.jsoup.nodes.Document diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemTextContent.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemTextContent.kt similarity index 91% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemTextContent.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemTextContent.kt index f35941b5bb..6cbb0ccd08 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemTextContent.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemTextContent.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.event +package io.element.android.features.messages.impl.timeline.model.event import org.jsoup.nodes.Document diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemUnknownContent.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemUnknownContent.kt similarity index 90% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemUnknownContent.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemUnknownContent.kt index 4b435bde69..eb79b29f79 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/event/TimelineItemUnknownContent.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemUnknownContent.kt @@ -14,6 +14,6 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.event +package io.element.android.features.messages.impl.timeline.model.event object TimelineItemUnknownContent : TimelineItemEventContent diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemDaySeparatorModel.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemDaySeparatorModel.kt similarity index 90% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemDaySeparatorModel.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemDaySeparatorModel.kt index c6e762a235..b4c1235f8f 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemDaySeparatorModel.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemDaySeparatorModel.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.virtual +package io.element.android.features.messages.impl.timeline.model.virtual data class TimelineItemDaySeparatorModel( val formattedDate: String diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemDaySeparatorModelProvider.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemDaySeparatorModelProvider.kt similarity index 93% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemDaySeparatorModelProvider.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemDaySeparatorModelProvider.kt index 0d1cb4d68a..76a5b72807 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemDaySeparatorModelProvider.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemDaySeparatorModelProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.virtual +package io.element.android.features.messages.impl.timeline.model.virtual import androidx.compose.ui.tooling.preview.PreviewParameterProvider diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemLoadingModel.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemLoadingModel.kt similarity index 90% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemLoadingModel.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemLoadingModel.kt index 334fbd09ed..4870177a84 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemLoadingModel.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemLoadingModel.kt @@ -14,6 +14,6 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.virtual +package io.element.android.features.messages.impl.timeline.model.virtual object TimelineItemLoadingModel : TimelineItemVirtualModel diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemReadMarkerModel.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemReadMarkerModel.kt similarity index 90% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemReadMarkerModel.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemReadMarkerModel.kt index ccc154acf5..247cd58212 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemReadMarkerModel.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemReadMarkerModel.kt @@ -14,6 +14,6 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.virtual +package io.element.android.features.messages.impl.timeline.model.virtual object TimelineItemReadMarkerModel : TimelineItemVirtualModel diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemTimelineStartModel.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemTimelineStartModel.kt similarity index 90% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemTimelineStartModel.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemTimelineStartModel.kt index a7493353f6..ab0ec4fdf8 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemTimelineStartModel.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemTimelineStartModel.kt @@ -14,6 +14,6 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.virtual +package io.element.android.features.messages.impl.timeline.model.virtual object TimelineItemTimelineStartModel : TimelineItemVirtualModel diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemUnknownVirtualModel.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemUnknownVirtualModel.kt similarity index 90% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemUnknownVirtualModel.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemUnknownVirtualModel.kt index dac0724dce..6d023bf748 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemUnknownVirtualModel.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemUnknownVirtualModel.kt @@ -14,6 +14,6 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.virtual +package io.element.android.features.messages.impl.timeline.model.virtual object TimelineItemUnknownVirtualModel : TimelineItemVirtualModel diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemVirtualModel.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemVirtualModel.kt similarity index 90% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemVirtualModel.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemVirtualModel.kt index 9970375daa..a7911867f9 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/model/virtual/TimelineItemVirtualModel.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemVirtualModel.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.model.virtual +package io.element.android.features.messages.impl.timeline.model.virtual import androidx.compose.runtime.Immutable diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/util/MutableListExt.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/util/MutableListExt.kt similarity index 92% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/util/MutableListExt.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/util/MutableListExt.kt index 555cb4cb01..50810d3dfc 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/util/MutableListExt.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/util/MutableListExt.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.util +package io.element.android.features.messages.impl.timeline.util internal inline fun MutableList.invalidateLast() { val indexOfLast = size diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/util/toHtmlDocument.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/util/toHtmlDocument.kt similarity index 93% rename from features/messages/src/main/kotlin/io/element/android/features/messages/timeline/util/toHtmlDocument.kt rename to features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/util/toHtmlDocument.kt index 199a6739b8..5a9a51796a 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/util/toHtmlDocument.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/util/toHtmlDocument.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.messages.timeline.util +package io.element.android.features.messages.impl.timeline.util import org.jsoup.Jsoup import org.jsoup.nodes.Document diff --git a/features/messages/src/test/kotlin/io/element/android/features/messages/MessagesPresenterTest.kt b/features/messages/src/test/kotlin/io/element/android/features/messages/MessagesPresenterTest.kt index 49786d1c49..97192985f1 100644 --- a/features/messages/src/test/kotlin/io/element/android/features/messages/MessagesPresenterTest.kt +++ b/features/messages/src/test/kotlin/io/element/android/features/messages/MessagesPresenterTest.kt @@ -22,30 +22,21 @@ import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat -import io.element.android.features.messages.actionlist.ActionListPresenter -import io.element.android.features.messages.actionlist.model.TimelineItemAction +import io.element.android.features.messages.impl.actionlist.ActionListPresenter +import io.element.android.features.messages.impl.actionlist.model.TimelineItemAction import io.element.android.features.messages.fixtures.aMessageEvent import io.element.android.features.messages.fixtures.aTimelineItemsFactory -import io.element.android.features.messages.textcomposer.MessageComposerPresenter -import io.element.android.features.messages.timeline.TimelinePresenter -import io.element.android.features.messages.timeline.model.TimelineItem -import io.element.android.features.messages.timeline.model.TimelineItemReactions -import io.element.android.features.messages.timeline.model.event.TimelineItemEventContent -import io.element.android.features.messages.timeline.model.event.TimelineItemTextContent -import io.element.android.libraries.core.coroutine.CoroutineDispatchers -import io.element.android.libraries.designsystem.components.avatar.AvatarData +import io.element.android.features.messages.impl.MessagesEvents +import io.element.android.features.messages.impl.MessagesPresenter +import io.element.android.features.messages.impl.textcomposer.MessageComposerPresenter +import io.element.android.features.messages.impl.timeline.TimelinePresenter import io.element.android.libraries.matrix.room.MatrixRoom import io.element.android.libraries.matrixtest.AN_EVENT_ID -import io.element.android.libraries.matrixtest.A_MESSAGE import io.element.android.libraries.matrixtest.A_ROOM_ID -import io.element.android.libraries.matrixtest.A_USER_ID -import io.element.android.libraries.matrixtest.A_USER_NAME import io.element.android.libraries.matrixtest.room.FakeMatrixRoom import io.element.android.libraries.textcomposer.MessageComposerMode -import kotlinx.collections.immutable.persistentListOf import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.TestScope -import kotlinx.coroutines.test.UnconfinedTestDispatcher import kotlinx.coroutines.test.runTest import org.junit.Test diff --git a/features/messages/src/test/kotlin/io/element/android/features/messages/actionlist/ActionListPresenterTest.kt b/features/messages/src/test/kotlin/io/element/android/features/messages/actionlist/ActionListPresenterTest.kt index 2c0f9164a3..aefe06f438 100644 --- a/features/messages/src/test/kotlin/io/element/android/features/messages/actionlist/ActionListPresenterTest.kt +++ b/features/messages/src/test/kotlin/io/element/android/features/messages/actionlist/ActionListPresenterTest.kt @@ -22,12 +22,15 @@ import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat -import io.element.android.features.messages.actionlist.model.TimelineItemAction -import io.element.android.features.messages.timeline.model.TimelineItem -import io.element.android.features.messages.timeline.model.TimelineItemReactions -import io.element.android.features.messages.timeline.model.event.TimelineItemEventContent -import io.element.android.features.messages.timeline.model.event.TimelineItemRedactedContent -import io.element.android.features.messages.timeline.model.event.TimelineItemTextContent +import io.element.android.features.messages.impl.actionlist.ActionListEvents +import io.element.android.features.messages.impl.actionlist.model.TimelineItemAction +import io.element.android.features.messages.impl.actionlist.ActionListPresenter +import io.element.android.features.messages.impl.actionlist.ActionListState +import io.element.android.features.messages.impl.timeline.model.TimelineItem +import io.element.android.features.messages.impl.timeline.model.TimelineItemReactions +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemRedactedContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemTextContent import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.matrixtest.AN_EVENT_ID import io.element.android.libraries.matrixtest.A_MESSAGE @@ -37,7 +40,6 @@ import kotlinx.collections.immutable.persistentListOf import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest import org.junit.Test -import org.matrix.rustcomponents.sdk.TimelineItemContent class ActionListPresenterTest { @Test diff --git a/features/messages/src/test/kotlin/io/element/android/features/messages/fixtures/aMessageEvent.kt b/features/messages/src/test/kotlin/io/element/android/features/messages/fixtures/aMessageEvent.kt index 9e665be409..68cfc1150c 100644 --- a/features/messages/src/test/kotlin/io/element/android/features/messages/fixtures/aMessageEvent.kt +++ b/features/messages/src/test/kotlin/io/element/android/features/messages/fixtures/aMessageEvent.kt @@ -16,10 +16,10 @@ package io.element.android.features.messages.fixtures -import io.element.android.features.messages.timeline.model.TimelineItem -import io.element.android.features.messages.timeline.model.TimelineItemReactions -import io.element.android.features.messages.timeline.model.event.TimelineItemEventContent -import io.element.android.features.messages.timeline.model.event.TimelineItemTextContent +import io.element.android.features.messages.impl.timeline.model.TimelineItem +import io.element.android.features.messages.impl.timeline.model.TimelineItemReactions +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemTextContent import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.matrixtest.AN_EVENT_ID import io.element.android.libraries.matrixtest.A_MESSAGE diff --git a/features/messages/src/test/kotlin/io/element/android/features/messages/fixtures/timelineItemsFactory.kt b/features/messages/src/test/kotlin/io/element/android/features/messages/fixtures/timelineItemsFactory.kt index fc4cecf203..75ba0ff070 100644 --- a/features/messages/src/test/kotlin/io/element/android/features/messages/fixtures/timelineItemsFactory.kt +++ b/features/messages/src/test/kotlin/io/element/android/features/messages/fixtures/timelineItemsFactory.kt @@ -17,20 +17,20 @@ package io.element.android.features.messages.fixtures import io.element.android.features.messages.fakes.FakeDaySeparatorFormatter -import io.element.android.features.messages.timeline.factories.TimelineItemsFactory -import io.element.android.features.messages.timeline.factories.event.TimelineItemContentFactory -import io.element.android.features.messages.timeline.factories.event.TimelineItemContentFailedToParseMessageFactory -import io.element.android.features.messages.timeline.factories.event.TimelineItemContentFailedToParseStateFactory -import io.element.android.features.messages.timeline.factories.event.TimelineItemContentMessageFactory -import io.element.android.features.messages.timeline.factories.event.TimelineItemContentProfileChangeFactory -import io.element.android.features.messages.timeline.factories.event.TimelineItemContentRedactedFactory -import io.element.android.features.messages.timeline.factories.event.TimelineItemContentRoomMembershipFactory -import io.element.android.features.messages.timeline.factories.event.TimelineItemContentStateFactory -import io.element.android.features.messages.timeline.factories.event.TimelineItemContentStickerFactory -import io.element.android.features.messages.timeline.factories.event.TimelineItemContentUTDFactory -import io.element.android.features.messages.timeline.factories.event.TimelineItemEventFactory -import io.element.android.features.messages.timeline.factories.virtual.TimelineItemDaySeparatorFactory -import io.element.android.features.messages.timeline.factories.virtual.TimelineItemVirtualFactory +import io.element.android.features.messages.impl.timeline.factories.TimelineItemsFactory +import io.element.android.features.messages.impl.timeline.factories.event.TimelineItemContentFactory +import io.element.android.features.messages.impl.timeline.factories.event.TimelineItemContentFailedToParseMessageFactory +import io.element.android.features.messages.impl.timeline.factories.event.TimelineItemContentFailedToParseStateFactory +import io.element.android.features.messages.impl.timeline.factories.event.TimelineItemContentMessageFactory +import io.element.android.features.messages.impl.timeline.factories.event.TimelineItemContentProfileChangeFactory +import io.element.android.features.messages.impl.timeline.factories.event.TimelineItemContentRedactedFactory +import io.element.android.features.messages.impl.timeline.factories.event.TimelineItemContentRoomMembershipFactory +import io.element.android.features.messages.impl.timeline.factories.event.TimelineItemContentStateFactory +import io.element.android.features.messages.impl.timeline.factories.event.TimelineItemContentStickerFactory +import io.element.android.features.messages.impl.timeline.factories.event.TimelineItemContentUTDFactory +import io.element.android.features.messages.impl.timeline.factories.event.TimelineItemEventFactory +import io.element.android.features.messages.impl.timeline.factories.virtual.TimelineItemDaySeparatorFactory +import io.element.android.features.messages.impl.timeline.factories.virtual.TimelineItemVirtualFactory internal fun aTimelineItemsFactory() = TimelineItemsFactory( dispatchers = testCoroutineDispatchers(), diff --git a/features/messages/src/test/kotlin/io/element/android/features/messages/textcomposer/MessageComposerPresenterTest.kt b/features/messages/src/test/kotlin/io/element/android/features/messages/textcomposer/MessageComposerPresenterTest.kt index 8278acd13e..5782e08416 100644 --- a/features/messages/src/test/kotlin/io/element/android/features/messages/textcomposer/MessageComposerPresenterTest.kt +++ b/features/messages/src/test/kotlin/io/element/android/features/messages/textcomposer/MessageComposerPresenterTest.kt @@ -23,6 +23,9 @@ import app.cash.molecule.moleculeFlow import app.cash.turbine.ReceiveTurbine import app.cash.turbine.test import com.google.common.truth.Truth.assertThat +import io.element.android.features.messages.impl.textcomposer.MessageComposerEvents +import io.element.android.features.messages.impl.textcomposer.MessageComposerPresenter +import io.element.android.features.messages.impl.textcomposer.MessageComposerState import io.element.android.libraries.core.data.StableCharSequence import io.element.android.libraries.matrixtest.ANOTHER_MESSAGE import io.element.android.libraries.matrixtest.AN_EVENT_ID diff --git a/features/messages/src/test/kotlin/io/element/android/features/messages/timeline/TimelinePresenterTest.kt b/features/messages/src/test/kotlin/io/element/android/features/messages/timeline/TimelinePresenterTest.kt index b209d4ce5e..94641cf314 100644 --- a/features/messages/src/test/kotlin/io/element/android/features/messages/timeline/TimelinePresenterTest.kt +++ b/features/messages/src/test/kotlin/io/element/android/features/messages/timeline/TimelinePresenterTest.kt @@ -23,6 +23,8 @@ import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat import io.element.android.features.messages.fixtures.aTimelineItemsFactory +import io.element.android.features.messages.impl.timeline.TimelineEvents +import io.element.android.features.messages.impl.timeline.TimelinePresenter import io.element.android.libraries.matrixtest.AN_EVENT_ID import io.element.android.libraries.matrixtest.room.FakeMatrixRoom import io.element.android.libraries.matrixtest.timeline.FakeMatrixTimeline From 43b304e523e1f53ea13a83abe095fe9fc8a2dccf Mon Sep 17 00:00:00 2001 From: ganfra Date: Fri, 3 Mar 2023 14:38:05 +0100 Subject: [PATCH 07/25] Try splitting messages into api and impl modules --- .../element/android/x/ElementXApplication.kt | 2 +- .../io/element/android/x/MainActivity.kt | 2 +- .../io/element/android/x/di/AppBindings.kt | 6 +- .../io/element/android/x/di/AppComponent.kt | 2 +- .../io/element/android/x/di/AppModule.kt | 13 +--- .../android/x/di/MatrixClientsHolder.kt | 1 - .../io/element/android/x/di/RoomComponent.kt | 2 +- .../element/android/x/di/SessionComponent.kt | 2 +- .../io/element/android/x/node/RoomFlowNode.kt | 2 +- .../io/element/android/x/node/RootFlowNode.kt | 3 +- .../android/x/root/MatrixClientsHolder.kt | 63 +++++++++++++++++++ build.gradle.kts | 6 ++ features/messages/{ => api}/.gitignore | 0 features/messages/api/build.gradle.kts | 40 ++++++++++++ .../messages/api/MessagesEntryPoint.kt | 0 features/messages/impl/.gitignore | 1 + features/messages/{ => impl}/build.gradle.kts | 3 +- .../messages/{ => impl}/consumer-rules.pro | 0 .../messages/{ => impl}/proguard-rules.pro | 2 +- .../messages/ExampleInstrumentedTest.kt | 0 .../impl/DefaultMessagesEntryPoint.kt | 0 .../features/messages/impl/MessagesEvents.kt | 0 .../features/messages/impl/MessagesNode.kt | 0 .../messages/impl/MessagesPresenter.kt | 0 .../features/messages/impl/MessagesState.kt | 0 .../messages/impl/MessagesStateProvider.kt | 0 .../features/messages/impl/MessagesView.kt | 0 .../impl/actionlist/ActionListEvents.kt | 0 .../impl/actionlist/ActionListPresenter.kt | 0 .../impl/actionlist/ActionListState.kt | 0 .../actionlist/ActionListStateProvider.kt | 0 .../impl/actionlist/ActionListView.kt | 0 .../actionlist/model/TimelineItemAction.kt | 0 .../textcomposer/MessageComposerEvents.kt | 0 .../textcomposer/MessageComposerPresenter.kt | 0 .../impl/textcomposer/MessageComposerState.kt | 0 .../MessageComposerStateProvider.kt | 0 .../impl/textcomposer/MessageComposerView.kt | 0 .../messages/impl/timeline/TimelineEvents.kt | 0 .../impl/timeline/TimelinePresenter.kt | 0 .../messages/impl/timeline/TimelineState.kt | 0 .../impl/timeline/TimelineStateProvider.kt | 0 .../messages/impl/timeline/TimelineView.kt | 0 .../timeline/components/MessageEventBubble.kt | 0 .../components/MessagesReactionButton.kt | 0 .../components/TimelineItemReactionsView.kt | 0 .../event/TimelineItemContentView.kt | 0 .../event/TimelineItemEncryptedView.kt | 0 .../components/event/TimelineItemImageView.kt | 0 .../event/TimelineItemInformativeView.kt | 0 .../event/TimelineItemRedactedView.kt | 0 .../components/event/TimelineItemTextView.kt | 0 .../event/TimelineItemUnknownView.kt | 0 .../components/html/DocumentProvider.kt | 0 .../timeline/components/html/HtmlDocument.kt | 0 .../virtual/TimelineItemDaySeparatorView.kt | 0 .../TimelineItemLoadingMoreIndicator.kt | 0 .../impl/timeline/diff/CacheInvalidator.kt | 0 .../diff/MatrixTimelineItemsDiffCallback.kt | 0 .../factories/TimelineItemsFactory.kt | 0 .../event/TimelineItemContentFactory.kt | 0 ...eItemContentFailedToParseMessageFactory.kt | 0 ...ineItemContentFailedToParseStateFactory.kt | 0 .../TimelineItemContentMessageFactory.kt | 0 ...TimelineItemContentProfileChangeFactory.kt | 0 .../TimelineItemContentRedactedFactory.kt | 0 ...imelineItemContentRoomMembershipFactory.kt | 0 .../event/TimelineItemContentStateFactory.kt | 0 .../TimelineItemContentStickerFactory.kt | 0 .../event/TimelineItemContentUTDFactory.kt | 0 .../event/TimelineItemEventFactory.kt | 0 .../TimelineItemDaySeparatorFactory.kt | 0 .../virtual/TimelineItemVirtualFactory.kt | 0 .../impl/timeline/model/AggregatedReaction.kt | 0 .../model/AggregatedReactionProvider.kt | 0 .../impl/timeline/model/TimelineItem.kt | 0 .../model/TimelineItemGroupPosition.kt | 0 .../TimelineItemGroupPositionProvider.kt | 0 .../timeline/model/TimelineItemReactions.kt | 0 .../model/TimelineItemReactionsProvider.kt | 0 .../impl/timeline/model/bubble/BubbleState.kt | 0 .../model/bubble/BubbleStateProvider.kt | 0 .../model/event/TimelineItemEmoteContent.kt | 0 .../event/TimelineItemEncryptedContent.kt | 0 .../model/event/TimelineItemEventContent.kt | 0 .../event/TimelineItemEventContentProvider.kt | 0 .../model/event/TimelineItemImageContent.kt | 0 .../event/TimelineItemImageContentProvider.kt | 0 .../model/event/TimelineItemNoticeContent.kt | 0 .../event/TimelineItemRedactedContent.kt | 0 .../event/TimelineItemTextBasedContent.kt | 0 .../model/event/TimelineItemTextContent.kt | 0 .../model/event/TimelineItemUnknownContent.kt | 0 .../virtual/TimelineItemDaySeparatorModel.kt | 0 .../TimelineItemDaySeparatorModelProvider.kt | 0 .../model/virtual/TimelineItemLoadingModel.kt | 0 .../virtual/TimelineItemReadMarkerModel.kt | 0 .../virtual/TimelineItemTimelineStartModel.kt | 0 .../TimelineItemUnknownVirtualModel.kt | 0 .../model/virtual/TimelineItemVirtualModel.kt | 0 .../impl/timeline/util/MutableListExt.kt | 0 .../impl/timeline/util/toHtmlDocument.kt | 0 .../messages/MessagesPresenterTest.kt | 0 .../actionlist/ActionListPresenterTest.kt | 0 .../fakes/FakeDaySeparatorFormatter.kt | 0 .../messages/fixtures/aMessageEvent.kt | 0 .../fixtures/testCoroutineDispatchers.kt | 0 .../messages/fixtures/timelineItemsFactory.kt | 0 .../MessageComposerPresenterTest.kt | 0 .../timeline/TimelinePresenterTest.kt | 0 .../messages/src/main/AndroidManifest.xml | 20 ------ .../rageshake/reporter/DefaultBugReporter.kt | 3 + .../libraries/architecture/BackstackNode.kt | 3 +- .../kotlin/extension/DependencyHandleScope.kt | 2 +- settings.gradle.kts | 2 + 115 files changed, 130 insertions(+), 50 deletions(-) create mode 100644 app/src/main/kotlin/io/element/android/x/root/MatrixClientsHolder.kt rename features/messages/{ => api}/.gitignore (100%) create mode 100644 features/messages/api/build.gradle.kts rename features/messages/{ => api}/src/main/kotlin/io/element/android/features/messages/api/MessagesEntryPoint.kt (100%) create mode 100644 features/messages/impl/.gitignore rename features/messages/{ => impl}/build.gradle.kts (94%) rename features/messages/{ => impl}/consumer-rules.pro (100%) rename features/messages/{ => impl}/proguard-rules.pro (94%) rename features/messages/{ => impl}/src/androidTest/kotlin/io/element/android/features/messages/ExampleInstrumentedTest.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/DefaultMessagesEntryPoint.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/MessagesEvents.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListEvents.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenter.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListState.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListStateProvider.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/actionlist/model/TimelineItemAction.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerEvents.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerPresenter.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerState.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerStateProvider.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerView.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineEvents.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineState.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineStateProvider.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessageEventBubble.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsView.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemContentView.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEncryptedView.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemImageView.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemRedactedView.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemTextView.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemUnknownView.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/html/DocumentProvider.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/html/HtmlDocument.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemDaySeparatorView.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemLoadingMoreIndicator.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/diff/CacheInvalidator.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/diff/MatrixTimelineItemsDiffCallback.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/TimelineItemsFactory.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFactory.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFailedToParseMessageFactory.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFailedToParseStateFactory.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactory.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentProfileChangeFactory.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentRedactedFactory.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentRoomMembershipFactory.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStateFactory.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStickerFactory.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentUTDFactory.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemEventFactory.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/virtual/TimelineItemDaySeparatorFactory.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/virtual/TimelineItemVirtualFactory.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/AggregatedReaction.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/AggregatedReactionProvider.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItem.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPosition.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPositionProvider.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemReactions.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemReactionsProvider.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/bubble/BubbleState.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/bubble/BubbleStateProvider.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEmoteContent.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEncryptedContent.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContent.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContentProvider.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemImageContent.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemImageContentProvider.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemNoticeContent.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemRedactedContent.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemTextBasedContent.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemTextContent.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemUnknownContent.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemDaySeparatorModel.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemDaySeparatorModelProvider.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemLoadingModel.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemReadMarkerModel.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemTimelineStartModel.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemUnknownVirtualModel.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemVirtualModel.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/util/MutableListExt.kt (100%) rename features/messages/{ => impl}/src/main/kotlin/io/element/android/features/messages/impl/timeline/util/toHtmlDocument.kt (100%) rename features/messages/{ => impl}/src/test/kotlin/io/element/android/features/messages/MessagesPresenterTest.kt (100%) rename features/messages/{ => impl}/src/test/kotlin/io/element/android/features/messages/actionlist/ActionListPresenterTest.kt (100%) rename features/messages/{ => impl}/src/test/kotlin/io/element/android/features/messages/fakes/FakeDaySeparatorFormatter.kt (100%) rename features/messages/{ => impl}/src/test/kotlin/io/element/android/features/messages/fixtures/aMessageEvent.kt (100%) rename features/messages/{ => impl}/src/test/kotlin/io/element/android/features/messages/fixtures/testCoroutineDispatchers.kt (100%) rename features/messages/{ => impl}/src/test/kotlin/io/element/android/features/messages/fixtures/timelineItemsFactory.kt (100%) rename features/messages/{ => impl}/src/test/kotlin/io/element/android/features/messages/textcomposer/MessageComposerPresenterTest.kt (100%) rename features/messages/{ => impl}/src/test/kotlin/io/element/android/features/messages/timeline/TimelinePresenterTest.kt (100%) delete mode 100644 features/messages/src/main/AndroidManifest.xml diff --git a/app/src/main/kotlin/io/element/android/x/ElementXApplication.kt b/app/src/main/kotlin/io/element/android/x/ElementXApplication.kt index 76cf15e660..2b02bf3700 100644 --- a/app/src/main/kotlin/io/element/android/x/ElementXApplication.kt +++ b/app/src/main/kotlin/io/element/android/x/ElementXApplication.kt @@ -18,9 +18,9 @@ package io.element.android.x import android.app.Application import androidx.startup.AppInitializer -import io.element.android.libraries.di.DaggerComponentOwner import io.element.android.x.di.AppComponent import io.element.android.x.di.DaggerAppComponent +import io.element.android.libraries.di.DaggerComponentOwner import io.element.android.x.info.logApplicationInfo import io.element.android.x.initializer.CrashInitializer import io.element.android.x.initializer.MatrixInitializer diff --git a/app/src/main/kotlin/io/element/android/x/MainActivity.kt b/app/src/main/kotlin/io/element/android/x/MainActivity.kt index 999f654727..f8ce334e14 100644 --- a/app/src/main/kotlin/io/element/android/x/MainActivity.kt +++ b/app/src/main/kotlin/io/element/android/x/MainActivity.kt @@ -25,10 +25,10 @@ import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen import androidx.core.view.WindowCompat import com.bumble.appyx.core.integration.NodeHost import com.bumble.appyx.core.integrationpoint.NodeComponentActivity +import io.element.android.x.di.AppBindings import io.element.android.libraries.architecture.bindings import io.element.android.libraries.architecture.createNode import io.element.android.libraries.designsystem.theme.ElementTheme -import io.element.android.x.di.AppBindings import io.element.android.x.node.RootFlowNode class MainActivity : NodeComponentActivity() { diff --git a/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt b/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt index 94b93b8fd5..d60ff4a15b 100644 --- a/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt +++ b/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,12 +18,8 @@ package io.element.android.x.di import com.squareup.anvil.annotations.ContributesTo import io.element.android.libraries.di.AppScope -import io.element.android.libraries.matrix.auth.MatrixAuthenticationService -import io.element.android.x.root.RootPresenter @ContributesTo(AppScope::class) interface AppBindings { - fun rootPresenter(): RootPresenter - fun authenticationService(): MatrixAuthenticationService fun matrixClientsHolder(): MatrixClientsHolder } diff --git a/app/src/main/kotlin/io/element/android/x/di/AppComponent.kt b/app/src/main/kotlin/io/element/android/x/di/AppComponent.kt index ded3c333d7..d614556413 100644 --- a/app/src/main/kotlin/io/element/android/x/di/AppComponent.kt +++ b/app/src/main/kotlin/io/element/android/x/di/AppComponent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/app/src/main/kotlin/io/element/android/x/di/AppModule.kt b/app/src/main/kotlin/io/element/android/x/di/AppModule.kt index b562abe93e..5c70cca16b 100644 --- a/app/src/main/kotlin/io/element/android/x/di/AppModule.kt +++ b/app/src/main/kotlin/io/element/android/x/di/AppModule.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,18 +20,11 @@ import android.content.Context import com.squareup.anvil.annotations.ContributesTo import dagger.Module import dagger.Provides -import io.element.android.features.rageshake.reporter.BugReporter -import io.element.android.features.rageshake.reporter.DefaultBugReporter import io.element.android.libraries.core.coroutine.CoroutineDispatchers import io.element.android.libraries.di.AppScope import io.element.android.libraries.di.ApplicationContext import io.element.android.libraries.di.SingleIn -import kotlinx.coroutines.CoroutineName -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.MainScope -import kotlinx.coroutines.asCoroutineDispatcher -import kotlinx.coroutines.plus +import kotlinx.coroutines.* import java.io.File import java.util.concurrent.Executors @@ -61,6 +54,4 @@ object AppModule { ) } - @Provides - fun providesBugReporter(bugReporter: DefaultBugReporter): BugReporter = bugReporter } diff --git a/app/src/main/kotlin/io/element/android/x/di/MatrixClientsHolder.kt b/app/src/main/kotlin/io/element/android/x/di/MatrixClientsHolder.kt index 22dfe8a3ef..62f3a975c9 100644 --- a/app/src/main/kotlin/io/element/android/x/di/MatrixClientsHolder.kt +++ b/app/src/main/kotlin/io/element/android/x/di/MatrixClientsHolder.kt @@ -28,7 +28,6 @@ import java.util.concurrent.ConcurrentHashMap import javax.inject.Inject private const val SAVE_INSTANCE_KEY = "io.element.android.x.di.MatrixClientsHolder.SaveInstanceKey" - @SingleIn(AppScope::class) class MatrixClientsHolder @Inject constructor(private val authenticationService: MatrixAuthenticationService) { diff --git a/app/src/main/kotlin/io/element/android/x/di/RoomComponent.kt b/app/src/main/kotlin/io/element/android/x/di/RoomComponent.kt index c60eba1575..a2c2ce3881 100644 --- a/app/src/main/kotlin/io/element/android/x/di/RoomComponent.kt +++ b/app/src/main/kotlin/io/element/android/x/di/RoomComponent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/app/src/main/kotlin/io/element/android/x/di/SessionComponent.kt b/app/src/main/kotlin/io/element/android/x/di/SessionComponent.kt index be558f6f63..33969ddd96 100644 --- a/app/src/main/kotlin/io/element/android/x/di/SessionComponent.kt +++ b/app/src/main/kotlin/io/element/android/x/di/SessionComponent.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt b/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt index e0bd39b252..3671661b68 100644 --- a/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt +++ b/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt @@ -28,6 +28,7 @@ import com.bumble.appyx.navmodel.backstack.BackStack import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode +import io.element.android.x.di.RoomComponent import io.element.android.features.messages.api.MessagesEntryPoint import io.element.android.libraries.architecture.BackstackNode import io.element.android.libraries.architecture.NodeInputs @@ -36,7 +37,6 @@ import io.element.android.libraries.architecture.nodeInputs import io.element.android.libraries.di.DaggerComponentOwner import io.element.android.libraries.di.SessionScope import io.element.android.libraries.matrix.room.MatrixRoom -import io.element.android.x.di.RoomComponent import kotlinx.parcelize.Parcelize import timber.log.Timber diff --git a/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt b/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt index 6120833e15..a4ad92c80d 100644 --- a/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt +++ b/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt @@ -36,8 +36,8 @@ import com.bumble.appyx.navmodel.backstack.operation.push import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode +import io.element.android.x.root.MatrixClientsHolder import io.element.android.features.rageshake.bugreport.BugReportEntryPoint -import io.element.android.features.rageshake.bugreport.BugReportNode import io.element.android.libraries.architecture.BackstackNode import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler import io.element.android.libraries.architecture.createNode @@ -48,7 +48,6 @@ import io.element.android.libraries.di.ApplicationContext import io.element.android.libraries.di.DaggerComponentOwner import io.element.android.libraries.matrix.auth.MatrixAuthenticationService import io.element.android.libraries.matrix.core.SessionId -import io.element.android.x.di.MatrixClientsHolder import io.element.android.x.root.RootPresenter import io.element.android.x.root.RootView import kotlinx.coroutines.flow.distinctUntilChanged diff --git a/app/src/main/kotlin/io/element/android/x/root/MatrixClientsHolder.kt b/app/src/main/kotlin/io/element/android/x/root/MatrixClientsHolder.kt new file mode 100644 index 0000000000..d4cb6b6552 --- /dev/null +++ b/app/src/main/kotlin/io/element/android/x/root/MatrixClientsHolder.kt @@ -0,0 +1,63 @@ +package io.element.android.x.root + +import android.os.Bundle +import io.element.android.libraries.di.AppScope +import io.element.android.libraries.di.SingleIn +import io.element.android.libraries.matrix.MatrixClient +import io.element.android.libraries.matrix.auth.MatrixAuthenticationService +import io.element.android.libraries.matrix.core.SessionId +import kotlinx.coroutines.runBlocking +import timber.log.Timber +import java.util.concurrent.ConcurrentHashMap +import javax.inject.Inject + +private const val SAVE_INSTANCE_KEY = "io.element.android.x.di.MatrixClientsHolder.SaveInstanceKey" + +@SingleIn(AppScope::class) +class MatrixClientsHolder @Inject constructor(private val authenticationService: MatrixAuthenticationService) { + + private val sessionIdsToMatrixClient = ConcurrentHashMap() + + fun add(matrixClient: MatrixClient) { + sessionIdsToMatrixClient[matrixClient.sessionId] = matrixClient + } + + fun removeAll() { + sessionIdsToMatrixClient.clear() + } + + fun remove(sessionId: SessionId) { + sessionIdsToMatrixClient.remove(sessionId) + } + + fun isEmpty(): Boolean = sessionIdsToMatrixClient.isEmpty() + + fun knowSession(sessionId: SessionId): Boolean = sessionIdsToMatrixClient.containsKey(sessionId) + + fun getOrNull(sessionId: SessionId): MatrixClient? { + return sessionIdsToMatrixClient[sessionId] + } + + @Suppress("DEPRECATION") + fun restore(savedInstanceState: Bundle?) { + if (savedInstanceState == null || sessionIdsToMatrixClient.isNotEmpty()) return + val sessionIds = savedInstanceState.getSerializable(SAVE_INSTANCE_KEY) as? Array + if (sessionIds.isNullOrEmpty()) return + // Not ideal but should only happens in case of process recreation. This ensure we restore all the active sessions before restoring the node graphs. + runBlocking { + sessionIds.forEach { sessionId -> + Timber.v("Restore matrix session: $sessionId") + val matrixClient = authenticationService.restoreSession(sessionId) + if (matrixClient != null) { + add(matrixClient) + } + } + } + } + + fun onSaveInstanceState(outState: Bundle) { + val sessionKeys = sessionIdsToMatrixClient.keys.toTypedArray() + Timber.v("Save matrix session keys = $sessionKeys") + outState.putSerializable(SAVE_INSTANCE_KEY, sessionKeys) + } +} diff --git a/build.gradle.kts b/build.gradle.kts index bf6f1dd0d4..b647d04ff1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,12 @@ import kotlinx.kover.api.KoverTaskExtension import org.jetbrains.kotlin.cli.common.toBooleanLenient +buildscript { + dependencies { + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0") + } +} + /* * Copyright (c) 2022 New Vector Ltd * diff --git a/features/messages/.gitignore b/features/messages/api/.gitignore similarity index 100% rename from features/messages/.gitignore rename to features/messages/api/.gitignore diff --git a/features/messages/api/build.gradle.kts b/features/messages/api/build.gradle.kts new file mode 100644 index 0000000000..10568c83c6 --- /dev/null +++ b/features/messages/api/build.gradle.kts @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2022 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// TODO: Remove once https://youtrack.jetbrains.com/issue/KTIJ-19369 is fixed +@Suppress("DSL_SCOPE_VIOLATION") +plugins { + id("io.element.android-compose-library") +} + +android { + namespace = "io.element.android.features.messages.api" +} + +dependencies { + implementation(projects.libraries.core) + implementation(projects.libraries.architecture) + implementation(projects.libraries.matrix) + + testImplementation(libs.test.junit) + testImplementation(libs.coroutines.test) + testImplementation(libs.molecule.runtime) + testImplementation(libs.test.truth) + testImplementation(libs.test.turbine) + testImplementation(projects.libraries.matrixtest) + + androidTestImplementation(libs.test.junitext) +} diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/api/MessagesEntryPoint.kt b/features/messages/api/src/main/kotlin/io/element/android/features/messages/api/MessagesEntryPoint.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/api/MessagesEntryPoint.kt rename to features/messages/api/src/main/kotlin/io/element/android/features/messages/api/MessagesEntryPoint.kt diff --git a/features/messages/impl/.gitignore b/features/messages/impl/.gitignore new file mode 100644 index 0000000000..42afabfd2a --- /dev/null +++ b/features/messages/impl/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/features/messages/build.gradle.kts b/features/messages/impl/build.gradle.kts similarity index 94% rename from features/messages/build.gradle.kts rename to features/messages/impl/build.gradle.kts index a6ecc71a80..fe65a6dfbd 100644 --- a/features/messages/build.gradle.kts +++ b/features/messages/impl/build.gradle.kts @@ -23,7 +23,7 @@ plugins { } android { - namespace = "io.element.android.features.messages" + namespace = "io.element.android.features.messages.impl" } anvil { @@ -33,6 +33,7 @@ anvil { dependencies { implementation(projects.anvilannotations) anvil(projects.anvilcodegen) + api(projects.features.messages.api) implementation(projects.libraries.core) implementation(projects.libraries.architecture) implementation(projects.libraries.matrix) diff --git a/features/messages/consumer-rules.pro b/features/messages/impl/consumer-rules.pro similarity index 100% rename from features/messages/consumer-rules.pro rename to features/messages/impl/consumer-rules.pro diff --git a/features/messages/proguard-rules.pro b/features/messages/impl/proguard-rules.pro similarity index 94% rename from features/messages/proguard-rules.pro rename to features/messages/impl/proguard-rules.pro index ff59496d81..481bb43481 100644 --- a/features/messages/proguard-rules.pro +++ b/features/messages/impl/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle.kts. +# proguardFiles setting in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/features/messages/src/androidTest/kotlin/io/element/android/features/messages/ExampleInstrumentedTest.kt b/features/messages/impl/src/androidTest/kotlin/io/element/android/features/messages/ExampleInstrumentedTest.kt similarity index 100% rename from features/messages/src/androidTest/kotlin/io/element/android/features/messages/ExampleInstrumentedTest.kt rename to features/messages/impl/src/androidTest/kotlin/io/element/android/features/messages/ExampleInstrumentedTest.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/DefaultMessagesEntryPoint.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/DefaultMessagesEntryPoint.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/DefaultMessagesEntryPoint.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/DefaultMessagesEntryPoint.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesEvents.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesEvents.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesEvents.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesEvents.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListEvents.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListEvents.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListEvents.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListEvents.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenter.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenter.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenter.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListState.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListState.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListState.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListState.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListStateProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListStateProvider.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListStateProvider.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListStateProvider.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/model/TimelineItemAction.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/model/TimelineItemAction.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/actionlist/model/TimelineItemAction.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/model/TimelineItemAction.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerEvents.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerEvents.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerEvents.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerEvents.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerPresenter.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerPresenter.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerPresenter.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerState.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerState.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerState.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerState.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerStateProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerStateProvider.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerStateProvider.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerStateProvider.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerView.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerView.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/textcomposer/MessageComposerView.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineEvents.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineEvents.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineEvents.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineEvents.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineState.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineState.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineState.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineState.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineStateProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineStateProvider.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineStateProvider.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineStateProvider.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessageEventBubble.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessageEventBubble.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessageEventBubble.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessageEventBubble.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsView.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsView.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsView.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemContentView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemContentView.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemContentView.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemContentView.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEncryptedView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEncryptedView.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEncryptedView.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEncryptedView.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemImageView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemImageView.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemImageView.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemImageView.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemRedactedView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemRedactedView.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemRedactedView.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemRedactedView.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemTextView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemTextView.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemTextView.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemTextView.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemUnknownView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemUnknownView.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemUnknownView.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemUnknownView.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/html/DocumentProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/html/DocumentProvider.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/html/DocumentProvider.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/html/DocumentProvider.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/html/HtmlDocument.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/html/HtmlDocument.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/html/HtmlDocument.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/html/HtmlDocument.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemDaySeparatorView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemDaySeparatorView.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemDaySeparatorView.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemDaySeparatorView.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemLoadingMoreIndicator.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemLoadingMoreIndicator.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemLoadingMoreIndicator.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemLoadingMoreIndicator.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/diff/CacheInvalidator.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/diff/CacheInvalidator.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/diff/CacheInvalidator.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/diff/CacheInvalidator.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/diff/MatrixTimelineItemsDiffCallback.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/diff/MatrixTimelineItemsDiffCallback.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/diff/MatrixTimelineItemsDiffCallback.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/diff/MatrixTimelineItemsDiffCallback.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/TimelineItemsFactory.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/TimelineItemsFactory.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/TimelineItemsFactory.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/TimelineItemsFactory.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFactory.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFactory.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFactory.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFactory.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFailedToParseMessageFactory.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFailedToParseMessageFactory.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFailedToParseMessageFactory.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFailedToParseMessageFactory.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFailedToParseStateFactory.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFailedToParseStateFactory.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFailedToParseStateFactory.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentFailedToParseStateFactory.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactory.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactory.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactory.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactory.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentProfileChangeFactory.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentProfileChangeFactory.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentProfileChangeFactory.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentProfileChangeFactory.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentRedactedFactory.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentRedactedFactory.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentRedactedFactory.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentRedactedFactory.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentRoomMembershipFactory.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentRoomMembershipFactory.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentRoomMembershipFactory.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentRoomMembershipFactory.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStateFactory.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStateFactory.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStateFactory.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStateFactory.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStickerFactory.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStickerFactory.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStickerFactory.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStickerFactory.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentUTDFactory.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentUTDFactory.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentUTDFactory.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentUTDFactory.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemEventFactory.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemEventFactory.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemEventFactory.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemEventFactory.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/virtual/TimelineItemDaySeparatorFactory.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/virtual/TimelineItemDaySeparatorFactory.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/virtual/TimelineItemDaySeparatorFactory.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/virtual/TimelineItemDaySeparatorFactory.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/virtual/TimelineItemVirtualFactory.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/virtual/TimelineItemVirtualFactory.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/virtual/TimelineItemVirtualFactory.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/virtual/TimelineItemVirtualFactory.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/AggregatedReaction.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/AggregatedReaction.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/AggregatedReaction.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/AggregatedReaction.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/AggregatedReactionProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/AggregatedReactionProvider.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/AggregatedReactionProvider.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/AggregatedReactionProvider.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItem.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItem.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItem.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItem.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPosition.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPosition.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPosition.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPosition.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPositionProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPositionProvider.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPositionProvider.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPositionProvider.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemReactions.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemReactions.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemReactions.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemReactions.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemReactionsProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemReactionsProvider.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemReactionsProvider.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemReactionsProvider.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/bubble/BubbleState.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/bubble/BubbleState.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/bubble/BubbleState.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/bubble/BubbleState.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/bubble/BubbleStateProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/bubble/BubbleStateProvider.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/bubble/BubbleStateProvider.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/bubble/BubbleStateProvider.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEmoteContent.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEmoteContent.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEmoteContent.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEmoteContent.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEncryptedContent.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEncryptedContent.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEncryptedContent.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEncryptedContent.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContent.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContent.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContent.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContent.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContentProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContentProvider.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContentProvider.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContentProvider.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemImageContent.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemImageContent.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemImageContent.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemImageContent.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemImageContentProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemImageContentProvider.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemImageContentProvider.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemImageContentProvider.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemNoticeContent.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemNoticeContent.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemNoticeContent.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemNoticeContent.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemRedactedContent.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemRedactedContent.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemRedactedContent.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemRedactedContent.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemTextBasedContent.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemTextBasedContent.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemTextBasedContent.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemTextBasedContent.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemTextContent.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemTextContent.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemTextContent.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemTextContent.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemUnknownContent.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemUnknownContent.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemUnknownContent.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemUnknownContent.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemDaySeparatorModel.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemDaySeparatorModel.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemDaySeparatorModel.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemDaySeparatorModel.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemDaySeparatorModelProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemDaySeparatorModelProvider.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemDaySeparatorModelProvider.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemDaySeparatorModelProvider.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemLoadingModel.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemLoadingModel.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemLoadingModel.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemLoadingModel.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemReadMarkerModel.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemReadMarkerModel.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemReadMarkerModel.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemReadMarkerModel.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemTimelineStartModel.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemTimelineStartModel.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemTimelineStartModel.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemTimelineStartModel.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemUnknownVirtualModel.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemUnknownVirtualModel.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemUnknownVirtualModel.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemUnknownVirtualModel.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemVirtualModel.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemVirtualModel.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemVirtualModel.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/virtual/TimelineItemVirtualModel.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/util/MutableListExt.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/util/MutableListExt.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/util/MutableListExt.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/util/MutableListExt.kt diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/util/toHtmlDocument.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/util/toHtmlDocument.kt similarity index 100% rename from features/messages/src/main/kotlin/io/element/android/features/messages/impl/timeline/util/toHtmlDocument.kt rename to features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/util/toHtmlDocument.kt diff --git a/features/messages/src/test/kotlin/io/element/android/features/messages/MessagesPresenterTest.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/MessagesPresenterTest.kt similarity index 100% rename from features/messages/src/test/kotlin/io/element/android/features/messages/MessagesPresenterTest.kt rename to features/messages/impl/src/test/kotlin/io/element/android/features/messages/MessagesPresenterTest.kt diff --git a/features/messages/src/test/kotlin/io/element/android/features/messages/actionlist/ActionListPresenterTest.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/actionlist/ActionListPresenterTest.kt similarity index 100% rename from features/messages/src/test/kotlin/io/element/android/features/messages/actionlist/ActionListPresenterTest.kt rename to features/messages/impl/src/test/kotlin/io/element/android/features/messages/actionlist/ActionListPresenterTest.kt diff --git a/features/messages/src/test/kotlin/io/element/android/features/messages/fakes/FakeDaySeparatorFormatter.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/fakes/FakeDaySeparatorFormatter.kt similarity index 100% rename from features/messages/src/test/kotlin/io/element/android/features/messages/fakes/FakeDaySeparatorFormatter.kt rename to features/messages/impl/src/test/kotlin/io/element/android/features/messages/fakes/FakeDaySeparatorFormatter.kt diff --git a/features/messages/src/test/kotlin/io/element/android/features/messages/fixtures/aMessageEvent.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/fixtures/aMessageEvent.kt similarity index 100% rename from features/messages/src/test/kotlin/io/element/android/features/messages/fixtures/aMessageEvent.kt rename to features/messages/impl/src/test/kotlin/io/element/android/features/messages/fixtures/aMessageEvent.kt diff --git a/features/messages/src/test/kotlin/io/element/android/features/messages/fixtures/testCoroutineDispatchers.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/fixtures/testCoroutineDispatchers.kt similarity index 100% rename from features/messages/src/test/kotlin/io/element/android/features/messages/fixtures/testCoroutineDispatchers.kt rename to features/messages/impl/src/test/kotlin/io/element/android/features/messages/fixtures/testCoroutineDispatchers.kt diff --git a/features/messages/src/test/kotlin/io/element/android/features/messages/fixtures/timelineItemsFactory.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/fixtures/timelineItemsFactory.kt similarity index 100% rename from features/messages/src/test/kotlin/io/element/android/features/messages/fixtures/timelineItemsFactory.kt rename to features/messages/impl/src/test/kotlin/io/element/android/features/messages/fixtures/timelineItemsFactory.kt diff --git a/features/messages/src/test/kotlin/io/element/android/features/messages/textcomposer/MessageComposerPresenterTest.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/textcomposer/MessageComposerPresenterTest.kt similarity index 100% rename from features/messages/src/test/kotlin/io/element/android/features/messages/textcomposer/MessageComposerPresenterTest.kt rename to features/messages/impl/src/test/kotlin/io/element/android/features/messages/textcomposer/MessageComposerPresenterTest.kt diff --git a/features/messages/src/test/kotlin/io/element/android/features/messages/timeline/TimelinePresenterTest.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/timeline/TimelinePresenterTest.kt similarity index 100% rename from features/messages/src/test/kotlin/io/element/android/features/messages/timeline/TimelinePresenterTest.kt rename to features/messages/impl/src/test/kotlin/io/element/android/features/messages/timeline/TimelinePresenterTest.kt diff --git a/features/messages/src/main/AndroidManifest.xml b/features/messages/src/main/AndroidManifest.xml deleted file mode 100644 index 19db0c3d57..0000000000 --- a/features/messages/src/main/AndroidManifest.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/DefaultBugReporter.kt b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/DefaultBugReporter.kt index 97acad889b..7fd40fc786 100755 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/DefaultBugReporter.kt +++ b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/DefaultBugReporter.kt @@ -20,6 +20,7 @@ import android.content.Context import android.os.Build import androidx.core.net.toFile import androidx.core.net.toUri +import com.squareup.anvil.annotations.ContributesBinding import io.element.android.features.rageshake.R import io.element.android.features.rageshake.crash.CrashDataStore import io.element.android.features.rageshake.logs.VectorFileLogger @@ -29,6 +30,7 @@ import io.element.android.libraries.androidutils.file.safeDelete import io.element.android.libraries.core.coroutine.CoroutineDispatchers import io.element.android.libraries.core.extensions.toOnOff import io.element.android.libraries.core.mimetype.MimeTypes +import io.element.android.libraries.di.AppScope import io.element.android.libraries.di.ApplicationContext import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.first @@ -53,6 +55,7 @@ import javax.inject.Inject /** * BugReporter creates and sends the bug reports. */ +@ContributesBinding(AppScope::class) class DefaultBugReporter @Inject constructor( @ApplicationContext private val context: Context, private val screenshotHolder: ScreenshotHolder, diff --git a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/BackstackNode.kt b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/BackstackNode.kt index c59a4a4483..44aef63fda 100644 --- a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/BackstackNode.kt +++ b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/BackstackNode.kt @@ -17,7 +17,6 @@ package io.element.android.libraries.architecture import androidx.compose.runtime.Stable -import com.bumble.appyx.Appyx import com.bumble.appyx.core.children.ChildEntry import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.ParentNode @@ -28,7 +27,7 @@ import com.bumble.appyx.navmodel.backstack.BackStack abstract class BackstackNode( val backstack: BackStack, buildContext: BuildContext, - childKeepMode: ChildEntry.KeepMode = Appyx.defaultChildKeepMode, + childKeepMode: ChildEntry.KeepMode = ChildEntry.KeepMode.KEEP, plugins: List ) : ParentNode( navModel = backstack, diff --git a/plugins/src/main/kotlin/extension/DependencyHandleScope.kt b/plugins/src/main/kotlin/extension/DependencyHandleScope.kt index f751a73f27..eec0d97052 100644 --- a/plugins/src/main/kotlin/extension/DependencyHandleScope.kt +++ b/plugins/src/main/kotlin/extension/DependencyHandleScope.kt @@ -64,7 +64,7 @@ fun DependencyHandlerScope.allFeatures() { implementation(project(":features:login")) implementation(project(":features:logout")) implementation(project(":features:roomlist")) - implementation(project(":features:messages")) + implementation(project(":features:messages:impl")) implementation(project(":features:rageshake")) implementation(project(":features:preferences")) } diff --git a/settings.gradle.kts b/settings.gradle.kts index 01ee64a0f7..37f839c073 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -63,3 +63,5 @@ include(":libraries:matrixtest") include(":features:template") include(":libraries:androidutils") include(":samples:minimal") +include(":features:messages:api") +include(":features:messages:impl") From 2907189b61aef3ab6ba604a889eabd95f24d44ca Mon Sep 17 00:00:00 2001 From: ganfra Date: Fri, 3 Mar 2023 18:14:45 +0100 Subject: [PATCH 08/25] [Architecture] move back java file to the java directory --- .../features/rageshake/reporter/BugReporterMultipartBody.java | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename features/rageshake/src/main/{kotlin => java}/io/element/android/features/rageshake/reporter/BugReporterMultipartBody.java (100%) diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/BugReporterMultipartBody.java b/features/rageshake/src/main/java/io/element/android/features/rageshake/reporter/BugReporterMultipartBody.java similarity index 100% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/BugReporterMultipartBody.java rename to features/rageshake/src/main/java/io/element/android/features/rageshake/reporter/BugReporterMultipartBody.java From b9febcd8d74b0dce9206fec599c887374675fbc6 Mon Sep 17 00:00:00 2001 From: ganfra Date: Sat, 4 Mar 2023 14:14:47 +0100 Subject: [PATCH 09/25] [Architecture] experiments to remove DI graph managements from navigation flow nodes --- .../io/element/android/x/MainActivity.kt | 6 +- .../kotlin/io/element/android/x/MainNode.kt | 83 +++++++++++++++++++ .../io/element/android/x/di/AppBindings.kt | 1 + .../android/x/di/MainDaggerComponentOwner.kt | 43 ++++++++++ .../element/android/x/di/SessionComponent.kt | 2 +- .../android/x/node/LoggedInFlowNode.kt | 21 +++-- .../android/x/node/NodeLifecycleCallback.kt | 21 +++++ .../io/element/android/x/node/RoomFlowNode.kt | 25 +++--- .../io/element/android/x/node/RootFlowNode.kt | 14 ++-- settings.gradle.kts | 1 + 10 files changed, 184 insertions(+), 33 deletions(-) create mode 100644 app/src/main/kotlin/io/element/android/x/MainNode.kt create mode 100644 app/src/main/kotlin/io/element/android/x/di/MainDaggerComponentOwner.kt create mode 100644 app/src/main/kotlin/io/element/android/x/node/NodeLifecycleCallback.kt diff --git a/app/src/main/kotlin/io/element/android/x/MainActivity.kt b/app/src/main/kotlin/io/element/android/x/MainActivity.kt index f8ce334e14..fb682318bb 100644 --- a/app/src/main/kotlin/io/element/android/x/MainActivity.kt +++ b/app/src/main/kotlin/io/element/android/x/MainActivity.kt @@ -25,11 +25,9 @@ import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen import androidx.core.view.WindowCompat import com.bumble.appyx.core.integration.NodeHost import com.bumble.appyx.core.integrationpoint.NodeComponentActivity -import io.element.android.x.di.AppBindings import io.element.android.libraries.architecture.bindings -import io.element.android.libraries.architecture.createNode import io.element.android.libraries.designsystem.theme.ElementTheme -import io.element.android.x.node.RootFlowNode +import io.element.android.x.di.AppBindings class MainActivity : NodeComponentActivity() { @@ -45,7 +43,7 @@ class MainActivity : NodeComponentActivity() { modifier = Modifier.fillMaxSize(), ) { NodeHost(integrationPoint = appyxIntegrationPoint) { - createNode(it) + MainNode(it, appBindings.mainDaggerComponentOwner()) } } } diff --git a/app/src/main/kotlin/io/element/android/x/MainNode.kt b/app/src/main/kotlin/io/element/android/x/MainNode.kt new file mode 100644 index 0000000000..0c9428b183 --- /dev/null +++ b/app/src/main/kotlin/io/element/android/x/MainNode.kt @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.x + +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import com.bumble.appyx.core.composable.Children +import com.bumble.appyx.core.modality.BuildContext +import com.bumble.appyx.core.navigation.model.permanent.PermanentNavModel +import com.bumble.appyx.core.node.Node +import com.bumble.appyx.core.node.ParentNode +import io.element.android.libraries.architecture.bindings +import io.element.android.libraries.architecture.createNode +import io.element.android.libraries.di.DaggerComponentOwner +import io.element.android.libraries.matrix.MatrixClient +import io.element.android.libraries.matrix.room.MatrixRoom +import io.element.android.x.di.MainDaggerComponentOwner +import io.element.android.x.di.RoomComponent +import io.element.android.x.di.SessionComponent +import io.element.android.x.node.LoggedInFlowNode +import io.element.android.x.node.RoomFlowNode +import io.element.android.x.node.RootFlowNode + +class MainNode( + buildContext: BuildContext, + private val mainDaggerComponentOwner: MainDaggerComponentOwner, +) : + ParentNode( + navModel = PermanentNavModel( + navTargets = setOf(NavTarget), + savedStateMap = buildContext.savedStateMap, + ), + buildContext = buildContext, + ), + DaggerComponentOwner by mainDaggerComponentOwner { + + private val loggedInFlowNodeCallback = object : LoggedInFlowNode.LifecycleCallback { + override fun onFlowCreated(client: MatrixClient) { + val component = bindings().sessionComponentBuilder().client(client).build() + mainDaggerComponentOwner.addComponent(client.sessionId.value, component) + } + + override fun onFlowReleased(client: MatrixClient) { + mainDaggerComponentOwner.removeComponent(client.sessionId.value) + } + } + + private val roomFlowNodeCallback = object : RoomFlowNode.LifecycleCallback { + override fun onFlowCreated(room: MatrixRoom) { + val component = bindings().roomComponentBuilder().room(room).build() + mainDaggerComponentOwner.addComponent(room.roomId.value, component) + } + + override fun onFlowReleased(room: MatrixRoom) { + mainDaggerComponentOwner.removeComponent(room.roomId.value) + } + } + + override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node { + return createNode(buildContext, plugins = listOf(loggedInFlowNodeCallback, roomFlowNodeCallback)) + } + + @Composable + override fun View(modifier: Modifier) { + Children(navModel = navModel) + } + + object NavTarget +} diff --git a/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt b/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt index d60ff4a15b..4505b1663d 100644 --- a/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt +++ b/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt @@ -22,4 +22,5 @@ import io.element.android.libraries.di.AppScope @ContributesTo(AppScope::class) interface AppBindings { fun matrixClientsHolder(): MatrixClientsHolder + fun mainDaggerComponentOwner(): MainDaggerComponentOwner } diff --git a/app/src/main/kotlin/io/element/android/x/di/MainDaggerComponentOwner.kt b/app/src/main/kotlin/io/element/android/x/di/MainDaggerComponentOwner.kt new file mode 100644 index 0000000000..4a3017e984 --- /dev/null +++ b/app/src/main/kotlin/io/element/android/x/di/MainDaggerComponentOwner.kt @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.x.di + +import android.content.Context +import io.element.android.libraries.di.AppScope +import io.element.android.libraries.di.ApplicationContext +import io.element.android.libraries.di.DaggerComponentOwner +import io.element.android.libraries.di.SingleIn +import javax.inject.Inject + +@SingleIn(AppScope::class) +class MainDaggerComponentOwner @Inject constructor(@ApplicationContext context: Context) : DaggerComponentOwner { + + private val daggerComponents = LinkedHashMap().apply { + put("app", (context as DaggerComponentOwner).daggerComponent) + } + + fun addComponent(identifier: String, component: Any) { + daggerComponents[identifier] = component + } + + fun removeComponent(identifier: String) { + daggerComponents.remove(identifier) + } + + override val daggerComponent: Any + get() = daggerComponents.values.reversed() +} diff --git a/app/src/main/kotlin/io/element/android/x/di/SessionComponent.kt b/app/src/main/kotlin/io/element/android/x/di/SessionComponent.kt index 33969ddd96..075529e3e8 100644 --- a/app/src/main/kotlin/io/element/android/x/di/SessionComponent.kt +++ b/app/src/main/kotlin/io/element/android/x/di/SessionComponent.kt @@ -28,7 +28,7 @@ import io.element.android.libraries.matrix.MatrixClient @SingleIn(SessionScope::class) @MergeSubcomponent(SessionScope::class) -interface SessionComponent : NodeFactoriesBindings, RoomComponent.ParentBindings { +interface SessionComponent : NodeFactoriesBindings { @Subcomponent.Builder interface Builder { diff --git a/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt b/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt index e627f0d448..8313aa4e45 100644 --- a/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt +++ b/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt @@ -46,11 +46,9 @@ import io.element.android.libraries.architecture.nodeInputs import io.element.android.libraries.architecture.nodeInputsProvider import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.di.AppScope -import io.element.android.libraries.di.DaggerComponentOwner import io.element.android.libraries.matrix.MatrixClient import io.element.android.libraries.matrix.core.RoomId import io.element.android.libraries.matrix.ui.di.MatrixUIBindings -import io.element.android.x.di.SessionComponent import kotlinx.parcelize.Parcelize @ContributesNode(AppScope::class) @@ -66,10 +64,16 @@ class LoggedInFlowNode @AssistedInject constructor( ), buildContext = buildContext, plugins = plugins -), DaggerComponentOwner { +) { interface Callback : Plugin { - fun onOpenBugReport() + fun onOpenBugReport() = Unit + } + + interface LifecycleCallback : NodeLifecycleCallback { + fun onFlowCreated(client: MatrixClient) = Unit + + fun onFlowReleased(client: MatrixClient) = Unit } data class Inputs( @@ -78,19 +82,17 @@ class LoggedInFlowNode @AssistedInject constructor( private val inputs: Inputs by nodeInputs() - override val daggerComponent: Any by lazy { - parent!!.bindings().sessionComponentBuilder().client(inputs.matrixClient).build() - } - override fun onBuilt() { super.onBuilt() lifecycle.subscribe( onCreate = { + plugins().forEach { it.onFlowCreated(inputs.matrixClient) } val imageLoaderFactory = bindings().loggedInImageLoaderFactory() Coil.setImageLoader(imageLoaderFactory) inputs.matrixClient.startSync() }, onDestroy = { + plugins().forEach { it.onFlowReleased(inputs.matrixClient) } val imageLoaderFactory = bindings().notLoggedInImageLoaderFactory() Coil.setImageLoader(imageLoaderFactory) } @@ -132,8 +134,9 @@ class LoggedInFlowNode @AssistedInject constructor( } } } else { + val nodeLifecycleCallbacks = plugins() val inputsProvider = nodeInputsProvider(RoomFlowNode.Inputs(room)) - createNode(buildContext, plugins = listOf(inputsProvider)) + createNode(buildContext, plugins = listOf(inputsProvider) + nodeLifecycleCallbacks) } } NavTarget.Settings -> { diff --git a/app/src/main/kotlin/io/element/android/x/node/NodeLifecycleCallback.kt b/app/src/main/kotlin/io/element/android/x/node/NodeLifecycleCallback.kt new file mode 100644 index 0000000000..d63da9b0cb --- /dev/null +++ b/app/src/main/kotlin/io/element/android/x/node/NodeLifecycleCallback.kt @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.x.node + +import com.bumble.appyx.core.plugin.Plugin + +interface NodeLifecycleCallback : Plugin diff --git a/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt b/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt index 3671661b68..09125382c5 100644 --- a/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt +++ b/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt @@ -24,17 +24,15 @@ import com.bumble.appyx.core.lifecycle.subscribe import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.plugin.Plugin +import com.bumble.appyx.core.plugin.plugins import com.bumble.appyx.navmodel.backstack.BackStack import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode -import io.element.android.x.di.RoomComponent import io.element.android.features.messages.api.MessagesEntryPoint import io.element.android.libraries.architecture.BackstackNode import io.element.android.libraries.architecture.NodeInputs -import io.element.android.libraries.architecture.bindings import io.element.android.libraries.architecture.nodeInputs -import io.element.android.libraries.di.DaggerComponentOwner import io.element.android.libraries.di.SessionScope import io.element.android.libraries.matrix.room.MatrixRoom import kotlinx.parcelize.Parcelize @@ -52,7 +50,12 @@ class RoomFlowNode @AssistedInject constructor( ), buildContext = buildContext, plugins = plugins, -), DaggerComponentOwner { +) { + + interface LifecycleCallback : NodeLifecycleCallback { + fun onFlowCreated(room: MatrixRoom) = Unit + fun onFlowReleased(room: MatrixRoom) = Unit + } data class Inputs( val room: MatrixRoom, @@ -60,14 +63,16 @@ class RoomFlowNode @AssistedInject constructor( private val inputs: Inputs by nodeInputs() - override val daggerComponent: Any by lazy { - parent!!.bindings().roomComponentBuilder().room(inputs.room).build() - } - init { lifecycle.subscribe( - onCreate = { Timber.v("OnCreate") }, - onDestroy = { Timber.v("OnDestroy") } + onCreate = { + Timber.v("OnCreate") + plugins().forEach { it.onFlowCreated(inputs.room) } + }, + onDestroy = { + Timber.v("OnDestroy") + plugins().forEach { it.onFlowReleased(inputs.room) } + } ) } diff --git a/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt b/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt index a4ad92c80d..66f24be1fe 100644 --- a/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt +++ b/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt @@ -16,7 +16,6 @@ package io.element.android.x.node -import android.content.Context import android.os.Parcelable import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize @@ -29,6 +28,7 @@ import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.node.node import com.bumble.appyx.core.plugin.Plugin +import com.bumble.appyx.core.plugin.plugins import com.bumble.appyx.navmodel.backstack.BackStack import com.bumble.appyx.navmodel.backstack.operation.newRoot import com.bumble.appyx.navmodel.backstack.operation.pop @@ -36,7 +36,6 @@ import com.bumble.appyx.navmodel.backstack.operation.push import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode -import io.element.android.x.root.MatrixClientsHolder import io.element.android.features.rageshake.bugreport.BugReportEntryPoint import io.element.android.libraries.architecture.BackstackNode import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler @@ -44,10 +43,9 @@ import io.element.android.libraries.architecture.createNode import io.element.android.libraries.architecture.nodeInputsProvider import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator import io.element.android.libraries.di.AppScope -import io.element.android.libraries.di.ApplicationContext -import io.element.android.libraries.di.DaggerComponentOwner import io.element.android.libraries.matrix.auth.MatrixAuthenticationService import io.element.android.libraries.matrix.core.SessionId +import io.element.android.x.root.MatrixClientsHolder import io.element.android.x.root.RootPresenter import io.element.android.x.root.RootView import kotlinx.coroutines.flow.distinctUntilChanged @@ -60,7 +58,6 @@ import timber.log.Timber class RootFlowNode @AssistedInject constructor( @Assisted buildContext: BuildContext, @Assisted plugins: List, - @ApplicationContext context: Context, private val authenticationService: MatrixAuthenticationService, private val matrixClientsHolder: MatrixClientsHolder, private val presenter: RootPresenter, @@ -73,9 +70,7 @@ class RootFlowNode @AssistedInject constructor( ), buildContext = buildContext, plugins = plugins - ), - - DaggerComponentOwner by (context as DaggerComponentOwner) { + ) { override fun onBuilt() { super.onBuilt() @@ -178,7 +173,8 @@ class RootFlowNode @AssistedInject constructor( backstack.push(NavTarget.BugReport) } } - createNode(buildContext, plugins = listOf(inputsProvider, callback)) + val nodeLifecycleCallbacks = plugins() + createNode(buildContext, plugins = listOf(inputsProvider, callback) + nodeLifecycleCallbacks) } NavTarget.NotLoggedInFlow -> createNode(buildContext) NavTarget.SplashScreen -> splashNode(buildContext) diff --git a/settings.gradle.kts b/settings.gradle.kts index 37f839c073..85c58d03e7 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -65,3 +65,4 @@ include(":libraries:androidutils") include(":samples:minimal") include(":features:messages:api") include(":features:messages:impl") +include(":appnav") From 5b16f8c4b0ecd478f4e4669ba2330de54070cf04 Mon Sep 17 00:00:00 2001 From: ganfra Date: Mon, 6 Mar 2023 20:30:48 +0100 Subject: [PATCH 10/25] [Architecture] : create appnav module so we can use only api feature modules --- app/build.gradle.kts | 1 + .../kotlin/io/element/android/x/MainNode.kt | 21 ++++--- .../io/element/android/x/di/AppBindings.kt | 3 +- ...tOwner.kt => MainDaggerComponentsOwner.kt} | 2 +- .../android/x/root/MatrixClientsHolder.kt | 63 ------------------- appnav/build.gradle.kts | 62 ++++++++++++++++++ .../element/android/appnav}/BackstackExt.kt | 2 +- .../android/appnav}/LoggedInFlowNode.kt | 4 +- .../android/appnav}/MatrixClientsHolder.kt | 3 +- .../android/appnav}/NodeLifecycleCallback.kt | 2 +- .../android/appnav}/NotLoggedInFlowNode.kt | 2 +- .../element/android/appnav}/RoomFlowNode.kt | 2 +- .../element/android/appnav}/RootFlowNode.kt | 20 ++++-- .../android/appnav}/root/RootEvents.kt | 2 +- .../android/appnav}/root/RootPresenter.kt | 2 +- .../element/android/appnav}/root/RootState.kt | 3 +- .../android/appnav}/root/RootStateProvider.kt | 2 +- .../element/android/appnav}/root/RootView.kt | 10 +-- .../android/appnav/root}/ShowkaseButton.kt | 2 +- .../android/appnav}/FakeBugReporter.kt | 2 +- .../android/appnav}/FakeCrashDataStore.kt | 2 +- .../element/android/appnav}/FakeRageShake.kt | 2 +- .../android/appnav}/FakeRageshakeDataStore.kt | 2 +- .../android/appnav}/FakeScreenshotHolder.kt | 2 +- .../android/appnav}/RootPresenterTest.kt | 4 +- settings.gradle.kts | 2 +- 26 files changed, 119 insertions(+), 105 deletions(-) rename app/src/main/kotlin/io/element/android/x/di/{MainDaggerComponentOwner.kt => MainDaggerComponentsOwner.kt} (92%) delete mode 100644 app/src/main/kotlin/io/element/android/x/root/MatrixClientsHolder.kt create mode 100644 appnav/build.gradle.kts rename {app/src/main/kotlin/io/element/android/x/node => appnav/src/main/kotlin/io/element/android/appnav}/BackstackExt.kt (96%) rename {app/src/main/kotlin/io/element/android/x/node => appnav/src/main/kotlin/io/element/android/appnav}/LoggedInFlowNode.kt (99%) rename {app/src/main/kotlin/io/element/android/x/di => appnav/src/main/kotlin/io/element/android/appnav}/MatrixClientsHolder.kt (98%) rename {app/src/main/kotlin/io/element/android/x/node => appnav/src/main/kotlin/io/element/android/appnav}/NodeLifecycleCallback.kt (95%) rename {app/src/main/kotlin/io/element/android/x/node => appnav/src/main/kotlin/io/element/android/appnav}/NotLoggedInFlowNode.kt (99%) rename {app/src/main/kotlin/io/element/android/x/node => appnav/src/main/kotlin/io/element/android/appnav}/RoomFlowNode.kt (98%) rename {app/src/main/kotlin/io/element/android/x/node => appnav/src/main/kotlin/io/element/android/appnav}/RootFlowNode.kt (92%) rename {app/src/main/kotlin/io/element/android/x => appnav/src/main/kotlin/io/element/android/appnav}/root/RootEvents.kt (94%) rename {app/src/main/kotlin/io/element/android/x => appnav/src/main/kotlin/io/element/android/appnav}/root/RootPresenter.kt (98%) rename {app/src/main/kotlin/io/element/android/x => appnav/src/main/kotlin/io/element/android/appnav}/root/RootState.kt (92%) rename {app/src/main/kotlin/io/element/android/x => appnav/src/main/kotlin/io/element/android/appnav}/root/RootStateProvider.kt (97%) rename {app/src/main/kotlin/io/element/android/x => appnav/src/main/kotlin/io/element/android/appnav}/root/RootView.kt (90%) rename {app/src/main/kotlin/io/element/android/x/component => appnav/src/main/kotlin/io/element/android/appnav/root}/ShowkaseButton.kt (98%) rename {app/src/test/kotlin/io/element/android/x/root => appnav/src/test/kotlin/io/element/android/appnav}/FakeBugReporter.kt (98%) rename {app/src/test/kotlin/io/element/android/x/root => appnav/src/test/kotlin/io/element/android/appnav}/FakeCrashDataStore.kt (97%) rename {app/src/test/kotlin/io/element/android/x/root => appnav/src/test/kotlin/io/element/android/appnav}/FakeRageShake.kt (97%) rename {app/src/test/kotlin/io/element/android/x/root => appnav/src/test/kotlin/io/element/android/appnav}/FakeRageshakeDataStore.kt (97%) rename {app/src/test/kotlin/io/element/android/x/root => appnav/src/test/kotlin/io/element/android/appnav}/FakeScreenshotHolder.kt (96%) rename {app/src/test/kotlin/io/element/android/x/root => appnav/src/test/kotlin/io/element/android/appnav}/RootPresenterTest.kt (95%) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 524af1b314..d0716a23d7 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -200,6 +200,7 @@ dependencies { allFeatures() implementation(projects.tests.uitests) implementation(projects.anvilannotations) + implementation(projects.appnav) anvil(projects.anvilcodegen) // https://developer.android.com/studio/write/java8-support#library-desugaring-versions diff --git a/app/src/main/kotlin/io/element/android/x/MainNode.kt b/app/src/main/kotlin/io/element/android/x/MainNode.kt index 0c9428b183..23c0c05c37 100644 --- a/app/src/main/kotlin/io/element/android/x/MainNode.kt +++ b/app/src/main/kotlin/io/element/android/x/MainNode.kt @@ -16,6 +16,7 @@ package io.element.android.x +import android.os.Parcelable import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import com.bumble.appyx.core.composable.Children @@ -23,25 +24,26 @@ import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.navigation.model.permanent.PermanentNavModel import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.node.ParentNode +import io.element.android.appnav.LoggedInFlowNode +import io.element.android.appnav.RoomFlowNode +import io.element.android.appnav.RootFlowNode import io.element.android.libraries.architecture.bindings import io.element.android.libraries.architecture.createNode import io.element.android.libraries.di.DaggerComponentOwner import io.element.android.libraries.matrix.MatrixClient import io.element.android.libraries.matrix.room.MatrixRoom -import io.element.android.x.di.MainDaggerComponentOwner +import io.element.android.x.di.MainDaggerComponentsOwner import io.element.android.x.di.RoomComponent import io.element.android.x.di.SessionComponent -import io.element.android.x.node.LoggedInFlowNode -import io.element.android.x.node.RoomFlowNode -import io.element.android.x.node.RootFlowNode +import kotlinx.parcelize.Parcelize class MainNode( buildContext: BuildContext, - private val mainDaggerComponentOwner: MainDaggerComponentOwner, + private val mainDaggerComponentOwner: MainDaggerComponentsOwner, ) : - ParentNode( + ParentNode( navModel = PermanentNavModel( - navTargets = setOf(NavTarget), + navTargets = setOf(RootNavTarget), savedStateMap = buildContext.savedStateMap, ), buildContext = buildContext, @@ -70,7 +72,7 @@ class MainNode( } } - override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node { + override fun resolve(navTarget: RootNavTarget, buildContext: BuildContext): Node { return createNode(buildContext, plugins = listOf(loggedInFlowNodeCallback, roomFlowNodeCallback)) } @@ -79,5 +81,6 @@ class MainNode( Children(navModel = navModel) } - object NavTarget + @Parcelize + object RootNavTarget : Parcelable } diff --git a/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt b/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt index 4505b1663d..1bdab0a6ac 100644 --- a/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt +++ b/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt @@ -17,10 +17,11 @@ package io.element.android.x.di import com.squareup.anvil.annotations.ContributesTo +import io.element.android.appnav.MatrixClientsHolder import io.element.android.libraries.di.AppScope @ContributesTo(AppScope::class) interface AppBindings { fun matrixClientsHolder(): MatrixClientsHolder - fun mainDaggerComponentOwner(): MainDaggerComponentOwner + fun mainDaggerComponentOwner(): MainDaggerComponentsOwner } diff --git a/app/src/main/kotlin/io/element/android/x/di/MainDaggerComponentOwner.kt b/app/src/main/kotlin/io/element/android/x/di/MainDaggerComponentsOwner.kt similarity index 92% rename from app/src/main/kotlin/io/element/android/x/di/MainDaggerComponentOwner.kt rename to app/src/main/kotlin/io/element/android/x/di/MainDaggerComponentsOwner.kt index 4a3017e984..5489b07830 100644 --- a/app/src/main/kotlin/io/element/android/x/di/MainDaggerComponentOwner.kt +++ b/app/src/main/kotlin/io/element/android/x/di/MainDaggerComponentsOwner.kt @@ -24,7 +24,7 @@ import io.element.android.libraries.di.SingleIn import javax.inject.Inject @SingleIn(AppScope::class) -class MainDaggerComponentOwner @Inject constructor(@ApplicationContext context: Context) : DaggerComponentOwner { +class MainDaggerComponentsOwner @Inject constructor(@ApplicationContext context: Context) : DaggerComponentOwner { private val daggerComponents = LinkedHashMap().apply { put("app", (context as DaggerComponentOwner).daggerComponent) diff --git a/app/src/main/kotlin/io/element/android/x/root/MatrixClientsHolder.kt b/app/src/main/kotlin/io/element/android/x/root/MatrixClientsHolder.kt deleted file mode 100644 index d4cb6b6552..0000000000 --- a/app/src/main/kotlin/io/element/android/x/root/MatrixClientsHolder.kt +++ /dev/null @@ -1,63 +0,0 @@ -package io.element.android.x.root - -import android.os.Bundle -import io.element.android.libraries.di.AppScope -import io.element.android.libraries.di.SingleIn -import io.element.android.libraries.matrix.MatrixClient -import io.element.android.libraries.matrix.auth.MatrixAuthenticationService -import io.element.android.libraries.matrix.core.SessionId -import kotlinx.coroutines.runBlocking -import timber.log.Timber -import java.util.concurrent.ConcurrentHashMap -import javax.inject.Inject - -private const val SAVE_INSTANCE_KEY = "io.element.android.x.di.MatrixClientsHolder.SaveInstanceKey" - -@SingleIn(AppScope::class) -class MatrixClientsHolder @Inject constructor(private val authenticationService: MatrixAuthenticationService) { - - private val sessionIdsToMatrixClient = ConcurrentHashMap() - - fun add(matrixClient: MatrixClient) { - sessionIdsToMatrixClient[matrixClient.sessionId] = matrixClient - } - - fun removeAll() { - sessionIdsToMatrixClient.clear() - } - - fun remove(sessionId: SessionId) { - sessionIdsToMatrixClient.remove(sessionId) - } - - fun isEmpty(): Boolean = sessionIdsToMatrixClient.isEmpty() - - fun knowSession(sessionId: SessionId): Boolean = sessionIdsToMatrixClient.containsKey(sessionId) - - fun getOrNull(sessionId: SessionId): MatrixClient? { - return sessionIdsToMatrixClient[sessionId] - } - - @Suppress("DEPRECATION") - fun restore(savedInstanceState: Bundle?) { - if (savedInstanceState == null || sessionIdsToMatrixClient.isNotEmpty()) return - val sessionIds = savedInstanceState.getSerializable(SAVE_INSTANCE_KEY) as? Array - if (sessionIds.isNullOrEmpty()) return - // Not ideal but should only happens in case of process recreation. This ensure we restore all the active sessions before restoring the node graphs. - runBlocking { - sessionIds.forEach { sessionId -> - Timber.v("Restore matrix session: $sessionId") - val matrixClient = authenticationService.restoreSession(sessionId) - if (matrixClient != null) { - add(matrixClient) - } - } - } - } - - fun onSaveInstanceState(outState: Bundle) { - val sessionKeys = sessionIdsToMatrixClient.keys.toTypedArray() - Timber.v("Save matrix session keys = $sessionKeys") - outState.putSerializable(SAVE_INSTANCE_KEY, sessionKeys) - } -} diff --git a/appnav/build.gradle.kts b/appnav/build.gradle.kts new file mode 100644 index 0000000000..cb8d2d3595 --- /dev/null +++ b/appnav/build.gradle.kts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2022 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@file:Suppress("UnstableApiUsage") + +// TODO: Remove once https://youtrack.jetbrains.com/issue/KTIJ-19369 is fixed +@Suppress("DSL_SCOPE_VIOLATION") +plugins { + id("io.element.android-compose-library") + alias(libs.plugins.anvil) + alias(libs.plugins.ksp) + alias(libs.plugins.kapt) + id("kotlin-parcelize") +} + +android { + namespace = "io.element.android.appnav" + +} + +dependencies { + implementation(projects.anvilannotations) + anvil(projects.anvilcodegen) + implementation(libs.dagger) + kapt(libs.dagger.compiler) + + implementation(projects.features.messages.api) + implementation(projects.features.roomlist) + implementation(projects.features.rageshake) + implementation(projects.features.login) + implementation(projects.features.preferences) + implementation(projects.features.logout) + implementation(projects.features.onboarding) + + implementation(projects.libraries.core) + implementation(projects.libraries.architecture) + implementation(projects.libraries.matrix) + implementation(projects.libraries.designsystem) + implementation(projects.libraries.matrixui) + implementation(projects.tests.uitests) + implementation(libs.coil) + + testImplementation(libs.test.junit) + testImplementation(libs.coroutines.test) + testImplementation(libs.molecule.runtime) + testImplementation(libs.test.truth) + testImplementation(libs.test.turbine) + testImplementation(projects.libraries.matrixtest) +} diff --git a/app/src/main/kotlin/io/element/android/x/node/BackstackExt.kt b/appnav/src/main/kotlin/io/element/android/appnav/BackstackExt.kt similarity index 96% rename from app/src/main/kotlin/io/element/android/x/node/BackstackExt.kt rename to appnav/src/main/kotlin/io/element/android/appnav/BackstackExt.kt index 0476e50553..a8a4d3f64c 100644 --- a/app/src/main/kotlin/io/element/android/x/node/BackstackExt.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/BackstackExt.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.x.node +package io.element.android.appnav import com.bumble.appyx.navmodel.backstack.BackStack import com.bumble.appyx.navmodel.backstack.operation.NewRoot diff --git a/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt b/appnav/src/main/kotlin/io/element/android/appnav/LoggedInFlowNode.kt similarity index 99% rename from app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt rename to appnav/src/main/kotlin/io/element/android/appnav/LoggedInFlowNode.kt index 8313aa4e45..ce70f4ba03 100644 --- a/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/LoggedInFlowNode.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.x.node +package io.element.android.appnav import android.os.Parcelable import androidx.compose.foundation.layout.Box @@ -92,9 +92,9 @@ class LoggedInFlowNode @AssistedInject constructor( inputs.matrixClient.startSync() }, onDestroy = { - plugins().forEach { it.onFlowReleased(inputs.matrixClient) } val imageLoaderFactory = bindings().notLoggedInImageLoaderFactory() Coil.setImageLoader(imageLoaderFactory) + plugins().forEach { it.onFlowReleased(inputs.matrixClient) } } ) } diff --git a/app/src/main/kotlin/io/element/android/x/di/MatrixClientsHolder.kt b/appnav/src/main/kotlin/io/element/android/appnav/MatrixClientsHolder.kt similarity index 98% rename from app/src/main/kotlin/io/element/android/x/di/MatrixClientsHolder.kt rename to appnav/src/main/kotlin/io/element/android/appnav/MatrixClientsHolder.kt index 62f3a975c9..a0f2d38d52 100644 --- a/app/src/main/kotlin/io/element/android/x/di/MatrixClientsHolder.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/MatrixClientsHolder.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.x.di +package io.element.android.appnav import android.os.Bundle import io.element.android.libraries.di.AppScope @@ -28,6 +28,7 @@ import java.util.concurrent.ConcurrentHashMap import javax.inject.Inject private const val SAVE_INSTANCE_KEY = "io.element.android.x.di.MatrixClientsHolder.SaveInstanceKey" + @SingleIn(AppScope::class) class MatrixClientsHolder @Inject constructor(private val authenticationService: MatrixAuthenticationService) { diff --git a/app/src/main/kotlin/io/element/android/x/node/NodeLifecycleCallback.kt b/appnav/src/main/kotlin/io/element/android/appnav/NodeLifecycleCallback.kt similarity index 95% rename from app/src/main/kotlin/io/element/android/x/node/NodeLifecycleCallback.kt rename to appnav/src/main/kotlin/io/element/android/appnav/NodeLifecycleCallback.kt index d63da9b0cb..a06564c3aa 100644 --- a/app/src/main/kotlin/io/element/android/x/node/NodeLifecycleCallback.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/NodeLifecycleCallback.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.x.node +package io.element.android.appnav import com.bumble.appyx.core.plugin.Plugin diff --git a/app/src/main/kotlin/io/element/android/x/node/NotLoggedInFlowNode.kt b/appnav/src/main/kotlin/io/element/android/appnav/NotLoggedInFlowNode.kt similarity index 99% rename from app/src/main/kotlin/io/element/android/x/node/NotLoggedInFlowNode.kt rename to appnav/src/main/kotlin/io/element/android/appnav/NotLoggedInFlowNode.kt index 4b4c4be66c..e3f135372c 100644 --- a/app/src/main/kotlin/io/element/android/x/node/NotLoggedInFlowNode.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/NotLoggedInFlowNode.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.x.node +package io.element.android.appnav import android.os.Parcelable import androidx.compose.runtime.Composable diff --git a/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt b/appnav/src/main/kotlin/io/element/android/appnav/RoomFlowNode.kt similarity index 98% rename from app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt rename to appnav/src/main/kotlin/io/element/android/appnav/RoomFlowNode.kt index 09125382c5..0ef806208c 100644 --- a/app/src/main/kotlin/io/element/android/x/node/RoomFlowNode.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/RoomFlowNode.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.x.node +package io.element.android.appnav import android.os.Parcelable import androidx.compose.runtime.Composable diff --git a/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt b/appnav/src/main/kotlin/io/element/android/appnav/RootFlowNode.kt similarity index 92% rename from app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt rename to appnav/src/main/kotlin/io/element/android/appnav/RootFlowNode.kt index 66f24be1fe..817e119035 100644 --- a/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/RootFlowNode.kt @@ -14,14 +14,17 @@ * limitations under the License. */ -package io.element.android.x.node +package io.element.android.appnav +import android.app.Activity +import android.content.Context import android.os.Parcelable import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalContext import androidx.lifecycle.lifecycleScope import com.bumble.appyx.core.composable.Children import com.bumble.appyx.core.modality.BuildContext @@ -36,6 +39,8 @@ import com.bumble.appyx.navmodel.backstack.operation.push import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode +import io.element.android.appnav.root.RootPresenter +import io.element.android.appnav.root.RootView import io.element.android.features.rageshake.bugreport.BugReportEntryPoint import io.element.android.libraries.architecture.BackstackNode import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler @@ -43,11 +48,10 @@ import io.element.android.libraries.architecture.createNode import io.element.android.libraries.architecture.nodeInputsProvider import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator import io.element.android.libraries.di.AppScope +import io.element.android.libraries.di.ApplicationContext import io.element.android.libraries.matrix.auth.MatrixAuthenticationService import io.element.android.libraries.matrix.core.SessionId -import io.element.android.x.root.MatrixClientsHolder -import io.element.android.x.root.RootPresenter -import io.element.android.x.root.RootView +import io.element.android.tests.uitests.openShowkase import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach @@ -56,8 +60,9 @@ import timber.log.Timber @ContributesNode(AppScope::class) class RootFlowNode @AssistedInject constructor( - @Assisted buildContext: BuildContext, + @Assisted val buildContext: BuildContext, @Assisted plugins: List, + @ApplicationContext private val appContext: Context, private val authenticationService: MatrixAuthenticationService, private val matrixClientsHolder: MatrixClientsHolder, private val presenter: RootPresenter, @@ -132,11 +137,16 @@ class RootFlowNode @AssistedInject constructor( @Composable override fun View(modifier: Modifier) { + val activity = LocalContext.current as Activity + fun openShowkase() { + openShowkase(activity) + } val state = presenter.present() RootView( state = state, modifier = modifier, onOpenBugReport = this::onOpenBugReport, + onOpenShowkase = ::openShowkase ) { Children( navModel = backstack, diff --git a/app/src/main/kotlin/io/element/android/x/root/RootEvents.kt b/appnav/src/main/kotlin/io/element/android/appnav/root/RootEvents.kt similarity index 94% rename from app/src/main/kotlin/io/element/android/x/root/RootEvents.kt rename to appnav/src/main/kotlin/io/element/android/appnav/root/RootEvents.kt index a37e9c3c5b..f6e4103017 100644 --- a/app/src/main/kotlin/io/element/android/x/root/RootEvents.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/root/RootEvents.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.x.root +package io.element.android.appnav.root sealed interface RootEvents { object HideShowkaseButton : RootEvents diff --git a/app/src/main/kotlin/io/element/android/x/root/RootPresenter.kt b/appnav/src/main/kotlin/io/element/android/appnav/root/RootPresenter.kt similarity index 98% rename from app/src/main/kotlin/io/element/android/x/root/RootPresenter.kt rename to appnav/src/main/kotlin/io/element/android/appnav/root/RootPresenter.kt index 05457e463e..5797eca221 100644 --- a/app/src/main/kotlin/io/element/android/x/root/RootPresenter.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/root/RootPresenter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.x.root +package io.element.android.appnav.root import androidx.compose.runtime.Composable import androidx.compose.runtime.mutableStateOf diff --git a/app/src/main/kotlin/io/element/android/x/root/RootState.kt b/appnav/src/main/kotlin/io/element/android/appnav/root/RootState.kt similarity index 92% rename from app/src/main/kotlin/io/element/android/x/root/RootState.kt rename to appnav/src/main/kotlin/io/element/android/appnav/root/RootState.kt index 4f6b4c2062..e96229d675 100644 --- a/app/src/main/kotlin/io/element/android/x/root/RootState.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/root/RootState.kt @@ -14,9 +14,10 @@ * limitations under the License. */ -package io.element.android.x.root +package io.element.android.appnav.root import androidx.compose.runtime.Stable +import io.element.android.appnav.root.RootEvents import io.element.android.features.rageshake.crash.ui.CrashDetectionState import io.element.android.features.rageshake.detection.RageshakeDetectionState diff --git a/app/src/main/kotlin/io/element/android/x/root/RootStateProvider.kt b/appnav/src/main/kotlin/io/element/android/appnav/root/RootStateProvider.kt similarity index 97% rename from app/src/main/kotlin/io/element/android/x/root/RootStateProvider.kt rename to appnav/src/main/kotlin/io/element/android/appnav/root/RootStateProvider.kt index 692f5a88f0..ac8142fb9c 100644 --- a/app/src/main/kotlin/io/element/android/x/root/RootStateProvider.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/root/RootStateProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.x.root +package io.element.android.appnav.root import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.features.rageshake.crash.ui.aCrashDetectionState diff --git a/app/src/main/kotlin/io/element/android/x/root/RootView.kt b/appnav/src/main/kotlin/io/element/android/appnav/root/RootView.kt similarity index 90% rename from app/src/main/kotlin/io/element/android/x/root/RootView.kt rename to appnav/src/main/kotlin/io/element/android/appnav/root/RootView.kt index b46188fbf7..b93a925b12 100644 --- a/app/src/main/kotlin/io/element/android/x/root/RootView.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/root/RootView.kt @@ -14,16 +14,14 @@ * limitations under the License. */ -package io.element.android.x.root +package io.element.android.appnav.root -import android.app.Activity import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.BoxScope import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import io.element.android.features.rageshake.crash.ui.CrashDetectionEvents @@ -33,14 +31,13 @@ import io.element.android.features.rageshake.detection.RageshakeDetectionView import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.theme.components.Text -import io.element.android.tests.uitests.openShowkase -import io.element.android.x.component.ShowkaseButton @Composable fun RootView( state: RootState, modifier: Modifier = Modifier, onOpenBugReport: () -> Unit = {}, + onOpenShowkase: () -> Unit = {}, children: @Composable BoxScope.() -> Unit, ) { Box( @@ -50,7 +47,6 @@ fun RootView( ) { children() val eventSink = state.eventSink - val context = LocalContext.current fun onOpenBugReport() { state.crashDetectionState.eventSink(CrashDetectionEvents.ResetAppHasCrashed) @@ -61,7 +57,7 @@ fun RootView( ShowkaseButton( isVisible = state.isShowkaseButtonVisible, onCloseClicked = { eventSink(RootEvents.HideShowkaseButton) }, - onClick = { openShowkase(context as Activity) } + onClick = onOpenShowkase ) RageshakeDetectionView( state = state.rageshakeDetectionState, diff --git a/app/src/main/kotlin/io/element/android/x/component/ShowkaseButton.kt b/appnav/src/main/kotlin/io/element/android/appnav/root/ShowkaseButton.kt similarity index 98% rename from app/src/main/kotlin/io/element/android/x/component/ShowkaseButton.kt rename to appnav/src/main/kotlin/io/element/android/appnav/root/ShowkaseButton.kt index 42b9703c2b..23dbbd4397 100644 --- a/app/src/main/kotlin/io/element/android/x/component/ShowkaseButton.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/root/ShowkaseButton.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.x.component +package io.element.android.appnav.root import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size diff --git a/app/src/test/kotlin/io/element/android/x/root/FakeBugReporter.kt b/appnav/src/test/kotlin/io/element/android/appnav/FakeBugReporter.kt similarity index 98% rename from app/src/test/kotlin/io/element/android/x/root/FakeBugReporter.kt rename to appnav/src/test/kotlin/io/element/android/appnav/FakeBugReporter.kt index c6f7000cdf..3f17841274 100644 --- a/app/src/test/kotlin/io/element/android/x/root/FakeBugReporter.kt +++ b/appnav/src/test/kotlin/io/element/android/appnav/FakeBugReporter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.x.root +package io.element.android.appnav import io.element.android.features.rageshake.reporter.BugReporter import io.element.android.features.rageshake.reporter.BugReporterListener diff --git a/app/src/test/kotlin/io/element/android/x/root/FakeCrashDataStore.kt b/appnav/src/test/kotlin/io/element/android/appnav/FakeCrashDataStore.kt similarity index 97% rename from app/src/test/kotlin/io/element/android/x/root/FakeCrashDataStore.kt rename to appnav/src/test/kotlin/io/element/android/appnav/FakeCrashDataStore.kt index e6ede5ecc0..65d9e39a39 100644 --- a/app/src/test/kotlin/io/element/android/x/root/FakeCrashDataStore.kt +++ b/appnav/src/test/kotlin/io/element/android/appnav/FakeCrashDataStore.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.x.root +package io.element.android.appnav import io.element.android.features.rageshake.crash.CrashDataStore import kotlinx.coroutines.flow.Flow diff --git a/app/src/test/kotlin/io/element/android/x/root/FakeRageShake.kt b/appnav/src/test/kotlin/io/element/android/appnav/FakeRageShake.kt similarity index 97% rename from app/src/test/kotlin/io/element/android/x/root/FakeRageShake.kt rename to appnav/src/test/kotlin/io/element/android/appnav/FakeRageShake.kt index 9a260d9859..949b9f0b7b 100644 --- a/app/src/test/kotlin/io/element/android/x/root/FakeRageShake.kt +++ b/appnav/src/test/kotlin/io/element/android/appnav/FakeRageShake.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.x.root +package io.element.android.appnav import io.element.android.features.rageshake.rageshake.RageShake diff --git a/app/src/test/kotlin/io/element/android/x/root/FakeRageshakeDataStore.kt b/appnav/src/test/kotlin/io/element/android/appnav/FakeRageshakeDataStore.kt similarity index 97% rename from app/src/test/kotlin/io/element/android/x/root/FakeRageshakeDataStore.kt rename to appnav/src/test/kotlin/io/element/android/appnav/FakeRageshakeDataStore.kt index e8521fb74f..5dac61db66 100644 --- a/app/src/test/kotlin/io/element/android/x/root/FakeRageshakeDataStore.kt +++ b/appnav/src/test/kotlin/io/element/android/appnav/FakeRageshakeDataStore.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.x.root +package io.element.android.appnav import io.element.android.features.rageshake.rageshake.RageshakeDataStore import kotlinx.coroutines.flow.Flow diff --git a/app/src/test/kotlin/io/element/android/x/root/FakeScreenshotHolder.kt b/appnav/src/test/kotlin/io/element/android/appnav/FakeScreenshotHolder.kt similarity index 96% rename from app/src/test/kotlin/io/element/android/x/root/FakeScreenshotHolder.kt rename to appnav/src/test/kotlin/io/element/android/appnav/FakeScreenshotHolder.kt index 3a44ece6a2..a13acf1f1f 100644 --- a/app/src/test/kotlin/io/element/android/x/root/FakeScreenshotHolder.kt +++ b/appnav/src/test/kotlin/io/element/android/appnav/FakeScreenshotHolder.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.x.root +package io.element.android.appnav import android.graphics.Bitmap import io.element.android.features.rageshake.screenshot.ScreenshotHolder diff --git a/app/src/test/kotlin/io/element/android/x/root/RootPresenterTest.kt b/appnav/src/test/kotlin/io/element/android/appnav/RootPresenterTest.kt similarity index 95% rename from app/src/test/kotlin/io/element/android/x/root/RootPresenterTest.kt rename to appnav/src/test/kotlin/io/element/android/appnav/RootPresenterTest.kt index 0e3c6ce866..d912f5dffd 100644 --- a/app/src/test/kotlin/io/element/android/x/root/RootPresenterTest.kt +++ b/appnav/src/test/kotlin/io/element/android/appnav/RootPresenterTest.kt @@ -16,12 +16,14 @@ @file:OptIn(ExperimentalCoroutinesApi::class) -package io.element.android.x.root +package io.element.android.appnav import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat +import io.element.android.appnav.root.RootEvents +import io.element.android.appnav.root.RootPresenter import io.element.android.features.rageshake.crash.ui.CrashDetectionPresenter import io.element.android.features.rageshake.detection.RageshakeDetectionPresenter import io.element.android.features.rageshake.preferences.RageshakePreferencesPresenter diff --git a/settings.gradle.kts b/settings.gradle.kts index 85c58d03e7..8bf0c97b02 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -37,6 +37,7 @@ enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") rootProject.name = "ElementX" include(":app") +include(":appnav") include(":libraries:core") include(":libraries:rustsdk") include(":libraries:matrix") @@ -65,4 +66,3 @@ include(":libraries:androidutils") include(":samples:minimal") include(":features:messages:api") include(":features:messages:impl") -include(":appnav") From 4cff1994468a3eeecb01a85b67a58c595d770a07 Mon Sep 17 00:00:00 2001 From: ganfra Date: Tue, 7 Mar 2023 12:14:15 +0100 Subject: [PATCH 11/25] Fix warning --- app/src/main/kotlin/io/element/android/x/di/AppModule.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/io/element/android/x/di/AppModule.kt b/app/src/main/kotlin/io/element/android/x/di/AppModule.kt index 5c70cca16b..b83a98f7f3 100644 --- a/app/src/main/kotlin/io/element/android/x/di/AppModule.kt +++ b/app/src/main/kotlin/io/element/android/x/di/AppModule.kt @@ -24,7 +24,12 @@ import io.element.android.libraries.core.coroutine.CoroutineDispatchers import io.element.android.libraries.di.AppScope import io.element.android.libraries.di.ApplicationContext import io.element.android.libraries.di.SingleIn -import kotlinx.coroutines.* +import kotlinx.coroutines.CoroutineName +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.MainScope +import kotlinx.coroutines.asCoroutineDispatcher +import kotlinx.coroutines.plus import java.io.File import java.util.concurrent.Executors @@ -53,5 +58,4 @@ object AppModule { diffUpdateDispatcher = Executors.newSingleThreadExecutor().asCoroutineDispatcher() ) } - } From b2c68d555a828050e778ca5ffaadc2cfce9f208e Mon Sep 17 00:00:00 2001 From: ganfra Date: Tue, 7 Mar 2023 20:31:16 +0100 Subject: [PATCH 12/25] [Architecture] introduce nodeBuilder concept --- .../io/element/android/x/di/AppBindings.kt | 2 +- .../android/appnav/LoggedInFlowNode.kt | 18 +++++++++++------- .../android/appnav/NotLoggedInFlowNode.kt | 7 +++++-- .../io/element/android/appnav/RoomFlowNode.kt | 6 +++--- .../io/element/android/appnav/RootFlowNode.kt | 11 +++++++---- .../appnav/{ => di}/MatrixClientsHolder.kt | 2 +- .../features/login/api/LoginEntryPoint.kt | 4 ++-- .../login/impl/DefaultLoginEntryPoint.kt | 5 ++--- .../features/login/impl/LoginFlowNode.kt | 1 - .../messages/api/MessagesEntryPoint.kt | 4 ++-- .../impl/DefaultMessagesEntryPoint.kt | 5 ++--- .../onboarding/api/OnBoardingEntryPoint.kt | 10 ++++++++++ .../impl/DefaultOnBoardingEntryPoint.kt | 16 ++++++++++++++-- .../preferences/api/PreferencesEntryPoint.kt | 12 +++++++++++- .../impl/DefaultPreferencesEntryPoint.kt | 14 ++++++++++++-- .../bugreport/BugReportEntryPoint.kt | 10 ++++++++++ .../bugreport/DefaultBugReportEntryPoint.kt | 16 ++++++++++++++-- .../roomlist/api/RoomListEntryPoint.kt | 10 ++++++++++ .../impl/DefaultRoomListEntryPoint.kt | 19 +++++++++++++++++-- .../roomlist/impl/RoomListPresenter.kt | 2 ++ .../features/roomlist/impl/RoomListState.kt | 1 + .../roomlist/impl/RoomListStateProvider.kt | 2 ++ .../features/roomlist/impl/RoomListView.kt | 1 + .../impl/components/RoomSummaryRow.kt | 4 ++-- .../impl/{ => model}/RoomListRoomSummary.kt | 2 +- .../RoomListRoomSummaryPlaceholders.kt | 2 +- .../RoomListRoomSummaryProvider.kt | 2 +- .../roomlist/RoomListPresenterTests.kt | 2 +- .../architecture/FeatureEntryPoint.kt | 7 ++++--- .../libraries/architecture/NodeInputs.kt | 15 +++------------ 30 files changed, 153 insertions(+), 59 deletions(-) rename appnav/src/main/kotlin/io/element/android/appnav/{ => di}/MatrixClientsHolder.kt (98%) rename features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/{ => model}/RoomListRoomSummary.kt (95%) rename features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/{ => model}/RoomListRoomSummaryPlaceholders.kt (95%) rename features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/{ => model}/RoomListRoomSummaryProvider.kt (96%) diff --git a/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt b/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt index 1bdab0a6ac..9d5fa9446f 100644 --- a/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt +++ b/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt @@ -17,7 +17,7 @@ package io.element.android.x.di import com.squareup.anvil.annotations.ContributesTo -import io.element.android.appnav.MatrixClientsHolder +import io.element.android.appnav.di.MatrixClientsHolder import io.element.android.libraries.di.AppScope @ContributesTo(AppScope::class) diff --git a/appnav/src/main/kotlin/io/element/android/appnav/LoggedInFlowNode.kt b/appnav/src/main/kotlin/io/element/android/appnav/LoggedInFlowNode.kt index d072870de3..a45eb5bb80 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/LoggedInFlowNode.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/LoggedInFlowNode.kt @@ -42,8 +42,7 @@ import io.element.android.libraries.architecture.NodeInputs import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler import io.element.android.libraries.architecture.bindings import io.element.android.libraries.architecture.createNode -import io.element.android.libraries.architecture.nodeInputs -import io.element.android.libraries.architecture.nodeInputsProvider +import io.element.android.libraries.architecture.inputs import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.di.AppScope import io.element.android.libraries.matrix.api.MatrixClient @@ -80,7 +79,7 @@ class LoggedInFlowNode @AssistedInject constructor( val matrixClient: MatrixClient ) : NodeInputs - private val inputs: Inputs by nodeInputs() + private val inputs: Inputs = inputs() override fun onBuilt() { super.onBuilt() @@ -122,7 +121,10 @@ class LoggedInFlowNode @AssistedInject constructor( backstack.push(NavTarget.Settings) } } - roomListEntryPoint.node(this, buildContext, plugins = listOf(callback)) + roomListEntryPoint + .nodeBuilder(this, buildContext) + .callback(callback) + .build() } is NavTarget.Room -> { val room = inputs.matrixClient.getRoom(roomId = navTarget.roomId) @@ -135,8 +137,8 @@ class LoggedInFlowNode @AssistedInject constructor( } } else { val nodeLifecycleCallbacks = plugins() - val inputsProvider = nodeInputsProvider(RoomFlowNode.Inputs(room)) - createNode(buildContext, plugins = listOf(inputsProvider) + nodeLifecycleCallbacks) + val inputs = RoomFlowNode.Inputs(room) + createNode(buildContext, plugins = listOf(inputs) + nodeLifecycleCallbacks) } } NavTarget.Settings -> { @@ -145,7 +147,9 @@ class LoggedInFlowNode @AssistedInject constructor( plugins().forEach { it.onOpenBugReport() } } } - preferencesEntryPoint.node(this, buildContext, plugins = listOf(callback)) + preferencesEntryPoint.nodeBuilder(this, buildContext) + .callback(callback) + .build() } } } diff --git a/appnav/src/main/kotlin/io/element/android/appnav/NotLoggedInFlowNode.kt b/appnav/src/main/kotlin/io/element/android/appnav/NotLoggedInFlowNode.kt index e3f135372c..3d99f03fa0 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/NotLoggedInFlowNode.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/NotLoggedInFlowNode.kt @@ -78,10 +78,13 @@ class NotLoggedInFlowNode @AssistedInject constructor( backstack.push(NavTarget.LoginFlow) } } - onBoardingEntryPoint.node(this, buildContext, plugins = listOf(callback)) + onBoardingEntryPoint + .nodeBuilder(this, buildContext) + .callback(callback) + .build() } NavTarget.LoginFlow -> { - loginEntryPoint.node(this, buildContext) + loginEntryPoint.createNode(this, buildContext) } } } diff --git a/appnav/src/main/kotlin/io/element/android/appnav/RoomFlowNode.kt b/appnav/src/main/kotlin/io/element/android/appnav/RoomFlowNode.kt index 7025617719..aa5a972de9 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/RoomFlowNode.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/RoomFlowNode.kt @@ -32,7 +32,7 @@ import io.element.android.anvilannotations.ContributesNode import io.element.android.features.messages.api.MessagesEntryPoint import io.element.android.libraries.architecture.BackstackNode import io.element.android.libraries.architecture.NodeInputs -import io.element.android.libraries.architecture.nodeInputs +import io.element.android.libraries.architecture.inputs import io.element.android.libraries.di.SessionScope import io.element.android.libraries.matrix.api.room.MatrixRoom import kotlinx.parcelize.Parcelize @@ -61,7 +61,7 @@ class RoomFlowNode @AssistedInject constructor( val room: MatrixRoom, ) : NodeInputs - private val inputs: Inputs by nodeInputs() + private val inputs: Inputs = inputs() init { lifecycle.subscribe( @@ -79,7 +79,7 @@ class RoomFlowNode @AssistedInject constructor( override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node { return when (navTarget) { NavTarget.Messages -> { - messagesEntryPoint.node(this, buildContext) + messagesEntryPoint.createNode(this, buildContext) } } } diff --git a/appnav/src/main/kotlin/io/element/android/appnav/RootFlowNode.kt b/appnav/src/main/kotlin/io/element/android/appnav/RootFlowNode.kt index 3baa775620..77f53e2498 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/RootFlowNode.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/RootFlowNode.kt @@ -39,13 +39,13 @@ import com.bumble.appyx.navmodel.backstack.operation.push import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode +import io.element.android.appnav.di.MatrixClientsHolder import io.element.android.appnav.root.RootPresenter import io.element.android.appnav.root.RootView import io.element.android.features.rageshake.bugreport.BugReportEntryPoint import io.element.android.libraries.architecture.BackstackNode import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler import io.element.android.libraries.architecture.createNode -import io.element.android.libraries.architecture.nodeInputsProvider import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator import io.element.android.libraries.di.AppScope import io.element.android.libraries.di.ApplicationContext @@ -179,14 +179,14 @@ class RootFlowNode @AssistedInject constructor( Timber.w("Couldn't find any session, go through SplashScreen") backstack.newRoot(NavTarget.SplashScreen) } - val inputsProvider = nodeInputsProvider(LoggedInFlowNode.Inputs(matrixClient)) + val inputs = LoggedInFlowNode.Inputs(matrixClient) val callback = object : LoggedInFlowNode.Callback { override fun onOpenBugReport() { backstack.push(NavTarget.BugReport) } } val nodeLifecycleCallbacks = plugins() - createNode(buildContext, plugins = listOf(inputsProvider, callback) + nodeLifecycleCallbacks) + createNode(buildContext, plugins = listOf(inputs, callback) + nodeLifecycleCallbacks) } NavTarget.NotLoggedInFlow -> createNode(buildContext) NavTarget.SplashScreen -> splashNode(buildContext) @@ -196,7 +196,10 @@ class RootFlowNode @AssistedInject constructor( backstack.pop() } } - bugReportEntryPoint.node(this, buildContext, plugins = listOf(callback)) + bugReportEntryPoint + .nodeBuilder(this, buildContext) + .callback(callback) + .build() } } } diff --git a/appnav/src/main/kotlin/io/element/android/appnav/MatrixClientsHolder.kt b/appnav/src/main/kotlin/io/element/android/appnav/di/MatrixClientsHolder.kt similarity index 98% rename from appnav/src/main/kotlin/io/element/android/appnav/MatrixClientsHolder.kt rename to appnav/src/main/kotlin/io/element/android/appnav/di/MatrixClientsHolder.kt index 0a96ad2c74..2e929b07e5 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/MatrixClientsHolder.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/di/MatrixClientsHolder.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.appnav +package io.element.android.appnav.di import android.os.Bundle import io.element.android.libraries.di.AppScope diff --git a/features/login/src/main/kotlin/io/element/android/features/login/api/LoginEntryPoint.kt b/features/login/src/main/kotlin/io/element/android/features/login/api/LoginEntryPoint.kt index 59fe87007d..0eac558ba5 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/api/LoginEntryPoint.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/api/LoginEntryPoint.kt @@ -16,6 +16,6 @@ package io.element.android.features.login.api -import io.element.android.libraries.architecture.FeatureEntryPoint +import io.element.android.libraries.architecture.SimpleFeatureEntryPoint -interface LoginEntryPoint : FeatureEntryPoint +interface LoginEntryPoint : SimpleFeatureEntryPoint diff --git a/features/login/src/main/kotlin/io/element/android/features/login/impl/DefaultLoginEntryPoint.kt b/features/login/src/main/kotlin/io/element/android/features/login/impl/DefaultLoginEntryPoint.kt index 721e95c466..64c30b7727 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/impl/DefaultLoginEntryPoint.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/impl/DefaultLoginEntryPoint.kt @@ -18,7 +18,6 @@ package io.element.android.features.login.impl import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node -import com.bumble.appyx.core.plugin.Plugin import com.squareup.anvil.annotations.ContributesBinding import io.element.android.features.login.api.LoginEntryPoint import io.element.android.libraries.architecture.createNode @@ -27,7 +26,7 @@ import javax.inject.Inject @ContributesBinding(AppScope::class) class DefaultLoginEntryPoint @Inject constructor() : LoginEntryPoint { - override fun node(parentNode: Node, buildContext: BuildContext, plugins: List): Node { - return parentNode.createNode(buildContext, plugins) + override fun createNode(parentNode: Node, buildContext: BuildContext): Node { + return parentNode.createNode(buildContext) } } diff --git a/features/login/src/main/kotlin/io/element/android/features/login/impl/LoginFlowNode.kt b/features/login/src/main/kotlin/io/element/android/features/login/impl/LoginFlowNode.kt index 75735f698f..dcdaf1a347 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/impl/LoginFlowNode.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/impl/LoginFlowNode.kt @@ -22,7 +22,6 @@ import androidx.compose.ui.Modifier import com.bumble.appyx.core.composable.Children import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node -import com.bumble.appyx.core.node.ParentNode import com.bumble.appyx.core.plugin.Plugin import com.bumble.appyx.navmodel.backstack.BackStack import com.bumble.appyx.navmodel.backstack.operation.push diff --git a/features/messages/api/src/main/kotlin/io/element/android/features/messages/api/MessagesEntryPoint.kt b/features/messages/api/src/main/kotlin/io/element/android/features/messages/api/MessagesEntryPoint.kt index 3509df342b..718c5826e6 100644 --- a/features/messages/api/src/main/kotlin/io/element/android/features/messages/api/MessagesEntryPoint.kt +++ b/features/messages/api/src/main/kotlin/io/element/android/features/messages/api/MessagesEntryPoint.kt @@ -16,6 +16,6 @@ package io.element.android.features.messages.api -import io.element.android.libraries.architecture.FeatureEntryPoint +import io.element.android.libraries.architecture.SimpleFeatureEntryPoint -interface MessagesEntryPoint : FeatureEntryPoint +interface MessagesEntryPoint : SimpleFeatureEntryPoint diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/DefaultMessagesEntryPoint.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/DefaultMessagesEntryPoint.kt index 6545e3ac66..505cba1a7b 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/DefaultMessagesEntryPoint.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/DefaultMessagesEntryPoint.kt @@ -18,7 +18,6 @@ package io.element.android.features.messages.impl import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node -import com.bumble.appyx.core.plugin.Plugin import com.squareup.anvil.annotations.ContributesBinding import io.element.android.features.messages.api.MessagesEntryPoint import io.element.android.libraries.architecture.createNode @@ -27,7 +26,7 @@ import javax.inject.Inject @ContributesBinding(AppScope::class) class DefaultMessagesEntryPoint @Inject constructor() : MessagesEntryPoint { - override fun node(parentNode: Node, buildContext: BuildContext, plugins: List): Node { - return parentNode.createNode(buildContext, plugins) + override fun createNode(parentNode: Node, buildContext: BuildContext): Node { + return parentNode.createNode(buildContext) } } diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/api/OnBoardingEntryPoint.kt b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/api/OnBoardingEntryPoint.kt index 8c256547c3..7be45ce236 100644 --- a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/api/OnBoardingEntryPoint.kt +++ b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/api/OnBoardingEntryPoint.kt @@ -16,10 +16,20 @@ package io.element.android.features.onboarding.api +import com.bumble.appyx.core.modality.BuildContext +import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.plugin.Plugin import io.element.android.libraries.architecture.FeatureEntryPoint interface OnBoardingEntryPoint : FeatureEntryPoint { + + fun nodeBuilder(parentNode: Node, buildContext: BuildContext): NodeBuilder + + interface NodeBuilder { + fun callback(callback: Callback): NodeBuilder + fun build(): Node + } + interface Callback : Plugin { fun onSignUp() fun onSignIn() diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/DefaultOnBoardingEntryPoint.kt b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/DefaultOnBoardingEntryPoint.kt index 1475d18778..b5ce63116d 100644 --- a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/DefaultOnBoardingEntryPoint.kt +++ b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/DefaultOnBoardingEntryPoint.kt @@ -27,7 +27,19 @@ import javax.inject.Inject @ContributesBinding(AppScope::class) class DefaultOnBoardingEntryPoint @Inject constructor() : OnBoardingEntryPoint { - override fun node(parentNode: Node, buildContext: BuildContext, plugins: List): Node { - return parentNode.createNode(buildContext, plugins) + override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): OnBoardingEntryPoint.NodeBuilder { + return object : OnBoardingEntryPoint.NodeBuilder { + + val plugins = ArrayList() + + override fun callback(callback: OnBoardingEntryPoint.Callback): OnBoardingEntryPoint.NodeBuilder { + plugins += callback + return this + } + + override fun build(): Node { + return parentNode.createNode(buildContext, plugins) + } + } } } diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/api/PreferencesEntryPoint.kt b/features/preferences/src/main/kotlin/io/element/android/features/preferences/api/PreferencesEntryPoint.kt index 1ed5fe3823..464ab2159f 100644 --- a/features/preferences/src/main/kotlin/io/element/android/features/preferences/api/PreferencesEntryPoint.kt +++ b/features/preferences/src/main/kotlin/io/element/android/features/preferences/api/PreferencesEntryPoint.kt @@ -16,10 +16,20 @@ package io.element.android.features.preferences.api +import com.bumble.appyx.core.modality.BuildContext +import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.plugin.Plugin import io.element.android.libraries.architecture.FeatureEntryPoint -interface PreferencesEntryPoint: FeatureEntryPoint { +interface PreferencesEntryPoint : FeatureEntryPoint { + + fun nodeBuilder(parentNode: Node, buildContext: BuildContext): NodeBuilder + + interface NodeBuilder { + fun callback(callback: Callback): NodeBuilder + fun build(): Node + } + interface Callback : Plugin { fun onOpenBugReport() } diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/DefaultPreferencesEntryPoint.kt b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/DefaultPreferencesEntryPoint.kt index 91ba3bf0a3..ac26d05255 100644 --- a/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/DefaultPreferencesEntryPoint.kt +++ b/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/DefaultPreferencesEntryPoint.kt @@ -27,7 +27,17 @@ import javax.inject.Inject @ContributesBinding(AppScope::class) class DefaultPreferencesEntryPoint @Inject constructor() : PreferencesEntryPoint { - override fun node(parentNode: Node, buildContext: BuildContext, plugins: List): Node { - return parentNode.createNode(buildContext, plugins) + override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): PreferencesEntryPoint.NodeBuilder { + return object : PreferencesEntryPoint.NodeBuilder { + val plugins = ArrayList() + override fun callback(callback: PreferencesEntryPoint.Callback): PreferencesEntryPoint.NodeBuilder { + plugins += callback + return this + } + + override fun build(): Node { + return parentNode.createNode(buildContext) + } + } } } diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportEntryPoint.kt b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportEntryPoint.kt index 46a3e3bbf4..955763b3cc 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportEntryPoint.kt +++ b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportEntryPoint.kt @@ -16,10 +16,20 @@ package io.element.android.features.rageshake.bugreport +import com.bumble.appyx.core.modality.BuildContext +import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.plugin.Plugin import io.element.android.libraries.architecture.FeatureEntryPoint interface BugReportEntryPoint : FeatureEntryPoint { + + fun nodeBuilder(parentNode: Node, buildContext: BuildContext): NodeBuilder + + interface NodeBuilder { + fun callback(callback: Callback): NodeBuilder + fun build(): Node + } + interface Callback : Plugin { fun onBugReportSent() } diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/DefaultBugReportEntryPoint.kt b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/DefaultBugReportEntryPoint.kt index 819a33ca72..e71f8a9511 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/DefaultBugReportEntryPoint.kt +++ b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/DefaultBugReportEntryPoint.kt @@ -26,7 +26,19 @@ import javax.inject.Inject @ContributesBinding(AppScope::class) class DefaultBugReportEntryPoint @Inject constructor() : BugReportEntryPoint { - override fun node(parentNode: Node, buildContext: BuildContext, plugins: List): Node { - return parentNode.createNode(buildContext, plugins) + override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): BugReportEntryPoint.NodeBuilder { + + val plugins = ArrayList() + + return object : BugReportEntryPoint.NodeBuilder { + override fun callback(callback: BugReportEntryPoint.Callback): BugReportEntryPoint.NodeBuilder { + plugins += callback + return this + } + + override fun build(): Node { + return parentNode.createNode(buildContext) + } + } } } diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt index 995da4498a..8cbb5186d5 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt @@ -16,13 +16,23 @@ package io.element.android.features.roomlist.api +import com.bumble.appyx.core.modality.BuildContext +import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.plugin.Plugin import io.element.android.libraries.architecture.FeatureEntryPoint import io.element.android.libraries.matrix.api.core.RoomId interface RoomListEntryPoint : FeatureEntryPoint { + + fun nodeBuilder(parentNode: Node, buildContext: BuildContext): NodeBuilder + interface NodeBuilder { + fun callback(callback: Callback): NodeBuilder + fun build(): Node + } + interface Callback : Plugin { fun onRoomClicked(roomId: RoomId) fun onSettingsClicked() } } + diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/DefaultRoomListEntryPoint.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/DefaultRoomListEntryPoint.kt index 4a1e5d6a09..25016e7a2f 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/DefaultRoomListEntryPoint.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/DefaultRoomListEntryPoint.kt @@ -27,7 +27,22 @@ import javax.inject.Inject @ContributesBinding(AppScope::class) class DefaultRoomListEntryPoint @Inject constructor() : RoomListEntryPoint { - override fun node(parentNode: Node, buildContext: BuildContext, plugins: List): Node { - return parentNode.createNode(buildContext, plugins) + + override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): RoomListEntryPoint.NodeBuilder { + + val plugins = ArrayList() + + return object : RoomListEntryPoint.NodeBuilder { + + override fun callback(callback: RoomListEntryPoint.Callback): RoomListEntryPoint.NodeBuilder { + plugins += callback + return this + } + + override fun build(): Node { + return parentNode.createNode(buildContext, plugins) + } + } } } + diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListPresenter.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListPresenter.kt index 964a0157a3..1ec5dc6bd2 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListPresenter.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListPresenter.kt @@ -25,6 +25,8 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue +import io.element.android.features.roomlist.impl.model.RoomListRoomSummary +import io.element.android.features.roomlist.impl.model.RoomListRoomSummaryPlaceholders import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.core.coroutine.parallelMap import io.element.android.libraries.dateformatter.api.LastMessageFormatter diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListState.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListState.kt index 69e47a4250..6831c729d4 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListState.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListState.kt @@ -17,6 +17,7 @@ package io.element.android.features.roomlist.impl import androidx.compose.runtime.Immutable +import io.element.android.features.roomlist.impl.model.RoomListRoomSummary import io.element.android.libraries.matrix.ui.model.MatrixUser import kotlinx.collections.immutable.ImmutableList diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt index e057376363..4fdbf585b9 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt @@ -17,6 +17,8 @@ package io.element.android.features.roomlist.impl import androidx.compose.ui.tooling.preview.PreviewParameterProvider +import io.element.android.features.roomlist.impl.model.RoomListRoomSummary +import io.element.android.features.roomlist.impl.model.RoomListRoomSummaryPlaceholders import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.matrix.api.core.UserId import io.element.android.libraries.matrix.ui.model.MatrixUser diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListView.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListView.kt index 5e440e2274..92b450e8e1 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListView.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListView.kt @@ -36,6 +36,7 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.Velocity import io.element.android.features.roomlist.impl.components.RoomListTopBar import io.element.android.features.roomlist.impl.components.RoomSummaryRow +import io.element.android.features.roomlist.impl.model.RoomListRoomSummary import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.theme.components.Scaffold diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt index ebacfeb917..14d9ef9474 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt @@ -53,8 +53,8 @@ import androidx.compose.ui.unit.LayoutDirection import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.google.accompanist.placeholder.material.placeholder -import io.element.android.features.roomlist.impl.RoomListRoomSummary -import io.element.android.features.roomlist.impl.RoomListRoomSummaryProvider +import io.element.android.features.roomlist.impl.model.RoomListRoomSummary +import io.element.android.features.roomlist.impl.model.RoomListRoomSummaryProvider import io.element.android.libraries.designsystem.components.avatar.Avatar import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListRoomSummary.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt similarity index 95% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListRoomSummary.kt rename to features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt index bec3253bff..ca80dc513e 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListRoomSummary.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.roomlist.impl +package io.element.android.features.roomlist.impl.model import androidx.compose.runtime.Immutable import io.element.android.libraries.designsystem.components.avatar.AvatarData diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListRoomSummaryPlaceholders.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryPlaceholders.kt similarity index 95% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListRoomSummaryPlaceholders.kt rename to features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryPlaceholders.kt index b81803f5a9..551f9ca8ba 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListRoomSummaryPlaceholders.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryPlaceholders.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.roomlist.impl +package io.element.android.features.roomlist.impl.model import io.element.android.libraries.designsystem.components.avatar.AvatarData diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListRoomSummaryProvider.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryProvider.kt similarity index 96% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListRoomSummaryProvider.kt rename to features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryProvider.kt index c0f17f040d..082b8af048 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListRoomSummaryProvider.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.roomlist.impl +package io.element.android.features.roomlist.impl.model import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.libraries.designsystem.components.avatar.AvatarData diff --git a/features/roomlist/src/test/kotlin/io/element/android/features/roomlist/RoomListPresenterTests.kt b/features/roomlist/src/test/kotlin/io/element/android/features/roomlist/RoomListPresenterTests.kt index efb5dd4d5e..30b4c8c893 100644 --- a/features/roomlist/src/test/kotlin/io/element/android/features/roomlist/RoomListPresenterTests.kt +++ b/features/roomlist/src/test/kotlin/io/element/android/features/roomlist/RoomListPresenterTests.kt @@ -24,7 +24,7 @@ import app.cash.turbine.test import com.google.common.truth.Truth.assertThat import io.element.android.features.roomlist.impl.RoomListEvents import io.element.android.features.roomlist.impl.RoomListPresenter -import io.element.android.features.roomlist.impl.RoomListRoomSummary +import io.element.android.features.roomlist.impl.model.RoomListRoomSummary import io.element.android.libraries.dateformatter.api.LastMessageFormatter import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.matrix.test.AN_AVATAR_URL diff --git a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/FeatureEntryPoint.kt b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/FeatureEntryPoint.kt index 974d3d553c..711f780b22 100644 --- a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/FeatureEntryPoint.kt +++ b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/FeatureEntryPoint.kt @@ -18,8 +18,9 @@ package io.element.android.libraries.architecture import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node -import com.bumble.appyx.core.plugin.Plugin -interface FeatureEntryPoint { - fun node(parentNode: Node, buildContext: BuildContext, plugins: List = emptyList()): Node +interface FeatureEntryPoint + +interface SimpleFeatureEntryPoint : FeatureEntryPoint { + fun createNode(parentNode: Node, buildContext: BuildContext): Node } diff --git a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/NodeInputs.kt b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/NodeInputs.kt index d51c49c118..b96d9e166b 100644 --- a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/NodeInputs.kt +++ b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/NodeInputs.kt @@ -19,18 +19,9 @@ package io.element.android.libraries.architecture import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.plugin.Plugin import com.bumble.appyx.core.plugin.plugins -import kotlin.properties.ReadOnlyProperty -interface NodeInputs +interface NodeInputs : Plugin -interface NodeInputsProvider : Plugin { - fun inputs(): I -} - -inline fun nodeInputsProvider(inputs: I) = object : NodeInputsProvider { - override fun inputs() = inputs -} - -fun nodeInputs() = ReadOnlyProperty { thisRef, _ -> - thisRef.plugins>().first().inputs() +inline fun Node.inputs(): I { + return plugins().firstOrNull() ?: throw RuntimeException("Make sure to actually pass NodeInputs plugin to your node") } From 7051bfc14eceb5daff42871e92a6d7638ef51a8f Mon Sep 17 00:00:00 2001 From: ganfra Date: Wed, 8 Mar 2023 16:13:45 +0100 Subject: [PATCH 13/25] [Architecture] split all feature modules to api/impl --- app/build.gradle.kts | 2 +- .../android/x/initializer/CrashInitializer.kt | 2 +- .../x/initializer/TimberInitializer.kt | 2 +- appnav/build.gradle.kts | 14 +-- .../io/element/android/appnav/RootFlowNode.kt | 5 +- .../android/appnav/root/RootPresenter.kt | 4 +- .../element/android/appnav/root/RootState.kt | 9 +- .../android/appnav/root/RootStateProvider.kt | 4 +- .../element/android/appnav/root/RootView.kt | 8 +- .../element/android/appnav/FakeBugReporter.kt | 70 --------------- .../android/appnav/FakeCrashDataStore.kt | 50 ----------- .../element/android/appnav/FakeRageShake.kt | 44 --------- .../android/appnav/FakeRageshakeDataStore.kt | 46 ---------- .../android/appnav/RootPresenterTest.kt | 16 ++-- features/login/.gitignore | 1 - .../api/build.gradle.kts} | 27 +++--- .../features/login/api/LoginEntryPoint.kt | 0 features/login/consumer-rules.pro | 0 features/login/{ => impl}/build.gradle.kts | 3 +- .../login/impl/DefaultLoginEntryPoint.kt | 0 .../features/login/impl/LoginFlowNode.kt | 0 .../impl/changeserver/ChangeServerEvents.kt | 0 .../impl/changeserver/ChangeServerNode.kt | 2 +- .../changeserver/ChangeServerPresenter.kt | 2 +- .../impl/changeserver/ChangeServerState.kt | 0 .../changeserver/ChangeServerStateProvider.kt | 0 .../impl/changeserver/ChangeServerView.kt | 2 +- .../login/impl/error/ErrorFormatter.kt | 0 .../login/impl/root/LoginRootEvents.kt | 0 .../features/login/impl/root/LoginRootNode.kt | 0 .../login/impl/root/LoginRootPresenter.kt | 5 +- .../login/impl/root/LoginRootScreen.kt | 0 .../login/impl/root/LoginRootState.kt | 0 .../login/impl/root/LoginRootStateProvider.kt | 0 .../login/impl}/util/LoginConstants.kt | 2 +- .../src/main/res/drawable/ic_homeserver.xml | 0 .../changeserver/ChangeServerPresenterTest.kt | 2 +- .../impl}/root/LoginRootPresenterTest.kt | 2 +- features/login/proguard-rules.pro | 21 ----- .../features/login/ExampleInstrumentedTest.kt | 38 -------- features/login/src/main/AndroidManifest.xml | 20 ----- features/logout/.gitignore | 1 - .../api/build.gradle.kts} | 29 +++--- .../logout/api}/LogoutPreferenceEvents.kt | 2 +- .../logout/api/LogoutPreferencePresenter.kt | 21 +++++ .../logout/api}/LogoutPreferenceScreen.kt | 2 +- .../logout/api}/LogoutPreferenceState.kt | 2 +- .../api}/LogoutPreferenceStateProvider.kt | 2 +- features/logout/consumer-rules.pro | 0 features/logout/{ => impl}/build.gradle.kts | 6 +- .../impl}/src/main/AndroidManifest.xml | 4 +- .../impl/DefaultLogoutPreferencePresenter.kt} | 13 ++- .../impl}/LogoutPreferencePresenterTest.kt | 10 ++- features/logout/proguard-rules.pro | 21 ----- .../logout/ExampleInstrumentedTest.kt | 38 -------- features/logout/src/main/AndroidManifest.xml | 20 ----- features/messages/api/build.gradle.kts | 2 +- features/onboarding/.gitignore | 1 - .../api/build.gradle.kts} | 27 +++--- .../onboarding/api/OnBoardingEntryPoint.kt | 0 features/onboarding/build.gradle.kts | 48 ---------- features/onboarding/consumer-rules.pro | 0 .../impl}/build.gradle.kts | 16 ++-- .../impl/DefaultOnBoardingEntryPoint.kt | 0 .../onboarding/impl/OnBoardingNode.kt | 0 .../onboarding/impl/OnBoardingScreen.kt | 0 .../onboarding/impl/SplashCarouselData.kt | 0 .../impl/SplashCarouselDataFactory.kt | 1 - .../ic_splash_collaboration.webp | Bin .../ic_splash_collaboration_dark.webp | Bin .../res/drawable-hdpi/ic_splash_control.webp | Bin .../drawable-hdpi/ic_splash_control_dark.webp | Bin .../ic_splash_conversations.webp | Bin .../ic_splash_conversations_dark.webp | Bin .../res/drawable-hdpi/ic_splash_secure.webp | Bin .../drawable-hdpi/ic_splash_secure_dark.webp | Bin .../ic_splash_collaboration.webp | Bin .../ic_splash_collaboration_dark.webp | Bin .../res/drawable-xhdpi/ic_splash_control.webp | Bin .../ic_splash_control_dark.webp | Bin .../ic_splash_conversations.webp | Bin .../ic_splash_conversations_dark.webp | Bin .../res/drawable-xhdpi/ic_splash_secure.webp | Bin .../drawable-xhdpi/ic_splash_secure_dark.webp | Bin .../ic_splash_collaboration.webp | Bin .../ic_splash_collaboration_dark.webp | Bin .../drawable-xxhdpi/ic_splash_control.webp | Bin .../ic_splash_control_dark.webp | Bin .../ic_splash_conversations.webp | Bin .../ic_splash_conversations_dark.webp | Bin .../res/drawable-xxhdpi/ic_splash_secure.webp | Bin .../ic_splash_secure_dark.webp | Bin .../ic_splash_collaboration.webp | Bin .../ic_splash_collaboration_dark.webp | Bin .../drawable-xxxhdpi/ic_splash_control.webp | Bin .../ic_splash_control_dark.webp | Bin .../ic_splash_conversations.webp | Bin .../ic_splash_conversations_dark.webp | Bin .../drawable-xxxhdpi/ic_splash_secure.webp | Bin .../ic_splash_secure_dark.webp | Bin .../main/res/drawable/bg_carousel_page_1.xml | 0 .../main/res/drawable/bg_carousel_page_2.xml | 0 .../main/res/drawable/bg_carousel_page_3.xml | 0 .../main/res/drawable/bg_carousel_page_4.xml | 0 .../main/res/drawable/bg_color_background.xml | 0 .../res/drawable/bg_gradient_ftue_breaker.xml | 0 .../src/main/res/values/strings.xml | 0 features/onboarding/proguard-rules.pro | 21 ----- .../features/login/ExampleInstrumentedTest.kt | 38 -------- features/preferences/.gitignore | 1 - features/preferences/api/build.gradle.kts | 27 ++++++ .../preferences/api/PreferencesEntryPoint.kt | 0 features/preferences/consumer-rules.pro | 0 features/preferences/impl/build.gradle.kts | 63 +++++++++++++ .../impl/DefaultPreferencesEntryPoint.kt | 3 +- .../preferences/impl/PreferencesFlowNode.kt | 0 .../impl/root/PreferencesRootNode.kt | 0 .../impl/root/PreferencesRootPresenter.kt | 4 +- .../impl/root/PreferencesRootState.kt | 4 +- .../impl/root/PreferencesRootStateProvider.kt | 4 +- .../impl/root/PreferencesRootView.kt | 4 +- .../preferences/impl/user/UserPreferences.kt | 0 .../root/PreferencesRootPresenterTest.kt | 13 +-- features/preferences/proguard-rules.pro | 21 ----- .../preferences/ExampleInstrumentedTest.kt | 38 -------- .../preferences/src/main/AndroidManifest.xml | 20 ----- .../preferences/root/FakeRageShake.kt | 44 --------- features/rageshake/.gitignore | 1 - features/rageshake/api/build.gradle.kts | 30 +++++++ .../api}/bugreport/BugReportEntryPoint.kt | 2 +- .../rageshake/api}/crash/CrashDataStore.kt | 2 +- .../api/crash}/CrashDetectionEvents.kt | 2 +- .../api/crash/CrashDetectionPresenter.kt | 21 +++++ .../api/crash}/CrashDetectionState.kt | 5 +- .../api/crash}/CrashDetectionStateProvider.kt | 2 +- .../api/crash/CrashDetectionView.kt} | 2 +- .../detection/RageshakeDetectionEvents.kt | 4 +- .../detection/RageshakeDetectionPresenter.kt | 21 +++++ .../api}/detection/RageshakeDetectionState.kt | 7 +- .../RageshakeDetectionStateProvider.kt | 4 +- .../api}/detection/RageshakeDetectionView.kt | 6 +- .../preferences/RageshakePreferencesEvents.kt | 2 +- .../RageshakePreferencesPresenter.kt | 21 +++++ .../preferences/RageshakePreferencesState.kt | 2 +- .../RageshakePreferencesStateProvider.kt | 2 +- .../preferences/RageshakePreferencesView.kt | 2 +- .../rageshake/api}/rageshake/RageShake.kt | 2 +- .../api}/rageshake/RageshakeDataStore.kt | 2 +- .../rageshake/api}/reporter/BugReporter.kt | 4 +- .../api}/reporter/BugReporterListener.kt | 2 +- .../rageshake/api}/reporter/ReportType.kt | 2 +- .../rageshake/api}/screenshot/Screenshot.kt | 2 +- .../api}/screenshot/ScreenshotHolder.kt | 2 +- features/rageshake/consumer-rules.pro | 0 .../rageshake/{ => impl}/build.gradle.kts | 8 +- .../reporter/BugReporterMultipartBody.java | 2 +- .../impl}/bugreport/BugReportEvents.kt | 2 +- .../impl}/bugreport/BugReportNode.kt | 4 +- .../impl}/bugreport/BugReportPresenter.kt | 14 +-- .../impl}/bugreport/BugReportState.kt | 2 +- .../impl}/bugreport/BugReportStateProvider.kt | 2 +- .../impl}/bugreport/BugReportView.kt | 2 +- .../bugreport/DefaultBugReportEntryPoint.kt | 3 +- .../crash/DefaultCrashDetectionPresenter.kt} | 15 ++-- .../impl}/crash/PreferencesCrashDataStore.kt | 3 +- .../crash/VectorUncaughtExceptionHandler.kt | 2 +- .../DefaultRageshakeDetectionPresenter.kt} | 23 +++-- .../rageshake/impl}/logs/LogFormatter.kt | 2 +- .../rageshake/impl}/logs/VectorFileLogger.kt | 2 +- .../DefaultRageshakePreferencesPresenter.kt} | 17 ++-- .../impl}/rageshake/DefaultRageShake.kt | 5 +- .../PreferencesRageshakeDataStore.kt | 3 +- .../impl}/reporter/DefaultBugReporter.kt | 15 ++-- .../screenshot/DefaultScreenshotHolder.kt | 5 +- .../src/main/res/values/strings.xml | 0 .../impl}/bugreport/BugReportPresenterTest.kt | 6 +- .../impl}/bugreport/FakeBugReporter.kt | 8 +- .../impl}/bugreport/FakeScreenshotHolder.kt | 4 +- .../crash/ui/CrashDetectionPresenterTest.kt | 14 +-- .../RageshakeDetectionPresenterTest.kt | 33 +++---- .../RageshakePreferencesPresenterTest.kt | 14 +-- features/rageshake/proguard-rules.pro | 21 ----- .../rageshake/src/main/AndroidManifest.xml | 20 ----- .../preferences/FakeRageshakeDataStore.kt | 43 --------- features/rageshake/test/build.gradle.kts | 28 ++++++ .../test/crash}/FakeCrashDataStore.kt | 4 +- .../test/rageshake}/FakeRageShake.kt | 6 +- .../test/rageshake}/FakeRageshakeDataStore.kt | 4 +- .../test/screenshot}/FakeScreenshotHolder.kt | 4 +- features/roomlist/.gitignore | 1 - features/roomlist/api/build.gradle.kts | 28 ++++++ .../roomlist/api/RoomListEntryPoint.kt | 0 features/roomlist/consumer-rules.pro | 0 features/roomlist/{ => impl}/build.gradle.kts | 13 +-- .../impl/DefaultRoomListEntryPoint.kt | 0 .../features/roomlist/impl/RoomListEvents.kt | 0 .../features/roomlist/impl/RoomListNode.kt | 0 .../roomlist/impl/RoomListPresenter.kt | 0 .../features/roomlist/impl/RoomListState.kt | 0 .../roomlist/impl/RoomListStateProvider.kt | 0 .../features/roomlist/impl/RoomListView.kt | 0 .../impl/components/RoomListTopBar.kt | 0 .../impl/components/RoomSummaryRow.kt | 0 .../impl/model/RoomListRoomSummary.kt | 0 .../model/RoomListRoomSummaryPlaceholders.kt | 0 .../impl/model/RoomListRoomSummaryProvider.kt | 0 .../roomlist/impl}/RoomListPresenterTests.kt | 85 +++++++++--------- features/roomlist/proguard-rules.pro | 21 ----- .../roomlist/ExampleInstrumentedTest.kt | 38 -------- .../roomlist/src/main/AndroidManifest.xml | 20 ----- libraries/dateformatter/test/build.gradle.kts | 2 +- .../test}/FakeLastMessageFormatter.kt | 2 +- .../kotlin/extension/DependencyHandleScope.kt | 12 +-- settings.gradle.kts | 26 ++++-- 214 files changed, 626 insertions(+), 1090 deletions(-) delete mode 100644 appnav/src/test/kotlin/io/element/android/appnav/FakeBugReporter.kt delete mode 100644 appnav/src/test/kotlin/io/element/android/appnav/FakeCrashDataStore.kt delete mode 100644 appnav/src/test/kotlin/io/element/android/appnav/FakeRageShake.kt delete mode 100644 appnav/src/test/kotlin/io/element/android/appnav/FakeRageshakeDataStore.kt delete mode 100644 features/login/.gitignore rename features/{onboarding/src/test/kotlin/io/element/android/features/login/ExampleUnitTest.kt => login/api/build.gradle.kts} (58%) rename features/login/{ => api}/src/main/kotlin/io/element/android/features/login/api/LoginEntryPoint.kt (100%) delete mode 100644 features/login/consumer-rules.pro rename features/login/{ => impl}/build.gradle.kts (94%) rename features/login/{ => impl}/src/main/kotlin/io/element/android/features/login/impl/DefaultLoginEntryPoint.kt (100%) rename features/login/{ => impl}/src/main/kotlin/io/element/android/features/login/impl/LoginFlowNode.kt (100%) rename features/login/{ => impl}/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerEvents.kt (100%) rename features/login/{ => impl}/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerNode.kt (97%) rename features/login/{ => impl}/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt (97%) rename features/login/{ => impl}/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerState.kt (100%) rename features/login/{ => impl}/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerStateProvider.kt (100%) rename features/login/{ => impl}/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerView.kt (99%) rename features/login/{ => impl}/src/main/kotlin/io/element/android/features/login/impl/error/ErrorFormatter.kt (100%) rename features/login/{ => impl}/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootEvents.kt (100%) rename features/login/{ => impl}/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootNode.kt (100%) rename features/login/{ => impl}/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootPresenter.kt (96%) rename features/login/{ => impl}/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootScreen.kt (100%) rename features/login/{ => impl}/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootState.kt (100%) rename features/login/{ => impl}/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootStateProvider.kt (100%) rename features/login/{src/main/kotlin/io/element/android/features/login => impl/src/main/kotlin/io/element/android/features/login/impl}/util/LoginConstants.kt (93%) rename features/login/{ => impl}/src/main/res/drawable/ic_homeserver.xml (100%) rename features/login/{src/test/kotlin/io/element/android/features/login => impl/src/test/kotlin/io/element/android/features/login/impl}/changeserver/ChangeServerPresenterTest.kt (99%) rename features/login/{src/test/kotlin/io/element/android/features/login => impl/src/test/kotlin/io/element/android/features/login/impl}/root/LoginRootPresenterTest.kt (99%) delete mode 100644 features/login/proguard-rules.pro delete mode 100644 features/login/src/androidTest/kotlin/io/element/android/features/login/ExampleInstrumentedTest.kt delete mode 100644 features/login/src/main/AndroidManifest.xml delete mode 100644 features/logout/.gitignore rename features/{login/src/test/kotlin/io/element/android/features/login/ExampleUnitTest.kt => logout/api/build.gradle.kts} (58%) rename features/logout/{src/main/kotlin/io/element/android/features/logout => api/src/main/kotlin/io/element/android/features/logout/api}/LogoutPreferenceEvents.kt (93%) create mode 100644 features/logout/api/src/main/kotlin/io/element/android/features/logout/api/LogoutPreferencePresenter.kt rename features/logout/{src/main/kotlin/io/element/android/features/logout => api/src/main/kotlin/io/element/android/features/logout/api}/LogoutPreferenceScreen.kt (98%) rename features/logout/{src/main/kotlin/io/element/android/features/logout => api/src/main/kotlin/io/element/android/features/logout/api}/LogoutPreferenceState.kt (94%) rename features/logout/{src/main/kotlin/io/element/android/features/logout => api/src/main/kotlin/io/element/android/features/logout/api}/LogoutPreferenceStateProvider.kt (94%) delete mode 100644 features/logout/consumer-rules.pro rename features/logout/{ => impl}/build.gradle.kts (91%) rename features/{onboarding => logout/impl}/src/main/AndroidManifest.xml (85%) rename features/logout/{src/main/kotlin/io/element/android/features/logout/LogoutPreferencePresenter.kt => impl/src/main/kotlin/io/element/android/features/logout/impl/DefaultLogoutPreferencePresenter.kt} (77%) rename features/logout/{src/test/kotlin/io/element/android/features/logout => impl/src/test/kotlin/io/element/android/features/logout/impl}/LogoutPreferencePresenterTest.kt (88%) delete mode 100644 features/logout/proguard-rules.pro delete mode 100644 features/logout/src/androidTest/kotlin/io/element/android/features/logout/ExampleInstrumentedTest.kt delete mode 100644 features/logout/src/main/AndroidManifest.xml delete mode 100644 features/onboarding/.gitignore rename features/{logout/src/test/kotlin/io/element/android/features/logout/ExampleUnitTest.kt => onboarding/api/build.gradle.kts} (58%) rename features/onboarding/{ => api}/src/main/kotlin/io/element/android/features/onboarding/api/OnBoardingEntryPoint.kt (100%) delete mode 100644 features/onboarding/build.gradle.kts delete mode 100644 features/onboarding/consumer-rules.pro rename features/{preferences => onboarding/impl}/build.gradle.kts (84%) rename features/onboarding/{ => impl}/src/main/kotlin/io/element/android/features/onboarding/impl/DefaultOnBoardingEntryPoint.kt (100%) rename features/onboarding/{ => impl}/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingNode.kt (100%) rename features/onboarding/{ => impl}/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingScreen.kt (100%) rename features/onboarding/{ => impl}/src/main/kotlin/io/element/android/features/onboarding/impl/SplashCarouselData.kt (100%) rename features/onboarding/{ => impl}/src/main/kotlin/io/element/android/features/onboarding/impl/SplashCarouselDataFactory.kt (98%) rename features/onboarding/{ => impl}/src/main/res/drawable-hdpi/ic_splash_collaboration.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-hdpi/ic_splash_collaboration_dark.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-hdpi/ic_splash_control.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-hdpi/ic_splash_control_dark.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-hdpi/ic_splash_conversations.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-hdpi/ic_splash_conversations_dark.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-hdpi/ic_splash_secure.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-hdpi/ic_splash_secure_dark.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xhdpi/ic_splash_collaboration.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xhdpi/ic_splash_collaboration_dark.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xhdpi/ic_splash_control.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xhdpi/ic_splash_control_dark.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xhdpi/ic_splash_conversations.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xhdpi/ic_splash_conversations_dark.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xhdpi/ic_splash_secure.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xhdpi/ic_splash_secure_dark.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xxhdpi/ic_splash_collaboration.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xxhdpi/ic_splash_collaboration_dark.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xxhdpi/ic_splash_control.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xxhdpi/ic_splash_control_dark.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xxhdpi/ic_splash_conversations.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xxhdpi/ic_splash_conversations_dark.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xxhdpi/ic_splash_secure.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xxhdpi/ic_splash_secure_dark.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xxxhdpi/ic_splash_collaboration.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xxxhdpi/ic_splash_collaboration_dark.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xxxhdpi/ic_splash_control.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xxxhdpi/ic_splash_control_dark.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xxxhdpi/ic_splash_conversations.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xxxhdpi/ic_splash_conversations_dark.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xxxhdpi/ic_splash_secure.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable-xxxhdpi/ic_splash_secure_dark.webp (100%) rename features/onboarding/{ => impl}/src/main/res/drawable/bg_carousel_page_1.xml (100%) rename features/onboarding/{ => impl}/src/main/res/drawable/bg_carousel_page_2.xml (100%) rename features/onboarding/{ => impl}/src/main/res/drawable/bg_carousel_page_3.xml (100%) rename features/onboarding/{ => impl}/src/main/res/drawable/bg_carousel_page_4.xml (100%) rename features/onboarding/{ => impl}/src/main/res/drawable/bg_color_background.xml (100%) rename features/onboarding/{ => impl}/src/main/res/drawable/bg_gradient_ftue_breaker.xml (100%) rename features/onboarding/{ => impl}/src/main/res/values/strings.xml (100%) delete mode 100644 features/onboarding/proguard-rules.pro delete mode 100644 features/onboarding/src/androidTest/kotlin/io/element/android/features/login/ExampleInstrumentedTest.kt delete mode 100644 features/preferences/.gitignore create mode 100644 features/preferences/api/build.gradle.kts rename features/preferences/{ => api}/src/main/kotlin/io/element/android/features/preferences/api/PreferencesEntryPoint.kt (100%) delete mode 100644 features/preferences/consumer-rules.pro create mode 100644 features/preferences/impl/build.gradle.kts rename features/preferences/{ => impl}/src/main/kotlin/io/element/android/features/preferences/impl/DefaultPreferencesEntryPoint.kt (98%) rename features/preferences/{ => impl}/src/main/kotlin/io/element/android/features/preferences/impl/PreferencesFlowNode.kt (100%) rename features/preferences/{ => impl}/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt (100%) rename features/preferences/{ => impl}/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenter.kt (89%) rename features/preferences/{ => impl}/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootState.kt (85%) rename features/preferences/{ => impl}/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootStateProvider.kt (85%) rename features/preferences/{ => impl}/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt (94%) rename features/preferences/{ => impl}/src/main/kotlin/io/element/android/features/preferences/impl/user/UserPreferences.kt (100%) rename features/preferences/{src/test/kotlin/io/element/android/features/preferences => impl/src/test/kotlin/io/element/android/features/preferences/impl}/root/PreferencesRootPresenterTest.kt (75%) delete mode 100644 features/preferences/proguard-rules.pro delete mode 100644 features/preferences/src/androidTest/kotlin/io/element/android/features/preferences/ExampleInstrumentedTest.kt delete mode 100644 features/preferences/src/main/AndroidManifest.xml delete mode 100644 features/preferences/src/test/kotlin/io/element/android/features/preferences/root/FakeRageShake.kt delete mode 100644 features/rageshake/.gitignore create mode 100644 features/rageshake/api/build.gradle.kts rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => api/src/main/kotlin/io/element/android/features/rageshake/api}/bugreport/BugReportEntryPoint.kt (94%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => api/src/main/kotlin/io/element/android/features/rageshake/api}/crash/CrashDataStore.kt (93%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake/crash/ui => api/src/main/kotlin/io/element/android/features/rageshake/api/crash}/CrashDetectionEvents.kt (93%) create mode 100644 features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionPresenter.kt rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake/crash/ui => api/src/main/kotlin/io/element/android/features/rageshake/api/crash}/CrashDetectionState.kt (86%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake/crash/ui => api/src/main/kotlin/io/element/android/features/rageshake/api/crash}/CrashDetectionStateProvider.kt (92%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionScreen.kt => api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionView.kt} (97%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => api/src/main/kotlin/io/element/android/features/rageshake/api}/detection/RageshakeDetectionEvents.kt (87%) create mode 100644 features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionPresenter.kt rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => api/src/main/kotlin/io/element/android/features/rageshake/api}/detection/RageshakeDetectionState.kt (81%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => api/src/main/kotlin/io/element/android/features/rageshake/api}/detection/RageshakeDetectionStateProvider.kt (84%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => api/src/main/kotlin/io/element/android/features/rageshake/api}/detection/RageshakeDetectionView.kt (94%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => api/src/main/kotlin/io/element/android/features/rageshake/api}/preferences/RageshakePreferencesEvents.kt (92%) create mode 100644 features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesPresenter.kt rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => api/src/main/kotlin/io/element/android/features/rageshake/api}/preferences/RageshakePreferencesState.kt (92%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => api/src/main/kotlin/io/element/android/features/rageshake/api}/preferences/RageshakePreferencesStateProvider.kt (95%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => api/src/main/kotlin/io/element/android/features/rageshake/api}/preferences/RageshakePreferencesView.kt (98%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => api/src/main/kotlin/io/element/android/features/rageshake/api}/rageshake/RageShake.kt (94%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => api/src/main/kotlin/io/element/android/features/rageshake/api}/rageshake/RageshakeDataStore.kt (93%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => api/src/main/kotlin/io/element/android/features/rageshake/api}/reporter/BugReporter.kt (89%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => api/src/main/kotlin/io/element/android/features/rageshake/api}/reporter/BugReporterListener.kt (95%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => api/src/main/kotlin/io/element/android/features/rageshake/api}/reporter/ReportType.kt (92%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => api/src/main/kotlin/io/element/android/features/rageshake/api}/screenshot/Screenshot.kt (97%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => api/src/main/kotlin/io/element/android/features/rageshake/api}/screenshot/ScreenshotHolder.kt (92%) delete mode 100644 features/rageshake/consumer-rules.pro rename features/rageshake/{ => impl}/build.gradle.kts (92%) rename features/rageshake/{src/main/java/io/element/android/features/rageshake => impl/src/main/java/io/element/android/features/rageshake/impl}/reporter/BugReporterMultipartBody.java (99%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => impl/src/main/kotlin/io/element/android/features/rageshake/impl}/bugreport/BugReportEvents.kt (94%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => impl/src/main/kotlin/io/element/android/features/rageshake/impl}/bugreport/BugReportNode.kt (88%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => impl/src/main/kotlin/io/element/android/features/rageshake/impl}/bugreport/BugReportPresenter.kt (91%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => impl/src/main/kotlin/io/element/android/features/rageshake/impl}/bugreport/BugReportState.kt (96%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => impl/src/main/kotlin/io/element/android/features/rageshake/impl}/bugreport/BugReportStateProvider.kt (96%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => impl/src/main/kotlin/io/element/android/features/rageshake/impl}/bugreport/BugReportView.kt (99%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => impl/src/main/kotlin/io/element/android/features/rageshake/impl}/bugreport/DefaultBugReportEntryPoint.kt (91%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionPresenter.kt => impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/DefaultCrashDetectionPresenter.kt} (73%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => impl/src/main/kotlin/io/element/android/features/rageshake/impl}/crash/PreferencesCrashDataStore.kt (95%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => impl/src/main/kotlin/io/element/android/features/rageshake/impl}/crash/VectorUncaughtExceptionHandler.kt (98%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionPresenter.kt => impl/src/main/kotlin/io/element/android/features/rageshake/impl/detection/DefaultRageshakeDetectionPresenter.kt} (81%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => impl/src/main/kotlin/io/element/android/features/rageshake/impl}/logs/LogFormatter.kt (97%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => impl/src/main/kotlin/io/element/android/features/rageshake/impl}/logs/VectorFileLogger.kt (98%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesPresenter.kt => impl/src/main/kotlin/io/element/android/features/rageshake/impl/preferences/DefaultRageshakePreferencesPresenter.kt} (77%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => impl/src/main/kotlin/io/element/android/features/rageshake/impl}/rageshake/DefaultRageShake.kt (92%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => impl/src/main/kotlin/io/element/android/features/rageshake/impl}/rageshake/PreferencesRageshakeDataStore.kt (94%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => impl/src/main/kotlin/io/element/android/features/rageshake/impl}/reporter/DefaultBugReporter.kt (97%) rename features/rageshake/{src/main/kotlin/io/element/android/features/rageshake => impl/src/main/kotlin/io/element/android/features/rageshake/impl}/screenshot/DefaultScreenshotHolder.kt (90%) rename features/rageshake/{ => impl}/src/main/res/values/strings.xml (100%) rename features/rageshake/{src/test/kotlin/io/element/android/features/rageshake => impl/src/test/kotlin/io/element/android/features/rageshake/impl}/bugreport/BugReportPresenterTest.kt (97%) rename features/rageshake/{src/test/kotlin/io/element/android/features/rageshake => impl/src/test/kotlin/io/element/android/features/rageshake/impl}/bugreport/FakeBugReporter.kt (88%) rename features/rageshake/{src/test/kotlin/io/element/android/features/rageshake => impl/src/test/kotlin/io/element/android/features/rageshake/impl}/bugreport/FakeScreenshotHolder.kt (86%) rename features/rageshake/{src/test/kotlin/io/element/android/features/rageshake => impl/src/test/kotlin/io/element/android/features/rageshake/impl}/crash/ui/CrashDetectionPresenterTest.kt (82%) rename features/rageshake/{src/test/kotlin/io/element/android/features/rageshake => impl/src/test/kotlin/io/element/android/features/rageshake/impl}/detection/RageshakeDetectionPresenterTest.kt (85%) rename features/rageshake/{src/test/kotlin/io/element/android/features/rageshake => impl/src/test/kotlin/io/element/android/features/rageshake/impl}/preferences/RageshakePreferencesPresenterTest.kt (83%) delete mode 100644 features/rageshake/proguard-rules.pro delete mode 100644 features/rageshake/src/main/AndroidManifest.xml delete mode 100644 features/rageshake/src/test/kotlin/io/element/android/features/rageshake/preferences/FakeRageshakeDataStore.kt create mode 100644 features/rageshake/test/build.gradle.kts rename features/rageshake/{src/test/kotlin/io/element/android/features/rageshake/crash/ui => test/src/main/kotlin/io/element/android/features/rageshake/test/crash}/FakeCrashDataStore.kt (91%) rename features/rageshake/{src/test/kotlin/io/element/android/features/rageshake/preferences => test/src/main/kotlin/io/element/android/features/rageshake/test/rageshake}/FakeRageShake.kt (87%) rename features/{preferences/src/test/kotlin/io/element/android/features/preferences/root => rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/rageshake}/FakeRageshakeDataStore.kt (91%) rename {appnav/src/test/kotlin/io/element/android/appnav => features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/screenshot}/FakeScreenshotHolder.kt (87%) delete mode 100644 features/roomlist/.gitignore create mode 100644 features/roomlist/api/build.gradle.kts rename features/roomlist/{ => api}/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt (100%) delete mode 100644 features/roomlist/consumer-rules.pro rename features/roomlist/{ => impl}/build.gradle.kts (88%) rename features/roomlist/{ => impl}/src/main/kotlin/io/element/android/features/roomlist/impl/DefaultRoomListEntryPoint.kt (100%) rename features/roomlist/{ => impl}/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListEvents.kt (100%) rename features/roomlist/{ => impl}/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListNode.kt (100%) rename features/roomlist/{ => impl}/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListPresenter.kt (100%) rename features/roomlist/{ => impl}/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListState.kt (100%) rename features/roomlist/{ => impl}/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt (100%) rename features/roomlist/{ => impl}/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListView.kt (100%) rename features/roomlist/{ => impl}/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomListTopBar.kt (100%) rename features/roomlist/{ => impl}/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt (100%) rename features/roomlist/{ => impl}/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt (100%) rename features/roomlist/{ => impl}/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryPlaceholders.kt (100%) rename features/roomlist/{ => impl}/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryProvider.kt (100%) rename features/roomlist/{src/test/kotlin/io/element/android/features/roomlist => impl/src/test/kotlin/io/element/android/features/roomlist/impl}/RoomListPresenterTests.kt (68%) delete mode 100644 features/roomlist/proguard-rules.pro delete mode 100644 features/roomlist/src/androidTest/kotlin/io/element/android/features/roomlist/ExampleInstrumentedTest.kt delete mode 100644 features/roomlist/src/main/AndroidManifest.xml rename {features/roomlist/src/test/kotlin/io/element/android/features/roomlist => libraries/dateformatter/test/src/main/kotlin/io/element/android/libraries/dateformatter/test}/FakeLastMessageFormatter.kt (94%) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index b667b5d0a4..de5119181d 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -26,8 +26,8 @@ plugins { id("io.element.android-compose-application") alias(libs.plugins.stem) alias(libs.plugins.kotlin.android) - alias(libs.plugins.ksp) alias(libs.plugins.anvil) + alias(libs.plugins.ksp) alias(libs.plugins.kapt) id("com.google.firebase.appdistribution") version "3.0.2" id("org.jetbrains.kotlinx.knit") version "0.4.0" diff --git a/app/src/main/kotlin/io/element/android/x/initializer/CrashInitializer.kt b/app/src/main/kotlin/io/element/android/x/initializer/CrashInitializer.kt index fa7e904e72..c947bc20e3 100644 --- a/app/src/main/kotlin/io/element/android/x/initializer/CrashInitializer.kt +++ b/app/src/main/kotlin/io/element/android/x/initializer/CrashInitializer.kt @@ -18,7 +18,7 @@ package io.element.android.x.initializer import android.content.Context import androidx.startup.Initializer -import io.element.android.features.rageshake.crash.VectorUncaughtExceptionHandler +import io.element.android.features.rageshake.impl.crash.VectorUncaughtExceptionHandler class CrashInitializer : Initializer { diff --git a/app/src/main/kotlin/io/element/android/x/initializer/TimberInitializer.kt b/app/src/main/kotlin/io/element/android/x/initializer/TimberInitializer.kt index 23286c683d..5a641d75c6 100644 --- a/app/src/main/kotlin/io/element/android/x/initializer/TimberInitializer.kt +++ b/app/src/main/kotlin/io/element/android/x/initializer/TimberInitializer.kt @@ -18,7 +18,7 @@ package io.element.android.x.initializer import android.content.Context import androidx.startup.Initializer -import io.element.android.features.rageshake.logs.VectorFileLogger +import io.element.android.features.rageshake.impl.logs.VectorFileLogger import io.element.android.x.BuildConfig import timber.log.Timber diff --git a/appnav/build.gradle.kts b/appnav/build.gradle.kts index 4b36c75055..7a82a27f54 100644 --- a/appnav/build.gradle.kts +++ b/appnav/build.gradle.kts @@ -37,12 +37,12 @@ dependencies { kapt(libs.dagger.compiler) implementation(projects.features.messages.api) - implementation(projects.features.roomlist) - implementation(projects.features.rageshake) - implementation(projects.features.login) - implementation(projects.features.preferences) - implementation(projects.features.logout) - implementation(projects.features.onboarding) + implementation(projects.features.roomlist.api) + implementation(projects.features.rageshake.api) + implementation(projects.features.login.api) + implementation(projects.features.preferences.api) + implementation(projects.features.logout.api) + implementation(projects.features.onboarding.api) implementation(projects.libraries.core) implementation(projects.libraries.architecture) @@ -58,4 +58,6 @@ dependencies { testImplementation(libs.test.truth) testImplementation(libs.test.turbine) testImplementation(projects.libraries.matrix.test) + testImplementation(projects.features.rageshake.test) + testImplementation(projects.features.rageshake.impl) } diff --git a/appnav/src/main/kotlin/io/element/android/appnav/RootFlowNode.kt b/appnav/src/main/kotlin/io/element/android/appnav/RootFlowNode.kt index 77f53e2498..87263b86f4 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/RootFlowNode.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/RootFlowNode.kt @@ -17,7 +17,6 @@ package io.element.android.appnav import android.app.Activity -import android.content.Context import android.os.Parcelable import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize @@ -42,13 +41,12 @@ import io.element.android.anvilannotations.ContributesNode import io.element.android.appnav.di.MatrixClientsHolder import io.element.android.appnav.root.RootPresenter import io.element.android.appnav.root.RootView -import io.element.android.features.rageshake.bugreport.BugReportEntryPoint +import io.element.android.features.rageshake.api.bugreport.BugReportEntryPoint import io.element.android.libraries.architecture.BackstackNode import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler import io.element.android.libraries.architecture.createNode import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator import io.element.android.libraries.di.AppScope -import io.element.android.libraries.di.ApplicationContext import io.element.android.libraries.matrix.api.auth.MatrixAuthenticationService import io.element.android.libraries.matrix.api.core.SessionId import io.element.android.libraries.matrix.api.core.UserId @@ -63,7 +61,6 @@ import timber.log.Timber class RootFlowNode @AssistedInject constructor( @Assisted val buildContext: BuildContext, @Assisted plugins: List, - @ApplicationContext private val appContext: Context, private val authenticationService: MatrixAuthenticationService, private val matrixClientsHolder: MatrixClientsHolder, private val presenter: RootPresenter, diff --git a/appnav/src/main/kotlin/io/element/android/appnav/root/RootPresenter.kt b/appnav/src/main/kotlin/io/element/android/appnav/root/RootPresenter.kt index 5797eca221..a3b73bc4d9 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/root/RootPresenter.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/root/RootPresenter.kt @@ -19,8 +19,8 @@ package io.element.android.appnav.root import androidx.compose.runtime.Composable import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.saveable.rememberSaveable -import io.element.android.features.rageshake.crash.ui.CrashDetectionPresenter -import io.element.android.features.rageshake.detection.RageshakeDetectionPresenter +import io.element.android.features.rageshake.api.crash.CrashDetectionPresenter +import io.element.android.features.rageshake.api.detection.RageshakeDetectionPresenter import io.element.android.libraries.architecture.Presenter import javax.inject.Inject diff --git a/appnav/src/main/kotlin/io/element/android/appnav/root/RootState.kt b/appnav/src/main/kotlin/io/element/android/appnav/root/RootState.kt index e96229d675..ab3be17746 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/root/RootState.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/root/RootState.kt @@ -16,12 +16,11 @@ package io.element.android.appnav.root -import androidx.compose.runtime.Stable -import io.element.android.appnav.root.RootEvents -import io.element.android.features.rageshake.crash.ui.CrashDetectionState -import io.element.android.features.rageshake.detection.RageshakeDetectionState +import androidx.compose.runtime.Immutable +import io.element.android.features.rageshake.api.crash.CrashDetectionState +import io.element.android.features.rageshake.api.detection.RageshakeDetectionState -@Stable +@Immutable data class RootState( val isShowkaseButtonVisible: Boolean, val rageshakeDetectionState: RageshakeDetectionState, diff --git a/appnav/src/main/kotlin/io/element/android/appnav/root/RootStateProvider.kt b/appnav/src/main/kotlin/io/element/android/appnav/root/RootStateProvider.kt index ac8142fb9c..9ed9d365f2 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/root/RootStateProvider.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/root/RootStateProvider.kt @@ -17,8 +17,8 @@ package io.element.android.appnav.root import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.features.rageshake.crash.ui.aCrashDetectionState -import io.element.android.features.rageshake.detection.aRageshakeDetectionState +import io.element.android.features.rageshake.api.crash.aCrashDetectionState +import io.element.android.features.rageshake.api.detection.aRageshakeDetectionState open class RootStateProvider : PreviewParameterProvider { override val values: Sequence diff --git a/appnav/src/main/kotlin/io/element/android/appnav/root/RootView.kt b/appnav/src/main/kotlin/io/element/android/appnav/root/RootView.kt index b93a925b12..e5eb25704d 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/root/RootView.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/root/RootView.kt @@ -24,10 +24,10 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter -import io.element.android.features.rageshake.crash.ui.CrashDetectionEvents -import io.element.android.features.rageshake.crash.ui.CrashDetectionView -import io.element.android.features.rageshake.detection.RageshakeDetectionEvents -import io.element.android.features.rageshake.detection.RageshakeDetectionView +import io.element.android.features.rageshake.api.crash.CrashDetectionEvents +import io.element.android.features.rageshake.api.crash.CrashDetectionView +import io.element.android.features.rageshake.api.detection.RageshakeDetectionEvents +import io.element.android.features.rageshake.api.detection.RageshakeDetectionView import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.theme.components.Text diff --git a/appnav/src/test/kotlin/io/element/android/appnav/FakeBugReporter.kt b/appnav/src/test/kotlin/io/element/android/appnav/FakeBugReporter.kt deleted file mode 100644 index d0caa6d838..0000000000 --- a/appnav/src/test/kotlin/io/element/android/appnav/FakeBugReporter.kt +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2023 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.appnav - -import io.element.android.features.rageshake.reporter.BugReporter -import io.element.android.features.rageshake.reporter.BugReporterListener -import io.element.android.features.rageshake.reporter.ReportType -import io.element.android.libraries.matrix.test.A_FAILURE_REASON -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.delay -import kotlinx.coroutines.launch - -// TODO Remove this duplicated class when we will rework modules. -class FakeBugReporter(val mode: FakeBugReporterMode = FakeBugReporterMode.Success) : BugReporter { - override fun sendBugReport( - coroutineScope: CoroutineScope, - reportType: ReportType, - withDevicesLogs: Boolean, - withCrashLogs: Boolean, - withKeyRequestHistory: Boolean, - withScreenshot: Boolean, - theBugDescription: String, - serverVersion: String, - canContact: Boolean, - customFields: Map?, - listener: BugReporterListener?, - ) { - coroutineScope.launch { - delay(100) - listener?.onProgress(0) - delay(100) - listener?.onProgress(50) - delay(100) - when (mode) { - FakeBugReporterMode.Success -> Unit - FakeBugReporterMode.Failure -> { - listener?.onUploadFailed(A_FAILURE_REASON) - return@launch - } - FakeBugReporterMode.Cancel -> { - listener?.onUploadCancelled() - return@launch - } - } - listener?.onProgress(100) - delay(100) - listener?.onUploadSucceed(null) - } - } -} - -enum class FakeBugReporterMode { - Success, - Failure, - Cancel -} diff --git a/appnav/src/test/kotlin/io/element/android/appnav/FakeCrashDataStore.kt b/appnav/src/test/kotlin/io/element/android/appnav/FakeCrashDataStore.kt deleted file mode 100644 index 65d9e39a39..0000000000 --- a/appnav/src/test/kotlin/io/element/android/appnav/FakeCrashDataStore.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2023 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.appnav - -import io.element.android.features.rageshake.crash.CrashDataStore -import kotlinx.coroutines.flow.Flow -import kotlinx.coroutines.flow.MutableStateFlow - -const val A_CRASH_DATA = "Some crash data" - -// TODO Remove this duplicated class when we will rework modules. - -class FakeCrashDataStore( - crashData: String = "", - appHasCrashed: Boolean = false, -) : CrashDataStore { - private val appHasCrashedFlow = MutableStateFlow(appHasCrashed) - private val crashDataFlow = MutableStateFlow(crashData) - - override fun setCrashData(crashData: String) { - crashDataFlow.value = crashData - } - - override suspend fun resetAppHasCrashed() { - appHasCrashedFlow.value = false - } - - override fun appHasCrashed(): Flow = appHasCrashedFlow - - override fun crashInfo(): Flow = crashDataFlow - - override suspend fun reset() { - appHasCrashedFlow.value = false - crashDataFlow.value = "" - } -} diff --git a/appnav/src/test/kotlin/io/element/android/appnav/FakeRageShake.kt b/appnav/src/test/kotlin/io/element/android/appnav/FakeRageShake.kt deleted file mode 100644 index 949b9f0b7b..0000000000 --- a/appnav/src/test/kotlin/io/element/android/appnav/FakeRageShake.kt +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2023 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.appnav - -import io.element.android.features.rageshake.rageshake.RageShake - -// TODO Remove this duplicated class when we will rework modules. -class FakeRageShake( - private var isAvailableValue: Boolean = true -) : RageShake { - - private var interceptor: (() -> Unit)? = null - - override fun isAvailable() = isAvailableValue - - override fun start(sensitivity: Float) { - } - - override fun stop() { - } - - override fun setSensitivity(sensitivity: Float) { - } - - override fun setInterceptor(interceptor: (() -> Unit)?) { - this.interceptor = interceptor - } - - fun triggerPhoneRageshake() = interceptor?.invoke() -} diff --git a/appnav/src/test/kotlin/io/element/android/appnav/FakeRageshakeDataStore.kt b/appnav/src/test/kotlin/io/element/android/appnav/FakeRageshakeDataStore.kt deleted file mode 100644 index 5dac61db66..0000000000 --- a/appnav/src/test/kotlin/io/element/android/appnav/FakeRageshakeDataStore.kt +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2023 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.appnav - -import io.element.android.features.rageshake.rageshake.RageshakeDataStore -import kotlinx.coroutines.flow.Flow -import kotlinx.coroutines.flow.MutableStateFlow - -const val A_SENSITIVITY = 1f - -// TODO Remove this duplicated class when we will rework modules. -class FakeRageshakeDataStore( - isEnabled: Boolean = true, - sensitivity: Float = A_SENSITIVITY, -) : RageshakeDataStore { - - private val isEnabledFlow = MutableStateFlow(isEnabled) - override fun isEnabled(): Flow = isEnabledFlow - - override suspend fun setIsEnabled(isEnabled: Boolean) { - isEnabledFlow.value = isEnabled - } - - private val sensitivityFlow = MutableStateFlow(sensitivity) - override fun sensitivity(): Flow = sensitivityFlow - - override suspend fun setSensitivity(sensitivity: Float) { - sensitivityFlow.value = sensitivity - } - - override suspend fun reset() = Unit -} diff --git a/appnav/src/test/kotlin/io/element/android/appnav/RootPresenterTest.kt b/appnav/src/test/kotlin/io/element/android/appnav/RootPresenterTest.kt index d912f5dffd..d0ad2adb2e 100644 --- a/appnav/src/test/kotlin/io/element/android/appnav/RootPresenterTest.kt +++ b/appnav/src/test/kotlin/io/element/android/appnav/RootPresenterTest.kt @@ -24,9 +24,13 @@ import app.cash.turbine.test import com.google.common.truth.Truth.assertThat import io.element.android.appnav.root.RootEvents import io.element.android.appnav.root.RootPresenter -import io.element.android.features.rageshake.crash.ui.CrashDetectionPresenter -import io.element.android.features.rageshake.detection.RageshakeDetectionPresenter -import io.element.android.features.rageshake.preferences.RageshakePreferencesPresenter +import io.element.android.features.rageshake.impl.crash.DefaultCrashDetectionPresenter +import io.element.android.features.rageshake.impl.detection.DefaultRageshakeDetectionPresenter +import io.element.android.features.rageshake.impl.preferences.DefaultRageshakePreferencesPresenter +import io.element.android.features.rageshake.test.crash.FakeCrashDataStore +import io.element.android.features.rageshake.test.rageshake.FakeRageShake +import io.element.android.features.rageshake.test.rageshake.FakeRageshakeDataStore +import io.element.android.features.rageshake.test.screenshot.FakeScreenshotHolder import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest import org.junit.Test @@ -63,13 +67,13 @@ class RootPresenterTest { val rageshakeDataStore = FakeRageshakeDataStore() val rageshake = FakeRageShake() val screenshotHolder = FakeScreenshotHolder() - val crashDetectionPresenter = CrashDetectionPresenter( + val crashDetectionPresenter = DefaultCrashDetectionPresenter( crashDataStore = crashDataStore ) - val rageshakeDetectionPresenter = RageshakeDetectionPresenter( + val rageshakeDetectionPresenter = DefaultRageshakeDetectionPresenter( screenshotHolder = screenshotHolder, rageShake = rageshake, - preferencesPresenter = RageshakePreferencesPresenter( + preferencesPresenter = DefaultRageshakePreferencesPresenter( rageshake = rageshake, rageshakeDataStore = rageshakeDataStore, ) diff --git a/features/login/.gitignore b/features/login/.gitignore deleted file mode 100644 index 42afabfd2a..0000000000 --- a/features/login/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/features/onboarding/src/test/kotlin/io/element/android/features/login/ExampleUnitTest.kt b/features/login/api/build.gradle.kts similarity index 58% rename from features/onboarding/src/test/kotlin/io/element/android/features/login/ExampleUnitTest.kt rename to features/login/api/build.gradle.kts index ee6363e624..18164ac9a0 100644 --- a/features/onboarding/src/test/kotlin/io/element/android/features/login/ExampleUnitTest.kt +++ b/features/login/api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,19 +14,14 @@ * limitations under the License. */ -package io.element.android.features.login - -import org.junit.Assert.assertEquals -import org.junit.Test - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } +plugins { + id("io.element.android-library") +} + +android { + namespace = "io.element.android.features.login.api" +} + +dependencies { + implementation(projects.libraries.architecture) } diff --git a/features/login/src/main/kotlin/io/element/android/features/login/api/LoginEntryPoint.kt b/features/login/api/src/main/kotlin/io/element/android/features/login/api/LoginEntryPoint.kt similarity index 100% rename from features/login/src/main/kotlin/io/element/android/features/login/api/LoginEntryPoint.kt rename to features/login/api/src/main/kotlin/io/element/android/features/login/api/LoginEntryPoint.kt diff --git a/features/login/consumer-rules.pro b/features/login/consumer-rules.pro deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/features/login/build.gradle.kts b/features/login/impl/build.gradle.kts similarity index 94% rename from features/login/build.gradle.kts rename to features/login/impl/build.gradle.kts index 4b5504ec34..a2713cba34 100644 --- a/features/login/build.gradle.kts +++ b/features/login/impl/build.gradle.kts @@ -24,7 +24,7 @@ plugins { } android { - namespace = "io.element.android.features.login" + namespace = "io.element.android.features.login.impl" } anvil { @@ -41,6 +41,7 @@ dependencies { implementation(projects.libraries.elementresources) implementation(projects.libraries.testtags) implementation(projects.libraries.uiStrings) + api(projects.features.login.api) ksp(libs.showkase.processor) testImplementation(libs.test.junit) diff --git a/features/login/src/main/kotlin/io/element/android/features/login/impl/DefaultLoginEntryPoint.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/DefaultLoginEntryPoint.kt similarity index 100% rename from features/login/src/main/kotlin/io/element/android/features/login/impl/DefaultLoginEntryPoint.kt rename to features/login/impl/src/main/kotlin/io/element/android/features/login/impl/DefaultLoginEntryPoint.kt diff --git a/features/login/src/main/kotlin/io/element/android/features/login/impl/LoginFlowNode.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/LoginFlowNode.kt similarity index 100% rename from features/login/src/main/kotlin/io/element/android/features/login/impl/LoginFlowNode.kt rename to features/login/impl/src/main/kotlin/io/element/android/features/login/impl/LoginFlowNode.kt diff --git a/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerEvents.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerEvents.kt similarity index 100% rename from features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerEvents.kt rename to features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerEvents.kt diff --git a/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerNode.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerNode.kt similarity index 97% rename from features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerNode.kt rename to features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerNode.kt index 39a4732b6d..11952ce5a8 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerNode.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerNode.kt @@ -28,7 +28,7 @@ import com.bumble.appyx.core.plugin.Plugin import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode -import io.element.android.features.login.util.LoginConstants +import io.element.android.features.login.impl.util.LoginConstants import io.element.android.libraries.core.data.tryOrNull import io.element.android.libraries.di.AppScope diff --git a/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt similarity index 97% rename from features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt rename to features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt index e97a47387a..19a95db3bf 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt @@ -22,7 +22,7 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.saveable.rememberSaveable -import io.element.android.features.login.util.LoginConstants +import io.element.android.features.login.impl.util.LoginConstants import io.element.android.libraries.architecture.Async import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.execute diff --git a/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerState.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerState.kt similarity index 100% rename from features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerState.kt rename to features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerState.kt diff --git a/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerStateProvider.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerStateProvider.kt similarity index 100% rename from features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerStateProvider.kt rename to features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerStateProvider.kt diff --git a/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerView.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerView.kt similarity index 99% rename from features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerView.kt rename to features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerView.kt index f8e136f011..647bab4e9f 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerView.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerView.kt @@ -50,7 +50,7 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp -import io.element.android.features.login.R +import io.element.android.features.login.impl.R import io.element.android.libraries.architecture.Async import io.element.android.libraries.designsystem.ElementTextStyles import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog diff --git a/features/login/src/main/kotlin/io/element/android/features/login/impl/error/ErrorFormatter.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/error/ErrorFormatter.kt similarity index 100% rename from features/login/src/main/kotlin/io/element/android/features/login/impl/error/ErrorFormatter.kt rename to features/login/impl/src/main/kotlin/io/element/android/features/login/impl/error/ErrorFormatter.kt diff --git a/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootEvents.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootEvents.kt similarity index 100% rename from features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootEvents.kt rename to features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootEvents.kt diff --git a/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootNode.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootNode.kt similarity index 100% rename from features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootNode.kt rename to features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootNode.kt diff --git a/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootPresenter.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootPresenter.kt similarity index 96% rename from features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootPresenter.kt rename to features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootPresenter.kt index d2117956c1..a76f197b4a 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootPresenter.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootPresenter.kt @@ -23,14 +23,12 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.saveable.rememberSaveable -import io.element.android.features.login.util.LoginConstants +import io.element.android.features.login.impl.util.LoginConstants import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.core.data.tryOrNull import io.element.android.libraries.matrix.api.auth.MatrixAuthenticationService import io.element.android.libraries.matrix.api.auth.MatrixHomeServerDetails import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.flow.filterNotNull -import kotlinx.coroutines.flow.map import kotlinx.coroutines.launch import javax.inject.Inject @@ -87,5 +85,4 @@ class LoginRootPresenter @Inject constructor(private val authenticationService: private fun updateFormState(formState: MutableState, updateLambda: LoginFormState.() -> LoginFormState) { formState.value = updateLambda(formState.value) } - } diff --git a/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootScreen.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootScreen.kt similarity index 100% rename from features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootScreen.kt rename to features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootScreen.kt diff --git a/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootState.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootState.kt similarity index 100% rename from features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootState.kt rename to features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootState.kt diff --git a/features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootStateProvider.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootStateProvider.kt similarity index 100% rename from features/login/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootStateProvider.kt rename to features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootStateProvider.kt diff --git a/features/login/src/main/kotlin/io/element/android/features/login/util/LoginConstants.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/util/LoginConstants.kt similarity index 93% rename from features/login/src/main/kotlin/io/element/android/features/login/util/LoginConstants.kt rename to features/login/impl/src/main/kotlin/io/element/android/features/login/impl/util/LoginConstants.kt index 61bd6455f9..8e2c37904f 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/util/LoginConstants.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/util/LoginConstants.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.login.util +package io.element.android.features.login.impl.util object LoginConstants { diff --git a/features/login/src/main/res/drawable/ic_homeserver.xml b/features/login/impl/src/main/res/drawable/ic_homeserver.xml similarity index 100% rename from features/login/src/main/res/drawable/ic_homeserver.xml rename to features/login/impl/src/main/res/drawable/ic_homeserver.xml diff --git a/features/login/src/test/kotlin/io/element/android/features/login/changeserver/ChangeServerPresenterTest.kt b/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenterTest.kt similarity index 99% rename from features/login/src/test/kotlin/io/element/android/features/login/changeserver/ChangeServerPresenterTest.kt rename to features/login/impl/src/test/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenterTest.kt index fa12718bb3..da717f85cd 100644 --- a/features/login/src/test/kotlin/io/element/android/features/login/changeserver/ChangeServerPresenterTest.kt +++ b/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenterTest.kt @@ -16,7 +16,7 @@ @file:OptIn(ExperimentalCoroutinesApi::class) -package io.element.android.features.login.changeserver +package io.element.android.features.login.impl.changeserver import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow diff --git a/features/login/src/test/kotlin/io/element/android/features/login/root/LoginRootPresenterTest.kt b/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/root/LoginRootPresenterTest.kt similarity index 99% rename from features/login/src/test/kotlin/io/element/android/features/login/root/LoginRootPresenterTest.kt rename to features/login/impl/src/test/kotlin/io/element/android/features/login/impl/root/LoginRootPresenterTest.kt index ff1aac115a..6c825d0edd 100644 --- a/features/login/src/test/kotlin/io/element/android/features/login/root/LoginRootPresenterTest.kt +++ b/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/root/LoginRootPresenterTest.kt @@ -16,7 +16,7 @@ @file:OptIn(ExperimentalCoroutinesApi::class) -package io.element.android.features.login.root +package io.element.android.features.login.impl.root import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow diff --git a/features/login/proguard-rules.pro b/features/login/proguard-rules.pro deleted file mode 100644 index ff59496d81..0000000000 --- a/features/login/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle.kts. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/features/login/src/androidTest/kotlin/io/element/android/features/login/ExampleInstrumentedTest.kt b/features/login/src/androidTest/kotlin/io/element/android/features/login/ExampleInstrumentedTest.kt deleted file mode 100644 index 4ad31d222f..0000000000 --- a/features/login/src/androidTest/kotlin/io/element/android/features/login/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2022 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.features.login - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import org.junit.Assert.assertEquals -import org.junit.Test -import org.junit.runner.RunWith - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("io.element.android.features.login.test", appContext.packageName) - } -} diff --git a/features/login/src/main/AndroidManifest.xml b/features/login/src/main/AndroidManifest.xml deleted file mode 100644 index 19db0c3d57..0000000000 --- a/features/login/src/main/AndroidManifest.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - diff --git a/features/logout/.gitignore b/features/logout/.gitignore deleted file mode 100644 index 42afabfd2a..0000000000 --- a/features/logout/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/features/login/src/test/kotlin/io/element/android/features/login/ExampleUnitTest.kt b/features/logout/api/build.gradle.kts similarity index 58% rename from features/login/src/test/kotlin/io/element/android/features/login/ExampleUnitTest.kt rename to features/logout/api/build.gradle.kts index ee6363e624..ebf25933b8 100644 --- a/features/login/src/test/kotlin/io/element/android/features/login/ExampleUnitTest.kt +++ b/features/logout/api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,19 +14,16 @@ * limitations under the License. */ -package io.element.android.features.login - -import org.junit.Assert.assertEquals -import org.junit.Test - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } +plugins { + id("io.element.android-compose-library") +} + +android { + namespace = "io.element.android.features.logout.api" +} + +dependencies { + implementation(projects.libraries.architecture) + implementation(projects.libraries.designsystem) + implementation(projects.libraries.uiStrings) } diff --git a/features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferenceEvents.kt b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/LogoutPreferenceEvents.kt similarity index 93% rename from features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferenceEvents.kt rename to features/logout/api/src/main/kotlin/io/element/android/features/logout/api/LogoutPreferenceEvents.kt index b381668974..2dad1623ab 100644 --- a/features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferenceEvents.kt +++ b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/LogoutPreferenceEvents.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.logout +package io.element.android.features.logout.api sealed interface LogoutPreferenceEvents { object Logout : LogoutPreferenceEvents diff --git a/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/LogoutPreferencePresenter.kt b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/LogoutPreferencePresenter.kt new file mode 100644 index 0000000000..b42744f912 --- /dev/null +++ b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/LogoutPreferencePresenter.kt @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.logout.api + +import io.element.android.libraries.architecture.Presenter + +interface LogoutPreferencePresenter : Presenter diff --git a/features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferenceScreen.kt b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/LogoutPreferenceScreen.kt similarity index 98% rename from features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferenceScreen.kt rename to features/logout/api/src/main/kotlin/io/element/android/features/logout/api/LogoutPreferenceScreen.kt index 050b66f660..8fdd2692cd 100644 --- a/features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferenceScreen.kt +++ b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/LogoutPreferenceScreen.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.logout +package io.element.android.features.logout.api import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Logout diff --git a/features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferenceState.kt b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/LogoutPreferenceState.kt similarity index 94% rename from features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferenceState.kt rename to features/logout/api/src/main/kotlin/io/element/android/features/logout/api/LogoutPreferenceState.kt index ee90d64e0b..e5fd05ba8e 100644 --- a/features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferenceState.kt +++ b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/LogoutPreferenceState.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.logout +package io.element.android.features.logout.api import io.element.android.libraries.architecture.Async diff --git a/features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferenceStateProvider.kt b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/LogoutPreferenceStateProvider.kt similarity index 94% rename from features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferenceStateProvider.kt rename to features/logout/api/src/main/kotlin/io/element/android/features/logout/api/LogoutPreferenceStateProvider.kt index f6bed308c4..3e729298b0 100644 --- a/features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferenceStateProvider.kt +++ b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/LogoutPreferenceStateProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.logout +package io.element.android.features.logout.api import io.element.android.libraries.architecture.Async diff --git a/features/logout/consumer-rules.pro b/features/logout/consumer-rules.pro deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/features/logout/build.gradle.kts b/features/logout/impl/build.gradle.kts similarity index 91% rename from features/logout/build.gradle.kts rename to features/logout/impl/build.gradle.kts index e7be5fc95c..86c5ed7bac 100644 --- a/features/logout/build.gradle.kts +++ b/features/logout/impl/build.gradle.kts @@ -23,7 +23,7 @@ plugins { } android { - namespace = "io.element.android.features.logout" + namespace = "io.element.android.features.logout.impl" } anvil { @@ -33,12 +33,14 @@ anvil { dependencies { implementation(projects.anvilannotations) anvil(projects.anvilcodegen) - implementation(projects.libraries.architecture) implementation(projects.libraries.core) + implementation(projects.libraries.architecture) implementation(projects.libraries.matrix.api) implementation(projects.libraries.designsystem) implementation(projects.libraries.elementresources) + implementation(projects.libraries.testtags) implementation(projects.libraries.uiStrings) + api(projects.features.logout.api) ksp(libs.showkase.processor) testImplementation(libs.test.junit) diff --git a/features/onboarding/src/main/AndroidManifest.xml b/features/logout/impl/src/main/AndroidManifest.xml similarity index 85% rename from features/onboarding/src/main/AndroidManifest.xml rename to features/logout/impl/src/main/AndroidManifest.xml index 19db0c3d57..e9c0841b6b 100644 --- a/features/onboarding/src/main/AndroidManifest.xml +++ b/features/logout/impl/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ - + diff --git a/features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferencePresenter.kt b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/DefaultLogoutPreferencePresenter.kt similarity index 77% rename from features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferencePresenter.kt rename to features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/DefaultLogoutPreferencePresenter.kt index 441e603791..baad764025 100644 --- a/features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferencePresenter.kt +++ b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/DefaultLogoutPreferencePresenter.kt @@ -14,23 +14,28 @@ * limitations under the License. */ -package io.element.android.features.logout +package io.element.android.features.logout.impl import androidx.compose.runtime.Composable import androidx.compose.runtime.MutableState import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope +import com.squareup.anvil.annotations.ContributesBinding +import io.element.android.features.logout.api.LogoutPreferenceEvents +import io.element.android.features.logout.api.LogoutPreferencePresenter +import io.element.android.features.logout.api.LogoutPreferenceState import io.element.android.libraries.architecture.Async -import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.execute +import io.element.android.libraries.di.SessionScope import io.element.android.libraries.matrix.api.MatrixClient import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch import javax.inject.Inject -class LogoutPreferencePresenter @Inject constructor(private val matrixClient: MatrixClient) : - Presenter { +@ContributesBinding(SessionScope::class) +class DefaultLogoutPreferencePresenter @Inject constructor(private val matrixClient: MatrixClient) : + LogoutPreferencePresenter { @Composable override fun present(): LogoutPreferenceState { diff --git a/features/logout/src/test/kotlin/io/element/android/features/logout/LogoutPreferencePresenterTest.kt b/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutPreferencePresenterTest.kt similarity index 88% rename from features/logout/src/test/kotlin/io/element/android/features/logout/LogoutPreferencePresenterTest.kt rename to features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutPreferencePresenterTest.kt index 8e8f45e4de..6429ff1938 100644 --- a/features/logout/src/test/kotlin/io/element/android/features/logout/LogoutPreferencePresenterTest.kt +++ b/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutPreferencePresenterTest.kt @@ -16,12 +16,14 @@ @file:OptIn(ExperimentalCoroutinesApi::class) -package io.element.android.features.logout +package io.element.android.features.logout.impl import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat +import io.element.android.features.logout.api.LogoutPreferenceEvents +import io.element.android.features.logout.api.LogoutPreferenceState import io.element.android.libraries.architecture.Async import io.element.android.libraries.matrix.test.A_SESSION_ID import io.element.android.libraries.matrix.test.A_THROWABLE @@ -33,7 +35,7 @@ import org.junit.Test class LogoutPreferencePresenterTest { @Test fun `present - initial state`() = runTest { - val presenter = LogoutPreferencePresenter( + val presenter = DefaultLogoutPreferencePresenter( FakeMatrixClient(A_SESSION_ID), ) moleculeFlow(RecompositionClock.Immediate) { @@ -46,7 +48,7 @@ class LogoutPreferencePresenterTest { @Test fun `present - logout`() = runTest { - val presenter = LogoutPreferencePresenter( + val presenter = DefaultLogoutPreferencePresenter( FakeMatrixClient(A_SESSION_ID), ) moleculeFlow(RecompositionClock.Immediate) { @@ -64,7 +66,7 @@ class LogoutPreferencePresenterTest { @Test fun `present - logout with error`() = runTest { val matrixClient = FakeMatrixClient(A_SESSION_ID) - val presenter = LogoutPreferencePresenter( + val presenter = DefaultLogoutPreferencePresenter( matrixClient, ) moleculeFlow(RecompositionClock.Immediate) { diff --git a/features/logout/proguard-rules.pro b/features/logout/proguard-rules.pro deleted file mode 100644 index ff59496d81..0000000000 --- a/features/logout/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle.kts. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/features/logout/src/androidTest/kotlin/io/element/android/features/logout/ExampleInstrumentedTest.kt b/features/logout/src/androidTest/kotlin/io/element/android/features/logout/ExampleInstrumentedTest.kt deleted file mode 100644 index 1316448d00..0000000000 --- a/features/logout/src/androidTest/kotlin/io/element/android/features/logout/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2022 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.features.logout - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import org.junit.Assert.assertEquals -import org.junit.Test -import org.junit.runner.RunWith - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("io.element.android.features.login.test", appContext.packageName) - } -} diff --git a/features/logout/src/main/AndroidManifest.xml b/features/logout/src/main/AndroidManifest.xml deleted file mode 100644 index 19db0c3d57..0000000000 --- a/features/logout/src/main/AndroidManifest.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - diff --git a/features/messages/api/build.gradle.kts b/features/messages/api/build.gradle.kts index 45b8f50fc3..555e631a4d 100644 --- a/features/messages/api/build.gradle.kts +++ b/features/messages/api/build.gradle.kts @@ -17,7 +17,7 @@ // TODO: Remove once https://youtrack.jetbrains.com/issue/KTIJ-19369 is fixed @Suppress("DSL_SCOPE_VIOLATION") plugins { - id("io.element.android-compose-library") + id("io.element.android-library") } android { diff --git a/features/onboarding/.gitignore b/features/onboarding/.gitignore deleted file mode 100644 index 42afabfd2a..0000000000 --- a/features/onboarding/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/features/logout/src/test/kotlin/io/element/android/features/logout/ExampleUnitTest.kt b/features/onboarding/api/build.gradle.kts similarity index 58% rename from features/logout/src/test/kotlin/io/element/android/features/logout/ExampleUnitTest.kt rename to features/onboarding/api/build.gradle.kts index 065f4e917d..95000c3a60 100644 --- a/features/logout/src/test/kotlin/io/element/android/features/logout/ExampleUnitTest.kt +++ b/features/onboarding/api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,19 +14,14 @@ * limitations under the License. */ -package io.element.android.features.logout - -import org.junit.Assert.assertEquals -import org.junit.Test - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } +plugins { + id("io.element.android-library") +} + +android { + namespace = "io.element.android.features.onboarding.api" +} + +dependencies { + implementation(projects.libraries.architecture) } diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/api/OnBoardingEntryPoint.kt b/features/onboarding/api/src/main/kotlin/io/element/android/features/onboarding/api/OnBoardingEntryPoint.kt similarity index 100% rename from features/onboarding/src/main/kotlin/io/element/android/features/onboarding/api/OnBoardingEntryPoint.kt rename to features/onboarding/api/src/main/kotlin/io/element/android/features/onboarding/api/OnBoardingEntryPoint.kt diff --git a/features/onboarding/build.gradle.kts b/features/onboarding/build.gradle.kts deleted file mode 100644 index 85016fd90e..0000000000 --- a/features/onboarding/build.gradle.kts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2022 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// TODO: Remove once https://youtrack.jetbrains.com/issue/KTIJ-19369 is fixed -@Suppress("DSL_SCOPE_VIOLATION") -plugins { - id("io.element.android-compose-library") - alias(libs.plugins.anvil) - alias(libs.plugins.ksp) -} - -android { - namespace = "io.element.android.features.onboarding" -} - -anvil { - generateDaggerFactories.set(true) -} - -dependencies { - implementation(projects.libraries.core) - implementation(projects.libraries.elementresources) - implementation(projects.anvilannotations) - anvil(projects.anvilcodegen) - implementation(projects.libraries.uiStrings) - implementation(projects.libraries.designsystem) - implementation(projects.libraries.architecture) - implementation(projects.libraries.testtags) - implementation(projects.libraries.androidutils) - implementation(libs.accompanist.pager) - implementation(libs.accompanist.pagerindicator) - testImplementation(libs.test.junit) - androidTestImplementation(libs.test.junitext) - ksp(libs.showkase.processor) -} diff --git a/features/onboarding/consumer-rules.pro b/features/onboarding/consumer-rules.pro deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/features/preferences/build.gradle.kts b/features/onboarding/impl/build.gradle.kts similarity index 84% rename from features/preferences/build.gradle.kts rename to features/onboarding/impl/build.gradle.kts index 4cface7d76..8dc0b1b0fa 100644 --- a/features/preferences/build.gradle.kts +++ b/features/onboarding/impl/build.gradle.kts @@ -24,7 +24,7 @@ plugins { } android { - namespace = "io.element.android.features.preferences" + namespace = "io.element.android.features.onboarding.impl" } anvil { @@ -34,16 +34,17 @@ anvil { dependencies { implementation(projects.anvilannotations) anvil(projects.anvilcodegen) - implementation(projects.libraries.architecture) implementation(projects.libraries.core) - implementation(projects.libraries.matrixui) - implementation(projects.features.rageshake) - implementation(projects.features.logout) + implementation(projects.libraries.architecture) + implementation(projects.libraries.matrix.api) implementation(projects.libraries.designsystem) implementation(projects.libraries.elementresources) + implementation(projects.libraries.testtags) implementation(projects.libraries.uiStrings) - implementation(libs.datetime) - implementation(libs.accompanist.placeholder) + implementation(libs.accompanist.pager) + implementation(libs.accompanist.pagerindicator) + api(projects.features.onboarding.api) + ksp(libs.showkase.processor) testImplementation(libs.test.junit) testImplementation(libs.coroutines.test) @@ -53,5 +54,4 @@ dependencies { testImplementation(projects.libraries.matrix.test) androidTestImplementation(libs.test.junitext) - ksp(libs.showkase.processor) } diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/DefaultOnBoardingEntryPoint.kt b/features/onboarding/impl/src/main/kotlin/io/element/android/features/onboarding/impl/DefaultOnBoardingEntryPoint.kt similarity index 100% rename from features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/DefaultOnBoardingEntryPoint.kt rename to features/onboarding/impl/src/main/kotlin/io/element/android/features/onboarding/impl/DefaultOnBoardingEntryPoint.kt diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingNode.kt b/features/onboarding/impl/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingNode.kt similarity index 100% rename from features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingNode.kt rename to features/onboarding/impl/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingNode.kt diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingScreen.kt b/features/onboarding/impl/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingScreen.kt similarity index 100% rename from features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingScreen.kt rename to features/onboarding/impl/src/main/kotlin/io/element/android/features/onboarding/impl/OnBoardingScreen.kt diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/SplashCarouselData.kt b/features/onboarding/impl/src/main/kotlin/io/element/android/features/onboarding/impl/SplashCarouselData.kt similarity index 100% rename from features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/SplashCarouselData.kt rename to features/onboarding/impl/src/main/kotlin/io/element/android/features/onboarding/impl/SplashCarouselData.kt diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/SplashCarouselDataFactory.kt b/features/onboarding/impl/src/main/kotlin/io/element/android/features/onboarding/impl/SplashCarouselDataFactory.kt similarity index 98% rename from features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/SplashCarouselDataFactory.kt rename to features/onboarding/impl/src/main/kotlin/io/element/android/features/onboarding/impl/SplashCarouselDataFactory.kt index 0ae33d70b4..80e86213b2 100644 --- a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/impl/SplashCarouselDataFactory.kt +++ b/features/onboarding/impl/src/main/kotlin/io/element/android/features/onboarding/impl/SplashCarouselDataFactory.kt @@ -17,7 +17,6 @@ package io.element.android.features.onboarding.impl import androidx.annotation.DrawableRes -import io.element.android.features.onboarding.R import io.element.android.libraries.ui.strings.R as StringR class SplashCarouselDataFactory { diff --git a/features/onboarding/src/main/res/drawable-hdpi/ic_splash_collaboration.webp b/features/onboarding/impl/src/main/res/drawable-hdpi/ic_splash_collaboration.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-hdpi/ic_splash_collaboration.webp rename to features/onboarding/impl/src/main/res/drawable-hdpi/ic_splash_collaboration.webp diff --git a/features/onboarding/src/main/res/drawable-hdpi/ic_splash_collaboration_dark.webp b/features/onboarding/impl/src/main/res/drawable-hdpi/ic_splash_collaboration_dark.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-hdpi/ic_splash_collaboration_dark.webp rename to features/onboarding/impl/src/main/res/drawable-hdpi/ic_splash_collaboration_dark.webp diff --git a/features/onboarding/src/main/res/drawable-hdpi/ic_splash_control.webp b/features/onboarding/impl/src/main/res/drawable-hdpi/ic_splash_control.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-hdpi/ic_splash_control.webp rename to features/onboarding/impl/src/main/res/drawable-hdpi/ic_splash_control.webp diff --git a/features/onboarding/src/main/res/drawable-hdpi/ic_splash_control_dark.webp b/features/onboarding/impl/src/main/res/drawable-hdpi/ic_splash_control_dark.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-hdpi/ic_splash_control_dark.webp rename to features/onboarding/impl/src/main/res/drawable-hdpi/ic_splash_control_dark.webp diff --git a/features/onboarding/src/main/res/drawable-hdpi/ic_splash_conversations.webp b/features/onboarding/impl/src/main/res/drawable-hdpi/ic_splash_conversations.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-hdpi/ic_splash_conversations.webp rename to features/onboarding/impl/src/main/res/drawable-hdpi/ic_splash_conversations.webp diff --git a/features/onboarding/src/main/res/drawable-hdpi/ic_splash_conversations_dark.webp b/features/onboarding/impl/src/main/res/drawable-hdpi/ic_splash_conversations_dark.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-hdpi/ic_splash_conversations_dark.webp rename to features/onboarding/impl/src/main/res/drawable-hdpi/ic_splash_conversations_dark.webp diff --git a/features/onboarding/src/main/res/drawable-hdpi/ic_splash_secure.webp b/features/onboarding/impl/src/main/res/drawable-hdpi/ic_splash_secure.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-hdpi/ic_splash_secure.webp rename to features/onboarding/impl/src/main/res/drawable-hdpi/ic_splash_secure.webp diff --git a/features/onboarding/src/main/res/drawable-hdpi/ic_splash_secure_dark.webp b/features/onboarding/impl/src/main/res/drawable-hdpi/ic_splash_secure_dark.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-hdpi/ic_splash_secure_dark.webp rename to features/onboarding/impl/src/main/res/drawable-hdpi/ic_splash_secure_dark.webp diff --git a/features/onboarding/src/main/res/drawable-xhdpi/ic_splash_collaboration.webp b/features/onboarding/impl/src/main/res/drawable-xhdpi/ic_splash_collaboration.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xhdpi/ic_splash_collaboration.webp rename to features/onboarding/impl/src/main/res/drawable-xhdpi/ic_splash_collaboration.webp diff --git a/features/onboarding/src/main/res/drawable-xhdpi/ic_splash_collaboration_dark.webp b/features/onboarding/impl/src/main/res/drawable-xhdpi/ic_splash_collaboration_dark.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xhdpi/ic_splash_collaboration_dark.webp rename to features/onboarding/impl/src/main/res/drawable-xhdpi/ic_splash_collaboration_dark.webp diff --git a/features/onboarding/src/main/res/drawable-xhdpi/ic_splash_control.webp b/features/onboarding/impl/src/main/res/drawable-xhdpi/ic_splash_control.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xhdpi/ic_splash_control.webp rename to features/onboarding/impl/src/main/res/drawable-xhdpi/ic_splash_control.webp diff --git a/features/onboarding/src/main/res/drawable-xhdpi/ic_splash_control_dark.webp b/features/onboarding/impl/src/main/res/drawable-xhdpi/ic_splash_control_dark.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xhdpi/ic_splash_control_dark.webp rename to features/onboarding/impl/src/main/res/drawable-xhdpi/ic_splash_control_dark.webp diff --git a/features/onboarding/src/main/res/drawable-xhdpi/ic_splash_conversations.webp b/features/onboarding/impl/src/main/res/drawable-xhdpi/ic_splash_conversations.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xhdpi/ic_splash_conversations.webp rename to features/onboarding/impl/src/main/res/drawable-xhdpi/ic_splash_conversations.webp diff --git a/features/onboarding/src/main/res/drawable-xhdpi/ic_splash_conversations_dark.webp b/features/onboarding/impl/src/main/res/drawable-xhdpi/ic_splash_conversations_dark.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xhdpi/ic_splash_conversations_dark.webp rename to features/onboarding/impl/src/main/res/drawable-xhdpi/ic_splash_conversations_dark.webp diff --git a/features/onboarding/src/main/res/drawable-xhdpi/ic_splash_secure.webp b/features/onboarding/impl/src/main/res/drawable-xhdpi/ic_splash_secure.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xhdpi/ic_splash_secure.webp rename to features/onboarding/impl/src/main/res/drawable-xhdpi/ic_splash_secure.webp diff --git a/features/onboarding/src/main/res/drawable-xhdpi/ic_splash_secure_dark.webp b/features/onboarding/impl/src/main/res/drawable-xhdpi/ic_splash_secure_dark.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xhdpi/ic_splash_secure_dark.webp rename to features/onboarding/impl/src/main/res/drawable-xhdpi/ic_splash_secure_dark.webp diff --git a/features/onboarding/src/main/res/drawable-xxhdpi/ic_splash_collaboration.webp b/features/onboarding/impl/src/main/res/drawable-xxhdpi/ic_splash_collaboration.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xxhdpi/ic_splash_collaboration.webp rename to features/onboarding/impl/src/main/res/drawable-xxhdpi/ic_splash_collaboration.webp diff --git a/features/onboarding/src/main/res/drawable-xxhdpi/ic_splash_collaboration_dark.webp b/features/onboarding/impl/src/main/res/drawable-xxhdpi/ic_splash_collaboration_dark.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xxhdpi/ic_splash_collaboration_dark.webp rename to features/onboarding/impl/src/main/res/drawable-xxhdpi/ic_splash_collaboration_dark.webp diff --git a/features/onboarding/src/main/res/drawable-xxhdpi/ic_splash_control.webp b/features/onboarding/impl/src/main/res/drawable-xxhdpi/ic_splash_control.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xxhdpi/ic_splash_control.webp rename to features/onboarding/impl/src/main/res/drawable-xxhdpi/ic_splash_control.webp diff --git a/features/onboarding/src/main/res/drawable-xxhdpi/ic_splash_control_dark.webp b/features/onboarding/impl/src/main/res/drawable-xxhdpi/ic_splash_control_dark.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xxhdpi/ic_splash_control_dark.webp rename to features/onboarding/impl/src/main/res/drawable-xxhdpi/ic_splash_control_dark.webp diff --git a/features/onboarding/src/main/res/drawable-xxhdpi/ic_splash_conversations.webp b/features/onboarding/impl/src/main/res/drawable-xxhdpi/ic_splash_conversations.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xxhdpi/ic_splash_conversations.webp rename to features/onboarding/impl/src/main/res/drawable-xxhdpi/ic_splash_conversations.webp diff --git a/features/onboarding/src/main/res/drawable-xxhdpi/ic_splash_conversations_dark.webp b/features/onboarding/impl/src/main/res/drawable-xxhdpi/ic_splash_conversations_dark.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xxhdpi/ic_splash_conversations_dark.webp rename to features/onboarding/impl/src/main/res/drawable-xxhdpi/ic_splash_conversations_dark.webp diff --git a/features/onboarding/src/main/res/drawable-xxhdpi/ic_splash_secure.webp b/features/onboarding/impl/src/main/res/drawable-xxhdpi/ic_splash_secure.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xxhdpi/ic_splash_secure.webp rename to features/onboarding/impl/src/main/res/drawable-xxhdpi/ic_splash_secure.webp diff --git a/features/onboarding/src/main/res/drawable-xxhdpi/ic_splash_secure_dark.webp b/features/onboarding/impl/src/main/res/drawable-xxhdpi/ic_splash_secure_dark.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xxhdpi/ic_splash_secure_dark.webp rename to features/onboarding/impl/src/main/res/drawable-xxhdpi/ic_splash_secure_dark.webp diff --git a/features/onboarding/src/main/res/drawable-xxxhdpi/ic_splash_collaboration.webp b/features/onboarding/impl/src/main/res/drawable-xxxhdpi/ic_splash_collaboration.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xxxhdpi/ic_splash_collaboration.webp rename to features/onboarding/impl/src/main/res/drawable-xxxhdpi/ic_splash_collaboration.webp diff --git a/features/onboarding/src/main/res/drawable-xxxhdpi/ic_splash_collaboration_dark.webp b/features/onboarding/impl/src/main/res/drawable-xxxhdpi/ic_splash_collaboration_dark.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xxxhdpi/ic_splash_collaboration_dark.webp rename to features/onboarding/impl/src/main/res/drawable-xxxhdpi/ic_splash_collaboration_dark.webp diff --git a/features/onboarding/src/main/res/drawable-xxxhdpi/ic_splash_control.webp b/features/onboarding/impl/src/main/res/drawable-xxxhdpi/ic_splash_control.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xxxhdpi/ic_splash_control.webp rename to features/onboarding/impl/src/main/res/drawable-xxxhdpi/ic_splash_control.webp diff --git a/features/onboarding/src/main/res/drawable-xxxhdpi/ic_splash_control_dark.webp b/features/onboarding/impl/src/main/res/drawable-xxxhdpi/ic_splash_control_dark.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xxxhdpi/ic_splash_control_dark.webp rename to features/onboarding/impl/src/main/res/drawable-xxxhdpi/ic_splash_control_dark.webp diff --git a/features/onboarding/src/main/res/drawable-xxxhdpi/ic_splash_conversations.webp b/features/onboarding/impl/src/main/res/drawable-xxxhdpi/ic_splash_conversations.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xxxhdpi/ic_splash_conversations.webp rename to features/onboarding/impl/src/main/res/drawable-xxxhdpi/ic_splash_conversations.webp diff --git a/features/onboarding/src/main/res/drawable-xxxhdpi/ic_splash_conversations_dark.webp b/features/onboarding/impl/src/main/res/drawable-xxxhdpi/ic_splash_conversations_dark.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xxxhdpi/ic_splash_conversations_dark.webp rename to features/onboarding/impl/src/main/res/drawable-xxxhdpi/ic_splash_conversations_dark.webp diff --git a/features/onboarding/src/main/res/drawable-xxxhdpi/ic_splash_secure.webp b/features/onboarding/impl/src/main/res/drawable-xxxhdpi/ic_splash_secure.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xxxhdpi/ic_splash_secure.webp rename to features/onboarding/impl/src/main/res/drawable-xxxhdpi/ic_splash_secure.webp diff --git a/features/onboarding/src/main/res/drawable-xxxhdpi/ic_splash_secure_dark.webp b/features/onboarding/impl/src/main/res/drawable-xxxhdpi/ic_splash_secure_dark.webp similarity index 100% rename from features/onboarding/src/main/res/drawable-xxxhdpi/ic_splash_secure_dark.webp rename to features/onboarding/impl/src/main/res/drawable-xxxhdpi/ic_splash_secure_dark.webp diff --git a/features/onboarding/src/main/res/drawable/bg_carousel_page_1.xml b/features/onboarding/impl/src/main/res/drawable/bg_carousel_page_1.xml similarity index 100% rename from features/onboarding/src/main/res/drawable/bg_carousel_page_1.xml rename to features/onboarding/impl/src/main/res/drawable/bg_carousel_page_1.xml diff --git a/features/onboarding/src/main/res/drawable/bg_carousel_page_2.xml b/features/onboarding/impl/src/main/res/drawable/bg_carousel_page_2.xml similarity index 100% rename from features/onboarding/src/main/res/drawable/bg_carousel_page_2.xml rename to features/onboarding/impl/src/main/res/drawable/bg_carousel_page_2.xml diff --git a/features/onboarding/src/main/res/drawable/bg_carousel_page_3.xml b/features/onboarding/impl/src/main/res/drawable/bg_carousel_page_3.xml similarity index 100% rename from features/onboarding/src/main/res/drawable/bg_carousel_page_3.xml rename to features/onboarding/impl/src/main/res/drawable/bg_carousel_page_3.xml diff --git a/features/onboarding/src/main/res/drawable/bg_carousel_page_4.xml b/features/onboarding/impl/src/main/res/drawable/bg_carousel_page_4.xml similarity index 100% rename from features/onboarding/src/main/res/drawable/bg_carousel_page_4.xml rename to features/onboarding/impl/src/main/res/drawable/bg_carousel_page_4.xml diff --git a/features/onboarding/src/main/res/drawable/bg_color_background.xml b/features/onboarding/impl/src/main/res/drawable/bg_color_background.xml similarity index 100% rename from features/onboarding/src/main/res/drawable/bg_color_background.xml rename to features/onboarding/impl/src/main/res/drawable/bg_color_background.xml diff --git a/features/onboarding/src/main/res/drawable/bg_gradient_ftue_breaker.xml b/features/onboarding/impl/src/main/res/drawable/bg_gradient_ftue_breaker.xml similarity index 100% rename from features/onboarding/src/main/res/drawable/bg_gradient_ftue_breaker.xml rename to features/onboarding/impl/src/main/res/drawable/bg_gradient_ftue_breaker.xml diff --git a/features/onboarding/src/main/res/values/strings.xml b/features/onboarding/impl/src/main/res/values/strings.xml similarity index 100% rename from features/onboarding/src/main/res/values/strings.xml rename to features/onboarding/impl/src/main/res/values/strings.xml diff --git a/features/onboarding/proguard-rules.pro b/features/onboarding/proguard-rules.pro deleted file mode 100644 index ff59496d81..0000000000 --- a/features/onboarding/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle.kts. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/features/onboarding/src/androidTest/kotlin/io/element/android/features/login/ExampleInstrumentedTest.kt b/features/onboarding/src/androidTest/kotlin/io/element/android/features/login/ExampleInstrumentedTest.kt deleted file mode 100644 index 4ad31d222f..0000000000 --- a/features/onboarding/src/androidTest/kotlin/io/element/android/features/login/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2022 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.features.login - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import org.junit.Assert.assertEquals -import org.junit.Test -import org.junit.runner.RunWith - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("io.element.android.features.login.test", appContext.packageName) - } -} diff --git a/features/preferences/.gitignore b/features/preferences/.gitignore deleted file mode 100644 index 42afabfd2a..0000000000 --- a/features/preferences/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/features/preferences/api/build.gradle.kts b/features/preferences/api/build.gradle.kts new file mode 100644 index 0000000000..43ab960c56 --- /dev/null +++ b/features/preferences/api/build.gradle.kts @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("io.element.android-library") +} + +android { + namespace = "io.element.android.features.preferences.api" +} + +dependencies { + implementation(projects.libraries.architecture) +} diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/api/PreferencesEntryPoint.kt b/features/preferences/api/src/main/kotlin/io/element/android/features/preferences/api/PreferencesEntryPoint.kt similarity index 100% rename from features/preferences/src/main/kotlin/io/element/android/features/preferences/api/PreferencesEntryPoint.kt rename to features/preferences/api/src/main/kotlin/io/element/android/features/preferences/api/PreferencesEntryPoint.kt diff --git a/features/preferences/consumer-rules.pro b/features/preferences/consumer-rules.pro deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/features/preferences/impl/build.gradle.kts b/features/preferences/impl/build.gradle.kts new file mode 100644 index 0000000000..c181cfa74c --- /dev/null +++ b/features/preferences/impl/build.gradle.kts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2022 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// TODO: Remove once https://youtrack.jetbrains.com/issue/KTIJ-19369 is fixed +@Suppress("DSL_SCOPE_VIOLATION") +plugins { + id("io.element.android-compose-library") + alias(libs.plugins.anvil) + alias(libs.plugins.ksp) + id("kotlin-parcelize") +} + +android { + namespace = "io.element.android.features.preferences.impl" +} + +anvil { + generateDaggerFactories.set(true) +} + +dependencies { + implementation(projects.anvilannotations) + anvil(projects.anvilcodegen) + implementation(projects.libraries.core) + implementation(projects.libraries.architecture) + implementation(projects.libraries.matrix.api) + implementation(projects.libraries.designsystem) + implementation(projects.libraries.elementresources) + implementation(projects.libraries.testtags) + implementation(projects.libraries.uiStrings) + implementation(projects.features.rageshake.api) + implementation(projects.libraries.matrixui) + implementation(projects.features.logout.api) + implementation(libs.datetime) + implementation(libs.accompanist.placeholder) + api(projects.features.preferences.api) + ksp(libs.showkase.processor) + + testImplementation(libs.test.junit) + testImplementation(libs.coroutines.test) + testImplementation(libs.molecule.runtime) + testImplementation(libs.test.truth) + testImplementation(libs.test.turbine) + testImplementation(projects.libraries.matrix.test) + testImplementation(projects.features.rageshake.test) + testImplementation(projects.features.rageshake.impl) + testImplementation(projects.features.logout.impl) + + androidTestImplementation(libs.test.junitext) +} diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/DefaultPreferencesEntryPoint.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/DefaultPreferencesEntryPoint.kt similarity index 98% rename from features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/DefaultPreferencesEntryPoint.kt rename to features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/DefaultPreferencesEntryPoint.kt index ac26d05255..aa286394dc 100644 --- a/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/DefaultPreferencesEntryPoint.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/DefaultPreferencesEntryPoint.kt @@ -30,13 +30,14 @@ class DefaultPreferencesEntryPoint @Inject constructor() : PreferencesEntryPoint override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): PreferencesEntryPoint.NodeBuilder { return object : PreferencesEntryPoint.NodeBuilder { val plugins = ArrayList() + override fun callback(callback: PreferencesEntryPoint.Callback): PreferencesEntryPoint.NodeBuilder { plugins += callback return this } override fun build(): Node { - return parentNode.createNode(buildContext) + return parentNode.createNode(buildContext, plugins) } } } diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/PreferencesFlowNode.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/PreferencesFlowNode.kt similarity index 100% rename from features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/PreferencesFlowNode.kt rename to features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/PreferencesFlowNode.kt diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt similarity index 100% rename from features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt rename to features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenter.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenter.kt similarity index 89% rename from features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenter.kt rename to features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenter.kt index eebc52ab36..68036cfa9b 100644 --- a/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenter.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenter.kt @@ -17,8 +17,8 @@ package io.element.android.features.preferences.impl.root import androidx.compose.runtime.Composable -import io.element.android.features.logout.LogoutPreferencePresenter -import io.element.android.features.rageshake.preferences.RageshakePreferencesPresenter +import io.element.android.features.logout.api.LogoutPreferencePresenter +import io.element.android.features.rageshake.api.preferences.RageshakePreferencesPresenter import io.element.android.libraries.architecture.Async import io.element.android.libraries.architecture.Presenter import javax.inject.Inject diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootState.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootState.kt similarity index 85% rename from features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootState.kt rename to features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootState.kt index 38704b3674..fbf307f7e8 100644 --- a/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootState.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootState.kt @@ -16,8 +16,8 @@ package io.element.android.features.preferences.impl.root -import io.element.android.features.logout.LogoutPreferenceState -import io.element.android.features.rageshake.preferences.RageshakePreferencesState +import io.element.android.features.logout.api.LogoutPreferenceState +import io.element.android.features.rageshake.api.preferences.RageshakePreferencesState import io.element.android.libraries.architecture.Async import io.element.android.libraries.matrix.ui.model.MatrixUser diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootStateProvider.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootStateProvider.kt similarity index 85% rename from features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootStateProvider.kt rename to features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootStateProvider.kt index 619c20a047..a12b16a54b 100644 --- a/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootStateProvider.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootStateProvider.kt @@ -16,8 +16,8 @@ package io.element.android.features.preferences.impl.root -import io.element.android.features.logout.aLogoutPreferenceState -import io.element.android.features.rageshake.preferences.aRageshakePreferencesState +import io.element.android.features.logout.api.aLogoutPreferenceState +import io.element.android.features.rageshake.api.preferences.aRageshakePreferencesState import io.element.android.libraries.architecture.Async fun aPreferencesRootState() = PreferencesRootState( diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt similarity index 94% rename from features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt rename to features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt index 39827dcd7e..22ca852fc6 100644 --- a/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt @@ -21,9 +21,9 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter -import io.element.android.features.logout.LogoutPreferenceView +import io.element.android.features.logout.api.LogoutPreferenceView import io.element.android.features.preferences.impl.user.UserPreferences -import io.element.android.features.rageshake.preferences.RageshakePreferencesView +import io.element.android.features.rageshake.api.preferences.RageshakePreferencesView import io.element.android.libraries.architecture.Async import io.element.android.libraries.designsystem.components.preferences.PreferenceView import io.element.android.libraries.designsystem.preview.ElementPreviewDark diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/user/UserPreferences.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/UserPreferences.kt similarity index 100% rename from features/preferences/src/main/kotlin/io/element/android/features/preferences/impl/user/UserPreferences.kt rename to features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/UserPreferences.kt diff --git a/features/preferences/src/test/kotlin/io/element/android/features/preferences/root/PreferencesRootPresenterTest.kt b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenterTest.kt similarity index 75% rename from features/preferences/src/test/kotlin/io/element/android/features/preferences/root/PreferencesRootPresenterTest.kt rename to features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenterTest.kt index 9ca0f591a5..83d1163e9e 100644 --- a/features/preferences/src/test/kotlin/io/element/android/features/preferences/root/PreferencesRootPresenterTest.kt +++ b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenterTest.kt @@ -16,15 +16,16 @@ @file:OptIn(ExperimentalCoroutinesApi::class) -package io.element.android.features.preferences.root +package io.element.android.features.preferences.impl.root import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat -import io.element.android.features.logout.LogoutPreferencePresenter -import io.element.android.features.preferences.impl.root.PreferencesRootPresenter -import io.element.android.features.rageshake.preferences.RageshakePreferencesPresenter +import io.element.android.features.logout.impl.DefaultLogoutPreferencePresenter +import io.element.android.features.rageshake.impl.preferences.DefaultRageshakePreferencesPresenter +import io.element.android.features.rageshake.test.rageshake.FakeRageShake +import io.element.android.features.rageshake.test.rageshake.FakeRageshakeDataStore import io.element.android.libraries.architecture.Async import io.element.android.libraries.matrix.test.FakeMatrixClient import kotlinx.coroutines.ExperimentalCoroutinesApi @@ -34,8 +35,8 @@ import org.junit.Test class PreferencesRootPresenterTest { @Test fun `present - initial state`() = runTest { - val logoutPresenter = LogoutPreferencePresenter(FakeMatrixClient()) - val rageshakePresenter = RageshakePreferencesPresenter(FakeRageShake(), FakeRageshakeDataStore()) + val logoutPresenter = DefaultLogoutPreferencePresenter(FakeMatrixClient()) + val rageshakePresenter = DefaultRageshakePreferencesPresenter(FakeRageShake(), FakeRageshakeDataStore()) val presenter = PreferencesRootPresenter( logoutPresenter, rageshakePresenter ) diff --git a/features/preferences/proguard-rules.pro b/features/preferences/proguard-rules.pro deleted file mode 100644 index 481bb43481..0000000000 --- a/features/preferences/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/features/preferences/src/androidTest/kotlin/io/element/android/features/preferences/ExampleInstrumentedTest.kt b/features/preferences/src/androidTest/kotlin/io/element/android/features/preferences/ExampleInstrumentedTest.kt deleted file mode 100644 index 3b0a6ee9ae..0000000000 --- a/features/preferences/src/androidTest/kotlin/io/element/android/features/preferences/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2022 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.features.preferences - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import org.junit.Assert.assertEquals -import org.junit.Test -import org.junit.runner.RunWith - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("io.element.android.features.preferences.test", appContext.packageName) - } -} diff --git a/features/preferences/src/main/AndroidManifest.xml b/features/preferences/src/main/AndroidManifest.xml deleted file mode 100644 index 19db0c3d57..0000000000 --- a/features/preferences/src/main/AndroidManifest.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - diff --git a/features/preferences/src/test/kotlin/io/element/android/features/preferences/root/FakeRageShake.kt b/features/preferences/src/test/kotlin/io/element/android/features/preferences/root/FakeRageShake.kt deleted file mode 100644 index 9c1d69828d..0000000000 --- a/features/preferences/src/test/kotlin/io/element/android/features/preferences/root/FakeRageShake.kt +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2023 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.features.preferences.root - -import io.element.android.features.rageshake.rageshake.RageShake - -// TODO Remove this duplicated class when we will rework modules. -class FakeRageShake( - private var isAvailableValue: Boolean = true -) : RageShake { - - private var interceptor: (() -> Unit)? = null - - override fun isAvailable() = isAvailableValue - - override fun start(sensitivity: Float) { - } - - override fun stop() { - } - - override fun setSensitivity(sensitivity: Float) { - } - - override fun setInterceptor(interceptor: (() -> Unit)?) { - this.interceptor = interceptor - } - - fun triggerPhoneRageshake() = interceptor?.invoke() -} diff --git a/features/rageshake/.gitignore b/features/rageshake/.gitignore deleted file mode 100644 index 42afabfd2a..0000000000 --- a/features/rageshake/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/features/rageshake/api/build.gradle.kts b/features/rageshake/api/build.gradle.kts new file mode 100644 index 0000000000..a3c54c8ec3 --- /dev/null +++ b/features/rageshake/api/build.gradle.kts @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("io.element.android-compose-library") +} + +android { + namespace = "io.element.android.features.rageshake.api" +} + +dependencies { + implementation(projects.libraries.architecture) + implementation(projects.libraries.designsystem) + implementation(projects.libraries.androidutils) + implementation(projects.libraries.uiStrings) +} diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportEntryPoint.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/bugreport/BugReportEntryPoint.kt similarity index 94% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportEntryPoint.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/bugreport/BugReportEntryPoint.kt index 955763b3cc..5a59cb0622 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportEntryPoint.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/bugreport/BugReportEntryPoint.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.bugreport +package io.element.android.features.rageshake.api.bugreport import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/CrashDataStore.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDataStore.kt similarity index 93% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/CrashDataStore.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDataStore.kt index d9326841d8..1336c825ba 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/CrashDataStore.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDataStore.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.crash +package io.element.android.features.rageshake.api.crash import kotlinx.coroutines.flow.Flow diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionEvents.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionEvents.kt similarity index 93% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionEvents.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionEvents.kt index 0175e1fde2..055a8339f6 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionEvents.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionEvents.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.crash.ui +package io.element.android.features.rageshake.api.crash sealed interface CrashDetectionEvents { object ResetAllCrashData : CrashDetectionEvents diff --git a/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionPresenter.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionPresenter.kt new file mode 100644 index 0000000000..9ec87b9ee3 --- /dev/null +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionPresenter.kt @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.rageshake.api.crash + +import io.element.android.libraries.architecture.Presenter + +interface CrashDetectionPresenter : Presenter diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionState.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionState.kt similarity index 86% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionState.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionState.kt index 851b6789df..96fb558de6 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionState.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionState.kt @@ -14,8 +14,11 @@ * limitations under the License. */ -package io.element.android.features.rageshake.crash.ui +package io.element.android.features.rageshake.api.crash +import androidx.compose.runtime.Immutable + +@Immutable data class CrashDetectionState( val crashDetected: Boolean, val eventSink: (CrashDetectionEvents) -> Unit diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionStateProvider.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionStateProvider.kt similarity index 92% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionStateProvider.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionStateProvider.kt index 0ffc9f22a1..184d0ecbbc 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionStateProvider.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionStateProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.crash.ui +package io.element.android.features.rageshake.api.crash fun aCrashDetectionState() = CrashDetectionState( crashDetected = false, diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionScreen.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionView.kt similarity index 97% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionScreen.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionView.kt index 50d6488697..927b372820 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionScreen.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionView.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.crash.ui +package io.element.android.features.rageshake.api.crash import androidx.compose.runtime.Composable import androidx.compose.ui.res.stringResource diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionEvents.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionEvents.kt similarity index 87% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionEvents.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionEvents.kt index 9bc787d4ac..bfba87a01a 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionEvents.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionEvents.kt @@ -14,9 +14,9 @@ * limitations under the License. */ -package io.element.android.features.rageshake.detection +package io.element.android.features.rageshake.api.detection -import io.element.android.features.rageshake.screenshot.ImageResult +import io.element.android.features.rageshake.api.screenshot.ImageResult sealed interface RageshakeDetectionEvents { object Dismiss : RageshakeDetectionEvents diff --git a/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionPresenter.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionPresenter.kt new file mode 100644 index 0000000000..87d833db63 --- /dev/null +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionPresenter.kt @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.rageshake.api.detection + +import io.element.android.libraries.architecture.Presenter + +interface RageshakeDetectionPresenter : Presenter diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionState.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionState.kt similarity index 81% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionState.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionState.kt index aa8990c82b..5d6df8bac9 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionState.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionState.kt @@ -14,12 +14,13 @@ * limitations under the License. */ -package io.element.android.features.rageshake.detection +package io.element.android.features.rageshake.api.detection +import androidx.compose.runtime.Immutable import androidx.compose.runtime.Stable -import io.element.android.features.rageshake.preferences.RageshakePreferencesState +import io.element.android.features.rageshake.api.preferences.RageshakePreferencesState -@Stable +@Immutable data class RageshakeDetectionState( val takeScreenshot: Boolean, val showDialog: Boolean, diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionStateProvider.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionStateProvider.kt similarity index 84% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionStateProvider.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionStateProvider.kt index 806d0c6df9..83d2bcd758 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionStateProvider.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionStateProvider.kt @@ -14,9 +14,9 @@ * limitations under the License. */ -package io.element.android.features.rageshake.detection +package io.element.android.features.rageshake.api.detection -import io.element.android.features.rageshake.preferences.aRageshakePreferencesState +import io.element.android.features.rageshake.api.preferences.aRageshakePreferencesState fun aRageshakeDetectionState() = RageshakeDetectionState( takeScreenshot = false, diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionView.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionView.kt similarity index 94% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionView.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionView.kt index c54281c606..d93c82dc7c 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionView.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionView.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.detection +package io.element.android.features.rageshake.api.detection import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -23,8 +23,8 @@ import androidx.compose.ui.platform.LocalView import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.lifecycle.Lifecycle -import io.element.android.features.rageshake.screenshot.ImageResult -import io.element.android.features.rageshake.screenshot.screenshot +import io.element.android.features.rageshake.api.screenshot.ImageResult +import io.element.android.features.rageshake.api.screenshot.screenshot import io.element.android.libraries.androidutils.hardware.vibrate import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog import io.element.android.libraries.designsystem.preview.ElementPreviewDark diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesEvents.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesEvents.kt similarity index 92% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesEvents.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesEvents.kt index 39b788e003..365bfd7397 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesEvents.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesEvents.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.preferences +package io.element.android.features.rageshake.api.preferences sealed interface RageshakePreferencesEvents { data class SetSensitivity(val sensitivity: Float) : RageshakePreferencesEvents diff --git a/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesPresenter.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesPresenter.kt new file mode 100644 index 0000000000..dff0afa96e --- /dev/null +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesPresenter.kt @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.rageshake.api.preferences + +import io.element.android.libraries.architecture.Presenter + +interface RageshakePreferencesPresenter : Presenter diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesState.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesState.kt similarity index 92% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesState.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesState.kt index acb560ef49..20a88d5494 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesState.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesState.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.preferences +package io.element.android.features.rageshake.api.preferences data class RageshakePreferencesState( val isEnabled: Boolean, diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesStateProvider.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesStateProvider.kt similarity index 95% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesStateProvider.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesStateProvider.kt index 6ecd59a713..0af9639242 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesStateProvider.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesStateProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.preferences +package io.element.android.features.rageshake.api.preferences import androidx.compose.ui.tooling.preview.PreviewParameterProvider diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesView.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesView.kt similarity index 98% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesView.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesView.kt index dd716bd4ad..d3541a22b6 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesView.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesView.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.preferences +package io.element.android.features.rageshake.api.preferences import androidx.compose.foundation.layout.Column import androidx.compose.material.icons.Icons diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/rageshake/RageShake.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/rageshake/RageShake.kt similarity index 94% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/rageshake/RageShake.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/rageshake/RageShake.kt index d9150b5ecd..02661e658f 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/rageshake/RageShake.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/rageshake/RageShake.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.rageshake +package io.element.android.features.rageshake.api.rageshake interface RageShake { /** diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/rageshake/RageshakeDataStore.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/rageshake/RageshakeDataStore.kt similarity index 93% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/rageshake/RageshakeDataStore.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/rageshake/RageshakeDataStore.kt index 25a7080354..0c45d24e31 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/rageshake/RageshakeDataStore.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/rageshake/RageshakeDataStore.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.rageshake +package io.element.android.features.rageshake.api.rageshake import kotlinx.coroutines.flow.Flow diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/BugReporter.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/reporter/BugReporter.kt similarity index 89% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/BugReporter.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/reporter/BugReporter.kt index 3acd22107d..deddbd4faa 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/BugReporter.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/reporter/BugReporter.kt @@ -14,8 +14,10 @@ * limitations under the License. */ -package io.element.android.features.rageshake.reporter +package io.element.android.features.rageshake.api.reporter +import io.element.android.features.rageshake.api.reporter.BugReporterListener +import io.element.android.features.rageshake.api.reporter.ReportType import kotlinx.coroutines.CoroutineScope interface BugReporter { diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/BugReporterListener.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/reporter/BugReporterListener.kt similarity index 95% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/BugReporterListener.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/reporter/BugReporterListener.kt index 3259034ad7..8f2ae90d1c 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/BugReporterListener.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/reporter/BugReporterListener.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.reporter +package io.element.android.features.rageshake.api.reporter /** * Bug report upload listener. diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/ReportType.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/reporter/ReportType.kt similarity index 92% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/ReportType.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/reporter/ReportType.kt index a29d29e702..17b75ea1a7 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/ReportType.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/reporter/ReportType.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.reporter +package io.element.android.features.rageshake.api.reporter enum class ReportType { BUG_REPORT, diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/screenshot/Screenshot.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/screenshot/Screenshot.kt similarity index 97% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/screenshot/Screenshot.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/screenshot/Screenshot.kt index 803c51f2da..13041b24ac 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/screenshot/Screenshot.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/screenshot/Screenshot.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.screenshot +package io.element.android.features.rageshake.api.screenshot import android.app.Activity import android.graphics.Bitmap diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/screenshot/ScreenshotHolder.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/screenshot/ScreenshotHolder.kt similarity index 92% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/screenshot/ScreenshotHolder.kt rename to features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/screenshot/ScreenshotHolder.kt index dfe31ae2fe..abd79bd77b 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/screenshot/ScreenshotHolder.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/screenshot/ScreenshotHolder.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.screenshot +package io.element.android.features.rageshake.api.screenshot import android.graphics.Bitmap diff --git a/features/rageshake/consumer-rules.pro b/features/rageshake/consumer-rules.pro deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/features/rageshake/build.gradle.kts b/features/rageshake/impl/build.gradle.kts similarity index 92% rename from features/rageshake/build.gradle.kts rename to features/rageshake/impl/build.gradle.kts index cf16ccf1be..c23bbe74cc 100644 --- a/features/rageshake/build.gradle.kts +++ b/features/rageshake/impl/build.gradle.kts @@ -24,7 +24,7 @@ plugins { } android { - namespace = "io.element.android.features.rageshake" + namespace = "io.element.android.features.rageshake.impl" } anvil { @@ -32,8 +32,8 @@ anvil { } dependencies { - anvil(projects.anvilcodegen) implementation(projects.anvilannotations) + anvil(projects.anvilcodegen) implementation(projects.libraries.androidutils) implementation(projects.libraries.core) implementation(projects.libraries.architecture) @@ -41,6 +41,7 @@ dependencies { implementation(projects.libraries.elementresources) implementation(projects.libraries.uiStrings) api(libs.squareup.seismic) + api(projects.features.rageshake.api) implementation(libs.androidx.datastore.preferences) implementation(libs.coil) implementation(libs.coil.compose) @@ -51,8 +52,9 @@ dependencies { testImplementation(libs.molecule.runtime) testImplementation(libs.test.truth) testImplementation(libs.test.turbine) - testImplementation(projects.libraries.matrix.test) testImplementation(libs.test.mockk) + testImplementation(projects.libraries.matrix.test) + testImplementation(projects.features.rageshake.test) androidTestImplementation(libs.test.junitext) } diff --git a/features/rageshake/src/main/java/io/element/android/features/rageshake/reporter/BugReporterMultipartBody.java b/features/rageshake/impl/src/main/java/io/element/android/features/rageshake/impl/reporter/BugReporterMultipartBody.java similarity index 99% rename from features/rageshake/src/main/java/io/element/android/features/rageshake/reporter/BugReporterMultipartBody.java rename to features/rageshake/impl/src/main/java/io/element/android/features/rageshake/impl/reporter/BugReporterMultipartBody.java index aa499c3f86..e114cb3901 100755 --- a/features/rageshake/src/main/java/io/element/android/features/rageshake/reporter/BugReporterMultipartBody.java +++ b/features/rageshake/impl/src/main/java/io/element/android/features/rageshake/impl/reporter/BugReporterMultipartBody.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.reporter; +package io.element.android.features.rageshake.impl.reporter; import java.io.IOException; import java.util.ArrayList; diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportEvents.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportEvents.kt similarity index 94% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportEvents.kt rename to features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportEvents.kt index 0045f29a2c..9ab6c46a9a 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportEvents.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportEvents.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.bugreport +package io.element.android.features.rageshake.impl.bugreport sealed interface BugReportEvents { object SendBugReport : BugReportEvents diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportNode.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportNode.kt similarity index 88% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportNode.kt rename to features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportNode.kt index 79c1beec0f..b5c20c1ab2 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportNode.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportNode.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.bugreport +package io.element.android.features.rageshake.impl.bugreport import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -25,6 +25,8 @@ import com.bumble.appyx.core.plugin.plugins import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode +import io.element.android.features.rageshake.api.bugreport.BugReportEntryPoint +import io.element.android.features.rageshake.impl.bugreport.BugReportPresenter import io.element.android.libraries.di.AppScope @ContributesNode(AppScope::class) diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportPresenter.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenter.kt similarity index 91% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportPresenter.kt rename to features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenter.kt index a2e17d737b..bce4e96709 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportPresenter.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.bugreport +package io.element.android.features.rageshake.impl.bugreport import androidx.compose.runtime.Composable import androidx.compose.runtime.MutableState @@ -23,12 +23,12 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.saveable.rememberSaveable -import io.element.android.features.rageshake.crash.CrashDataStore -import io.element.android.features.rageshake.logs.VectorFileLogger -import io.element.android.features.rageshake.reporter.BugReporter -import io.element.android.features.rageshake.reporter.BugReporterListener -import io.element.android.features.rageshake.reporter.ReportType -import io.element.android.features.rageshake.screenshot.ScreenshotHolder +import io.element.android.features.rageshake.api.reporter.BugReporter +import io.element.android.features.rageshake.api.reporter.BugReporterListener +import io.element.android.features.rageshake.api.reporter.ReportType +import io.element.android.features.rageshake.api.crash.CrashDataStore +import io.element.android.features.rageshake.impl.logs.VectorFileLogger +import io.element.android.features.rageshake.api.screenshot.ScreenshotHolder import io.element.android.libraries.architecture.Async import io.element.android.libraries.architecture.Presenter import kotlinx.coroutines.CoroutineScope diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportState.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportState.kt similarity index 96% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportState.kt rename to features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportState.kt index ea62ea1ef3..3300693973 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportState.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportState.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.bugreport +package io.element.android.features.rageshake.impl.bugreport import android.os.Parcelable import io.element.android.libraries.architecture.Async diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportStateProvider.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportStateProvider.kt similarity index 96% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportStateProvider.kt rename to features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportStateProvider.kt index a5dd2ad947..3601c2a259 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportStateProvider.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportStateProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.bugreport +package io.element.android.features.rageshake.impl.bugreport import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.libraries.architecture.Async diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportView.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportView.kt similarity index 99% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportView.kt rename to features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportView.kt index 024d6beab9..46a4f7b5c3 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportView.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportView.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.bugreport +package io.element.android.features.rageshake.impl.bugreport import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/DefaultBugReportEntryPoint.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/DefaultBugReportEntryPoint.kt similarity index 91% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/DefaultBugReportEntryPoint.kt rename to features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/DefaultBugReportEntryPoint.kt index e71f8a9511..19f4e532e9 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/DefaultBugReportEntryPoint.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/DefaultBugReportEntryPoint.kt @@ -14,12 +14,13 @@ * limitations under the License. */ -package io.element.android.features.rageshake.bugreport +package io.element.android.features.rageshake.impl.bugreport import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.plugin.Plugin import com.squareup.anvil.annotations.ContributesBinding +import io.element.android.features.rageshake.api.bugreport.BugReportEntryPoint import io.element.android.libraries.architecture.createNode import io.element.android.libraries.di.AppScope import javax.inject.Inject diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionPresenter.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/DefaultCrashDetectionPresenter.kt similarity index 73% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionPresenter.kt rename to features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/DefaultCrashDetectionPresenter.kt index 1f6300a5ac..6a15553bdb 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionPresenter.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/DefaultCrashDetectionPresenter.kt @@ -14,19 +14,24 @@ * limitations under the License. */ -package io.element.android.features.rageshake.crash.ui +package io.element.android.features.rageshake.impl.crash import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState import androidx.compose.runtime.rememberCoroutineScope -import io.element.android.features.rageshake.crash.CrashDataStore -import io.element.android.libraries.architecture.Presenter +import com.squareup.anvil.annotations.ContributesBinding +import io.element.android.features.rageshake.api.crash.CrashDetectionEvents +import io.element.android.features.rageshake.api.crash.CrashDetectionPresenter +import io.element.android.features.rageshake.api.crash.CrashDetectionState +import io.element.android.features.rageshake.api.crash.CrashDataStore +import io.element.android.libraries.di.AppScope import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch import javax.inject.Inject -class CrashDetectionPresenter @Inject constructor(private val crashDataStore: CrashDataStore) : - Presenter { +@ContributesBinding(AppScope::class) +class DefaultCrashDetectionPresenter @Inject constructor(private val crashDataStore: CrashDataStore) : + CrashDetectionPresenter { @Composable override fun present(): CrashDetectionState { diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/PreferencesCrashDataStore.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/PreferencesCrashDataStore.kt similarity index 95% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/PreferencesCrashDataStore.kt rename to features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/PreferencesCrashDataStore.kt index 70f258fd02..018b30d4c5 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/PreferencesCrashDataStore.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/PreferencesCrashDataStore.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.crash +package io.element.android.features.rageshake.impl.crash import android.content.Context import androidx.datastore.core.DataStore @@ -24,6 +24,7 @@ import androidx.datastore.preferences.core.edit import androidx.datastore.preferences.core.stringPreferencesKey import androidx.datastore.preferences.preferencesDataStore import com.squareup.anvil.annotations.ContributesBinding +import io.element.android.features.rageshake.api.crash.CrashDataStore import io.element.android.libraries.core.bool.orFalse import io.element.android.libraries.di.AppScope import io.element.android.libraries.di.ApplicationContext diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/VectorUncaughtExceptionHandler.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/VectorUncaughtExceptionHandler.kt similarity index 98% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/VectorUncaughtExceptionHandler.kt rename to features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/VectorUncaughtExceptionHandler.kt index 942d49d531..a5e7edf405 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/VectorUncaughtExceptionHandler.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/VectorUncaughtExceptionHandler.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.crash +package io.element.android.features.rageshake.impl.crash import android.content.Context import android.os.Build diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionPresenter.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/detection/DefaultRageshakeDetectionPresenter.kt similarity index 81% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionPresenter.kt rename to features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/detection/DefaultRageshakeDetectionPresenter.kt index dc0155877e..58a49611be 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionPresenter.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/detection/DefaultRageshakeDetectionPresenter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.detection +package io.element.android.features.rageshake.impl.detection import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -23,22 +23,27 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.saveable.rememberSaveable -import io.element.android.features.rageshake.preferences.RageshakePreferencesEvents -import io.element.android.features.rageshake.preferences.RageshakePreferencesPresenter -import io.element.android.features.rageshake.rageshake.RageShake -import io.element.android.features.rageshake.screenshot.ImageResult -import io.element.android.features.rageshake.screenshot.ScreenshotHolder -import io.element.android.libraries.architecture.Presenter +import com.squareup.anvil.annotations.ContributesBinding +import io.element.android.features.rageshake.api.detection.RageshakeDetectionEvents +import io.element.android.features.rageshake.api.detection.RageshakeDetectionPresenter +import io.element.android.features.rageshake.api.detection.RageshakeDetectionState +import io.element.android.features.rageshake.api.preferences.RageshakePreferencesEvents +import io.element.android.features.rageshake.api.preferences.RageshakePreferencesPresenter +import io.element.android.features.rageshake.api.rageshake.RageShake +import io.element.android.features.rageshake.api.screenshot.ImageResult +import io.element.android.features.rageshake.api.screenshot.ScreenshotHolder +import io.element.android.libraries.di.AppScope import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch import timber.log.Timber import javax.inject.Inject -class RageshakeDetectionPresenter @Inject constructor( +@ContributesBinding(AppScope::class) +class DefaultRageshakeDetectionPresenter @Inject constructor( private val screenshotHolder: ScreenshotHolder, private val rageShake: RageShake, private val preferencesPresenter: RageshakePreferencesPresenter, -) : Presenter { +) : RageshakeDetectionPresenter { @Composable override fun present(): RageshakeDetectionState { diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/logs/LogFormatter.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/logs/LogFormatter.kt similarity index 97% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/logs/LogFormatter.kt rename to features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/logs/LogFormatter.kt index 2f6a50c077..e0dc1a5fbb 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/logs/LogFormatter.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/logs/LogFormatter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.logs +package io.element.android.features.rageshake.impl.logs import java.io.PrintWriter import java.io.StringWriter diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/logs/VectorFileLogger.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/logs/VectorFileLogger.kt similarity index 98% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/logs/VectorFileLogger.kt rename to features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/logs/VectorFileLogger.kt index 5df72e29f7..eea6c1dbbf 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/logs/VectorFileLogger.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/logs/VectorFileLogger.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.logs +package io.element.android.features.rageshake.impl.logs import android.content.Context import android.util.Log diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesPresenter.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/preferences/DefaultRageshakePreferencesPresenter.kt similarity index 77% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesPresenter.kt rename to features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/preferences/DefaultRageshakePreferencesPresenter.kt index 119e37d5e5..82a411ec95 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesPresenter.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/preferences/DefaultRageshakePreferencesPresenter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.preferences +package io.element.android.features.rageshake.impl.preferences import androidx.compose.runtime.Composable import androidx.compose.runtime.MutableState @@ -22,17 +22,22 @@ import androidx.compose.runtime.collectAsState import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.saveable.rememberSaveable -import io.element.android.features.rageshake.rageshake.RageShake -import io.element.android.features.rageshake.rageshake.RageshakeDataStore -import io.element.android.libraries.architecture.Presenter +import com.squareup.anvil.annotations.ContributesBinding +import io.element.android.features.rageshake.api.preferences.RageshakePreferencesEvents +import io.element.android.features.rageshake.api.preferences.RageshakePreferencesPresenter +import io.element.android.features.rageshake.api.preferences.RageshakePreferencesState +import io.element.android.features.rageshake.api.rageshake.RageShake +import io.element.android.features.rageshake.api.rageshake.RageshakeDataStore +import io.element.android.libraries.di.AppScope import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch import javax.inject.Inject -class RageshakePreferencesPresenter @Inject constructor( +@ContributesBinding(AppScope::class) +class DefaultRageshakePreferencesPresenter @Inject constructor( private val rageshake: RageShake, private val rageshakeDataStore: RageshakeDataStore, -) : Presenter { +) : RageshakePreferencesPresenter { @Composable override fun present(): RageshakePreferencesState { diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/rageshake/DefaultRageShake.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/rageshake/DefaultRageShake.kt similarity index 92% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/rageshake/DefaultRageShake.kt rename to features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/rageshake/DefaultRageShake.kt index a0963000d8..1d9ff6ee5a 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/rageshake/DefaultRageShake.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/rageshake/DefaultRageShake.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.rageshake +package io.element.android.features.rageshake.impl.rageshake import android.content.Context import android.hardware.Sensor @@ -22,13 +22,14 @@ import android.hardware.SensorManager import androidx.core.content.getSystemService import com.squareup.anvil.annotations.ContributesBinding import com.squareup.seismic.ShakeDetector +import io.element.android.features.rageshake.api.rageshake.RageShake import io.element.android.libraries.di.AppScope import io.element.android.libraries.di.ApplicationContext import io.element.android.libraries.di.SingleIn import javax.inject.Inject @SingleIn(AppScope::class) -@ContributesBinding(AppScope::class, RageShake::class) +@ContributesBinding(scope = AppScope::class, boundType = RageShake::class) class DefaultRageShake @Inject constructor( @ApplicationContext context: Context, ) : ShakeDetector.Listener, RageShake { diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/rageshake/PreferencesRageshakeDataStore.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/rageshake/PreferencesRageshakeDataStore.kt similarity index 94% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/rageshake/PreferencesRageshakeDataStore.kt rename to features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/rageshake/PreferencesRageshakeDataStore.kt index 4643038536..2dc3f3e517 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/rageshake/PreferencesRageshakeDataStore.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/rageshake/PreferencesRageshakeDataStore.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.rageshake.rageshake +package io.element.android.features.rageshake.impl.rageshake import android.content.Context import androidx.datastore.core.DataStore @@ -24,6 +24,7 @@ import androidx.datastore.preferences.core.edit import androidx.datastore.preferences.core.floatPreferencesKey import androidx.datastore.preferences.preferencesDataStore import com.squareup.anvil.annotations.ContributesBinding +import io.element.android.features.rageshake.api.rageshake.RageshakeDataStore import io.element.android.libraries.core.bool.orTrue import io.element.android.libraries.di.AppScope import io.element.android.libraries.di.ApplicationContext diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/DefaultBugReporter.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/reporter/DefaultBugReporter.kt similarity index 97% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/DefaultBugReporter.kt rename to features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/reporter/DefaultBugReporter.kt index 7fd40fc786..27bae6ee72 100755 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/reporter/DefaultBugReporter.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/reporter/DefaultBugReporter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,17 +14,20 @@ * limitations under the License. */ -package io.element.android.features.rageshake.reporter +package io.element.android.features.rageshake.impl.reporter import android.content.Context import android.os.Build import androidx.core.net.toFile import androidx.core.net.toUri import com.squareup.anvil.annotations.ContributesBinding -import io.element.android.features.rageshake.R -import io.element.android.features.rageshake.crash.CrashDataStore -import io.element.android.features.rageshake.logs.VectorFileLogger -import io.element.android.features.rageshake.screenshot.ScreenshotHolder +import io.element.android.features.rageshake.api.reporter.BugReporter +import io.element.android.features.rageshake.api.reporter.BugReporterListener +import io.element.android.features.rageshake.api.reporter.ReportType +import io.element.android.features.rageshake.impl.R +import io.element.android.features.rageshake.api.crash.CrashDataStore +import io.element.android.features.rageshake.impl.logs.VectorFileLogger +import io.element.android.features.rageshake.api.screenshot.ScreenshotHolder import io.element.android.libraries.androidutils.file.compressFile import io.element.android.libraries.androidutils.file.safeDelete import io.element.android.libraries.core.coroutine.CoroutineDispatchers diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/screenshot/DefaultScreenshotHolder.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/screenshot/DefaultScreenshotHolder.kt similarity index 90% rename from features/rageshake/src/main/kotlin/io/element/android/features/rageshake/screenshot/DefaultScreenshotHolder.kt rename to features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/screenshot/DefaultScreenshotHolder.kt index 31eeac39a6..d61c7c8c01 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/screenshot/DefaultScreenshotHolder.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/screenshot/DefaultScreenshotHolder.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,13 @@ * limitations under the License. */ -package io.element.android.features.rageshake.screenshot +package io.element.android.features.rageshake.impl.screenshot import android.content.Context import android.graphics.Bitmap import androidx.core.net.toUri import com.squareup.anvil.annotations.ContributesBinding +import io.element.android.features.rageshake.api.screenshot.ScreenshotHolder import io.element.android.libraries.androidutils.bitmap.writeBitmap import io.element.android.libraries.androidutils.file.safeDelete import io.element.android.libraries.di.AppScope diff --git a/features/rageshake/src/main/res/values/strings.xml b/features/rageshake/impl/src/main/res/values/strings.xml similarity index 100% rename from features/rageshake/src/main/res/values/strings.xml rename to features/rageshake/impl/src/main/res/values/strings.xml diff --git a/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/bugreport/BugReportPresenterTest.kt b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt similarity index 97% rename from features/rageshake/src/test/kotlin/io/element/android/features/rageshake/bugreport/BugReportPresenterTest.kt rename to features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt index 93252c8891..1d87eb6306 100644 --- a/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/bugreport/BugReportPresenterTest.kt +++ b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt @@ -16,14 +16,14 @@ @file:OptIn(ExperimentalCoroutinesApi::class) -package io.element.android.features.rageshake.bugreport +package io.element.android.features.rageshake.impl.bugreport import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat -import io.element.android.features.rageshake.crash.ui.A_CRASH_DATA -import io.element.android.features.rageshake.crash.ui.FakeCrashDataStore +import io.element.android.features.rageshake.impl.crash.ui.A_CRASH_DATA +import io.element.android.features.rageshake.impl.crash.ui.FakeCrashDataStore import io.element.android.libraries.architecture.Async import io.element.android.libraries.matrix.test.A_FAILURE_REASON import kotlinx.coroutines.ExperimentalCoroutinesApi diff --git a/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/bugreport/FakeBugReporter.kt b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/FakeBugReporter.kt similarity index 88% rename from features/rageshake/src/test/kotlin/io/element/android/features/rageshake/bugreport/FakeBugReporter.kt rename to features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/FakeBugReporter.kt index 558edf0b15..dd5d3e76c7 100644 --- a/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/bugreport/FakeBugReporter.kt +++ b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/FakeBugReporter.kt @@ -14,11 +14,11 @@ * limitations under the License. */ -package io.element.android.features.rageshake.bugreport +package io.element.android.features.rageshake.impl.bugreport -import io.element.android.features.rageshake.reporter.BugReporter -import io.element.android.features.rageshake.reporter.BugReporterListener -import io.element.android.features.rageshake.reporter.ReportType +import io.element.android.features.rageshake.api.reporter.BugReporter +import io.element.android.features.rageshake.api.reporter.BugReporterListener +import io.element.android.features.rageshake.api.reporter.ReportType import io.element.android.libraries.matrix.test.A_FAILURE_REASON import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.delay diff --git a/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/bugreport/FakeScreenshotHolder.kt b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/FakeScreenshotHolder.kt similarity index 86% rename from features/rageshake/src/test/kotlin/io/element/android/features/rageshake/bugreport/FakeScreenshotHolder.kt rename to features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/FakeScreenshotHolder.kt index 14ece36a14..0ed7714287 100644 --- a/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/bugreport/FakeScreenshotHolder.kt +++ b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/FakeScreenshotHolder.kt @@ -14,10 +14,10 @@ * limitations under the License. */ -package io.element.android.features.rageshake.bugreport +package io.element.android.features.rageshake.impl.bugreport import android.graphics.Bitmap -import io.element.android.features.rageshake.screenshot.ScreenshotHolder +import io.element.android.features.rageshake.api.screenshot.ScreenshotHolder const val A_SCREENSHOT_URI = "file://content/uri" diff --git a/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionPresenterTest.kt b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/crash/ui/CrashDetectionPresenterTest.kt similarity index 82% rename from features/rageshake/src/test/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionPresenterTest.kt rename to features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/crash/ui/CrashDetectionPresenterTest.kt index 16a03eca86..3a47ab7797 100644 --- a/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionPresenterTest.kt +++ b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/crash/ui/CrashDetectionPresenterTest.kt @@ -16,12 +16,16 @@ @file:OptIn(ExperimentalCoroutinesApi::class) -package io.element.android.features.rageshake.crash.ui +package io.element.android.features.rageshake.impl.crash.ui import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat +import io.element.android.features.rageshake.api.crash.CrashDetectionEvents +import io.element.android.features.rageshake.impl.crash.DefaultCrashDetectionPresenter +import io.element.android.features.rageshake.test.crash.A_CRASH_DATA +import io.element.android.features.rageshake.test.crash.FakeCrashDataStore import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest import org.junit.Test @@ -29,7 +33,7 @@ import org.junit.Test class CrashDetectionPresenterTest { @Test fun `present - initial state no crash`() = runTest { - val presenter = CrashDetectionPresenter( + val presenter = DefaultCrashDetectionPresenter( FakeCrashDataStore() ) moleculeFlow(RecompositionClock.Immediate) { @@ -42,7 +46,7 @@ class CrashDetectionPresenterTest { @Test fun `present - initial state crash`() = runTest { - val presenter = CrashDetectionPresenter( + val presenter = DefaultCrashDetectionPresenter( FakeCrashDataStore(appHasCrashed = true) ) moleculeFlow(RecompositionClock.Immediate) { @@ -57,7 +61,7 @@ class CrashDetectionPresenterTest { @Test fun `present - reset app has crashed`() = runTest { - val presenter = CrashDetectionPresenter( + val presenter = DefaultCrashDetectionPresenter( FakeCrashDataStore(appHasCrashed = true) ) moleculeFlow(RecompositionClock.Immediate) { @@ -73,7 +77,7 @@ class CrashDetectionPresenterTest { @Test fun `present - reset all crash data`() = runTest { - val presenter = CrashDetectionPresenter( + val presenter = DefaultCrashDetectionPresenter( FakeCrashDataStore(appHasCrashed = true, crashData = A_CRASH_DATA) ) moleculeFlow(RecompositionClock.Immediate) { diff --git a/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionPresenterTest.kt b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/detection/RageshakeDetectionPresenterTest.kt similarity index 85% rename from features/rageshake/src/test/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionPresenterTest.kt rename to features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/detection/RageshakeDetectionPresenterTest.kt index 2993ab41f1..312671ccbe 100644 --- a/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionPresenterTest.kt +++ b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/detection/RageshakeDetectionPresenterTest.kt @@ -16,18 +16,19 @@ @file:OptIn(ExperimentalCoroutinesApi::class) -package io.element.android.features.rageshake.detection +package io.element.android.features.rageshake.impl.detection import android.graphics.Bitmap import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat -import io.element.android.features.rageshake.bugreport.FakeScreenshotHolder -import io.element.android.features.rageshake.preferences.FakeRageShake -import io.element.android.features.rageshake.preferences.FakeRageshakeDataStore -import io.element.android.features.rageshake.preferences.RageshakePreferencesPresenter -import io.element.android.features.rageshake.screenshot.ImageResult +import io.element.android.features.rageshake.api.detection.RageshakeDetectionEvents +import io.element.android.features.rageshake.api.screenshot.ImageResult +import io.element.android.features.rageshake.impl.bugreport.FakeScreenshotHolder +import io.element.android.features.rageshake.impl.preferences.DefaultRageshakePreferencesPresenter +import io.element.android.features.rageshake.test.rageshake.FakeRageShake +import io.element.android.features.rageshake.test.rageshake.FakeRageshakeDataStore import io.element.android.libraries.matrix.test.AN_EXCEPTION import io.mockk.mockk import kotlinx.coroutines.ExperimentalCoroutinesApi @@ -41,10 +42,10 @@ class RageshakeDetectionPresenterTest { val screenshotHolder = FakeScreenshotHolder(screenshotUri = null) val rageshake = FakeRageShake(isAvailableValue = true) val rageshakeDataStore = FakeRageshakeDataStore(isEnabled = true) - val presenter = RageshakeDetectionPresenter( + val presenter = DefaultRageshakeDetectionPresenter( screenshotHolder = screenshotHolder, rageShake = rageshake, - preferencesPresenter = RageshakePreferencesPresenter( + preferencesPresenter = DefaultRageshakePreferencesPresenter( rageshake = rageshake, rageshakeDataStore = rageshakeDataStore, ) @@ -65,10 +66,10 @@ class RageshakeDetectionPresenterTest { val screenshotHolder = FakeScreenshotHolder(screenshotUri = null) val rageshake = FakeRageShake(isAvailableValue = true) val rageshakeDataStore = FakeRageshakeDataStore(isEnabled = true) - val presenter = RageshakeDetectionPresenter( + val presenter = DefaultRageshakeDetectionPresenter( screenshotHolder = screenshotHolder, rageShake = rageshake, - preferencesPresenter = RageshakePreferencesPresenter( + preferencesPresenter = DefaultRageshakePreferencesPresenter( rageshake = rageshake, rageshakeDataStore = rageshakeDataStore, ) @@ -90,10 +91,10 @@ class RageshakeDetectionPresenterTest { val screenshotHolder = FakeScreenshotHolder(screenshotUri = null) val rageshake = FakeRageShake(isAvailableValue = true) val rageshakeDataStore = FakeRageshakeDataStore(isEnabled = true) - val presenter = RageshakeDetectionPresenter( + val presenter = DefaultRageshakeDetectionPresenter( screenshotHolder = screenshotHolder, rageShake = rageshake, - preferencesPresenter = RageshakePreferencesPresenter( + preferencesPresenter = DefaultRageshakePreferencesPresenter( rageshake = rageshake, rageshakeDataStore = rageshakeDataStore, ) @@ -124,10 +125,10 @@ class RageshakeDetectionPresenterTest { val screenshotHolder = FakeScreenshotHolder(screenshotUri = null) val rageshake = FakeRageShake(isAvailableValue = true) val rageshakeDataStore = FakeRageshakeDataStore(isEnabled = true) - val presenter = RageshakeDetectionPresenter( + val presenter = DefaultRageshakeDetectionPresenter( screenshotHolder = screenshotHolder, rageShake = rageshake, - preferencesPresenter = RageshakePreferencesPresenter( + preferencesPresenter = DefaultRageshakePreferencesPresenter( rageshake = rageshake, rageshakeDataStore = rageshakeDataStore, ) @@ -158,10 +159,10 @@ class RageshakeDetectionPresenterTest { val screenshotHolder = FakeScreenshotHolder(screenshotUri = null) val rageshake = FakeRageShake(isAvailableValue = true) val rageshakeDataStore = FakeRageshakeDataStore(isEnabled = true) - val presenter = RageshakeDetectionPresenter( + val presenter = DefaultRageshakeDetectionPresenter( screenshotHolder = screenshotHolder, rageShake = rageshake, - preferencesPresenter = RageshakePreferencesPresenter( + preferencesPresenter = DefaultRageshakePreferencesPresenter( rageshake = rageshake, rageshakeDataStore = rageshakeDataStore, ) diff --git a/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesPresenterTest.kt b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/preferences/RageshakePreferencesPresenterTest.kt similarity index 83% rename from features/rageshake/src/test/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesPresenterTest.kt rename to features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/preferences/RageshakePreferencesPresenterTest.kt index 17a46e8da6..e10e485d79 100644 --- a/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesPresenterTest.kt +++ b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/preferences/RageshakePreferencesPresenterTest.kt @@ -16,12 +16,16 @@ @file:OptIn(ExperimentalCoroutinesApi::class) -package io.element.android.features.rageshake.preferences +package io.element.android.features.rageshake.impl.preferences import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat +import io.element.android.features.rageshake.api.preferences.RageshakePreferencesEvents +import io.element.android.features.rageshake.test.rageshake.A_SENSITIVITY +import io.element.android.features.rageshake.test.rageshake.FakeRageShake +import io.element.android.features.rageshake.test.rageshake.FakeRageshakeDataStore import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest import org.junit.Test @@ -29,7 +33,7 @@ import org.junit.Test class RageshakePreferencesPresenterTest { @Test fun `present - initial state available`() = runTest { - val presenter = RageshakePreferencesPresenter( + val presenter = DefaultRageshakePreferencesPresenter( FakeRageShake(isAvailableValue = true), FakeRageshakeDataStore(isEnabled = true) ) @@ -45,7 +49,7 @@ class RageshakePreferencesPresenterTest { @Test fun `present - initial state not available`() = runTest { - val presenter = RageshakePreferencesPresenter( + val presenter = DefaultRageshakePreferencesPresenter( FakeRageShake(isAvailableValue = false), FakeRageshakeDataStore(isEnabled = true) ) @@ -61,7 +65,7 @@ class RageshakePreferencesPresenterTest { @Test fun `present - enable and disable`() = runTest { - val presenter = RageshakePreferencesPresenter( + val presenter = DefaultRageshakePreferencesPresenter( FakeRageShake(isAvailableValue = true), FakeRageshakeDataStore(isEnabled = true) ) @@ -80,7 +84,7 @@ class RageshakePreferencesPresenterTest { @Test fun `present - set sensitivity`() = runTest { - val presenter = RageshakePreferencesPresenter( + val presenter = DefaultRageshakePreferencesPresenter( FakeRageShake(isAvailableValue = true), FakeRageshakeDataStore(isEnabled = true) ) diff --git a/features/rageshake/proguard-rules.pro b/features/rageshake/proguard-rules.pro deleted file mode 100644 index ff59496d81..0000000000 --- a/features/rageshake/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle.kts. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/features/rageshake/src/main/AndroidManifest.xml b/features/rageshake/src/main/AndroidManifest.xml deleted file mode 100644 index 19db0c3d57..0000000000 --- a/features/rageshake/src/main/AndroidManifest.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - diff --git a/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/preferences/FakeRageshakeDataStore.kt b/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/preferences/FakeRageshakeDataStore.kt deleted file mode 100644 index 22c4ae4d4d..0000000000 --- a/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/preferences/FakeRageshakeDataStore.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2023 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.features.rageshake.preferences - -import io.element.android.features.rageshake.rageshake.RageshakeDataStore -import kotlinx.coroutines.flow.Flow -import kotlinx.coroutines.flow.MutableStateFlow - -class FakeRageshakeDataStore( - isEnabled: Boolean = true, - sensitivity: Float = A_SENSITIVITY, -) : RageshakeDataStore { - - private val isEnabledFlow = MutableStateFlow(isEnabled) - override fun isEnabled(): Flow = isEnabledFlow - - override suspend fun setIsEnabled(isEnabled: Boolean) { - isEnabledFlow.value = isEnabled - } - - private val sensitivityFlow = MutableStateFlow(sensitivity) - override fun sensitivity(): Flow = sensitivityFlow - - override suspend fun setSensitivity(sensitivity: Float) { - sensitivityFlow.value = sensitivity - } - - override suspend fun reset() = Unit -} diff --git a/features/rageshake/test/build.gradle.kts b/features/rageshake/test/build.gradle.kts new file mode 100644 index 0000000000..9317935797 --- /dev/null +++ b/features/rageshake/test/build.gradle.kts @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("io.element.android-library") +} + +android { + namespace = "io.element.android.features.rageshake.test" +} + +dependencies { + implementation(projects.features.rageshake.api) + implementation(libs.coroutines.core) +} diff --git a/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/crash/ui/FakeCrashDataStore.kt b/features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/crash/FakeCrashDataStore.kt similarity index 91% rename from features/rageshake/src/test/kotlin/io/element/android/features/rageshake/crash/ui/FakeCrashDataStore.kt rename to features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/crash/FakeCrashDataStore.kt index a757931d53..e12db31763 100644 --- a/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/crash/ui/FakeCrashDataStore.kt +++ b/features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/crash/FakeCrashDataStore.kt @@ -14,9 +14,9 @@ * limitations under the License. */ -package io.element.android.features.rageshake.crash.ui +package io.element.android.features.rageshake.test.crash -import io.element.android.features.rageshake.crash.CrashDataStore +import io.element.android.features.rageshake.api.crash.CrashDataStore import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableStateFlow diff --git a/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/preferences/FakeRageShake.kt b/features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/rageshake/FakeRageShake.kt similarity index 87% rename from features/rageshake/src/test/kotlin/io/element/android/features/rageshake/preferences/FakeRageShake.kt rename to features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/rageshake/FakeRageShake.kt index fbabdaac5d..d127c360cf 100644 --- a/features/rageshake/src/test/kotlin/io/element/android/features/rageshake/preferences/FakeRageShake.kt +++ b/features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/rageshake/FakeRageShake.kt @@ -14,11 +14,9 @@ * limitations under the License. */ -package io.element.android.features.rageshake.preferences +package io.element.android.features.rageshake.test.rageshake -import io.element.android.features.rageshake.rageshake.RageShake - -const val A_SENSITIVITY = 1f +import io.element.android.features.rageshake.api.rageshake.RageShake class FakeRageShake( private var isAvailableValue: Boolean = true diff --git a/features/preferences/src/test/kotlin/io/element/android/features/preferences/root/FakeRageshakeDataStore.kt b/features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/rageshake/FakeRageshakeDataStore.kt similarity index 91% rename from features/preferences/src/test/kotlin/io/element/android/features/preferences/root/FakeRageshakeDataStore.kt rename to features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/rageshake/FakeRageshakeDataStore.kt index 517d587bec..7bf15e982a 100644 --- a/features/preferences/src/test/kotlin/io/element/android/features/preferences/root/FakeRageshakeDataStore.kt +++ b/features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/rageshake/FakeRageshakeDataStore.kt @@ -14,9 +14,9 @@ * limitations under the License. */ -package io.element.android.features.preferences.root +package io.element.android.features.rageshake.test.rageshake -import io.element.android.features.rageshake.rageshake.RageshakeDataStore +import io.element.android.features.rageshake.api.rageshake.RageshakeDataStore import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableStateFlow diff --git a/appnav/src/test/kotlin/io/element/android/appnav/FakeScreenshotHolder.kt b/features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/screenshot/FakeScreenshotHolder.kt similarity index 87% rename from appnav/src/test/kotlin/io/element/android/appnav/FakeScreenshotHolder.kt rename to features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/screenshot/FakeScreenshotHolder.kt index a13acf1f1f..bb4d25737a 100644 --- a/appnav/src/test/kotlin/io/element/android/appnav/FakeScreenshotHolder.kt +++ b/features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/screenshot/FakeScreenshotHolder.kt @@ -14,10 +14,10 @@ * limitations under the License. */ -package io.element.android.appnav +package io.element.android.features.rageshake.test.screenshot import android.graphics.Bitmap -import io.element.android.features.rageshake.screenshot.ScreenshotHolder +import io.element.android.features.rageshake.api.screenshot.ScreenshotHolder const val A_SCREENSHOT_URI = "file://content/uri" diff --git a/features/roomlist/.gitignore b/features/roomlist/.gitignore deleted file mode 100644 index 42afabfd2a..0000000000 --- a/features/roomlist/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/features/roomlist/api/build.gradle.kts b/features/roomlist/api/build.gradle.kts new file mode 100644 index 0000000000..1dae32144f --- /dev/null +++ b/features/roomlist/api/build.gradle.kts @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("io.element.android-library") +} + +android { + namespace = "io.element.android.features.roomlist.api" +} + +dependencies { + implementation(projects.libraries.architecture) + implementation(projects.libraries.matrix.api) +} diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt b/features/roomlist/api/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt similarity index 100% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt rename to features/roomlist/api/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt diff --git a/features/roomlist/consumer-rules.pro b/features/roomlist/consumer-rules.pro deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/features/roomlist/build.gradle.kts b/features/roomlist/impl/build.gradle.kts similarity index 88% rename from features/roomlist/build.gradle.kts rename to features/roomlist/impl/build.gradle.kts index 42818cd056..acabf3c232 100644 --- a/features/roomlist/build.gradle.kts +++ b/features/roomlist/impl/build.gradle.kts @@ -20,10 +20,11 @@ plugins { id("io.element.android-compose-library") alias(libs.plugins.anvil) alias(libs.plugins.ksp) + id("kotlin-parcelize") } android { - namespace = "io.element.android.features.roomlist" + namespace = "io.element.android.features.roomlist.impl" } anvil { @@ -31,18 +32,20 @@ anvil { } dependencies { - anvil(projects.anvilcodegen) implementation(projects.anvilannotations) - + anvil(projects.anvilcodegen) implementation(projects.libraries.core) implementation(projects.libraries.architecture) implementation(projects.libraries.matrix.api) implementation(projects.libraries.matrixui) implementation(projects.libraries.designsystem) implementation(projects.libraries.elementresources) + implementation(projects.libraries.testtags) implementation(projects.libraries.uiStrings) implementation(projects.libraries.dateformatter.api) implementation(libs.accompanist.placeholder) + api(projects.features.roomlist.api) + ksp(libs.showkase.processor) testImplementation(libs.test.junit) testImplementation(libs.coroutines.test) @@ -50,9 +53,7 @@ dependencies { testImplementation(libs.test.truth) testImplementation(libs.test.turbine) testImplementation(projects.libraries.matrix.test) - implementation(projects.libraries.dateformatter.test) + testImplementation(projects.libraries.dateformatter.test) androidTestImplementation(libs.test.junitext) - - ksp(libs.showkase.processor) } diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/DefaultRoomListEntryPoint.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/DefaultRoomListEntryPoint.kt similarity index 100% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/DefaultRoomListEntryPoint.kt rename to features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/DefaultRoomListEntryPoint.kt diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListEvents.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListEvents.kt similarity index 100% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListEvents.kt rename to features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListEvents.kt diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListNode.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListNode.kt similarity index 100% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListNode.kt rename to features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListNode.kt diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListPresenter.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListPresenter.kt similarity index 100% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListPresenter.kt rename to features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListPresenter.kt diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListState.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListState.kt similarity index 100% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListState.kt rename to features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListState.kt diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt similarity index 100% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt rename to features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListView.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListView.kt similarity index 100% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListView.kt rename to features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListView.kt diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomListTopBar.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomListTopBar.kt similarity index 100% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomListTopBar.kt rename to features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomListTopBar.kt diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt similarity index 100% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt rename to features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt similarity index 100% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt rename to features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryPlaceholders.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryPlaceholders.kt similarity index 100% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryPlaceholders.kt rename to features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryPlaceholders.kt diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryProvider.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryProvider.kt similarity index 100% rename from features/roomlist/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryProvider.kt rename to features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryProvider.kt diff --git a/features/roomlist/src/test/kotlin/io/element/android/features/roomlist/RoomListPresenterTests.kt b/features/roomlist/impl/src/test/kotlin/io/element/android/features/roomlist/impl/RoomListPresenterTests.kt similarity index 68% rename from features/roomlist/src/test/kotlin/io/element/android/features/roomlist/RoomListPresenterTests.kt rename to features/roomlist/impl/src/test/kotlin/io/element/android/features/roomlist/impl/RoomListPresenterTests.kt index 30b4c8c893..41914a1d4e 100644 --- a/features/roomlist/src/test/kotlin/io/element/android/features/roomlist/RoomListPresenterTests.kt +++ b/features/roomlist/impl/src/test/kotlin/io/element/android/features/roomlist/impl/RoomListPresenterTests.kt @@ -14,31 +14,19 @@ * limitations under the License. */ -@file:OptIn(ExperimentalCoroutinesApi::class) - -package io.element.android.features.roomlist +package io.element.android.features.roomlist.impl import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow import app.cash.turbine.test -import com.google.common.truth.Truth.assertThat -import io.element.android.features.roomlist.impl.RoomListEvents -import io.element.android.features.roomlist.impl.RoomListPresenter +import com.google.common.truth.Truth import io.element.android.features.roomlist.impl.model.RoomListRoomSummary import io.element.android.libraries.dateformatter.api.LastMessageFormatter +import io.element.android.libraries.dateformatter.test.FakeLastMessageFormatter import io.element.android.libraries.designsystem.components.avatar.AvatarData -import io.element.android.libraries.matrix.test.AN_AVATAR_URL -import io.element.android.libraries.matrix.test.AN_EXCEPTION -import io.element.android.libraries.matrix.test.A_MESSAGE -import io.element.android.libraries.matrix.test.A_ROOM_ID -import io.element.android.libraries.matrix.test.A_ROOM_NAME -import io.element.android.libraries.matrix.test.A_SESSION_ID -import io.element.android.libraries.matrix.test.A_USER_ID -import io.element.android.libraries.matrix.test.A_USER_NAME -import io.element.android.libraries.matrix.test.FakeMatrixClient +import io.element.android.libraries.matrix.test.* import io.element.android.libraries.matrix.test.room.FakeRoomSummaryDataSource import io.element.android.libraries.matrix.test.room.aRoomSummaryFilled -import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest import org.junit.Test @@ -54,13 +42,13 @@ class RoomListPresenterTests { presenter.present() }.test { val initialState = awaitItem() - assertThat(initialState.matrixUser).isNull() + Truth.assertThat(initialState.matrixUser).isNull() val withUserState = awaitItem() - assertThat(withUserState.matrixUser).isNotNull() - assertThat(withUserState.matrixUser!!.id).isEqualTo(A_USER_ID) - assertThat(withUserState.matrixUser!!.username).isEqualTo(A_USER_NAME) - assertThat(withUserState.matrixUser!!.avatarData.name).isEqualTo(A_USER_NAME) - assertThat(withUserState.matrixUser!!.avatarData.url).isEqualTo(AN_AVATAR_URL) + Truth.assertThat(withUserState.matrixUser).isNotNull() + Truth.assertThat(withUserState.matrixUser!!.id).isEqualTo(A_USER_ID) + Truth.assertThat(withUserState.matrixUser!!.username).isEqualTo(A_USER_NAME) + Truth.assertThat(withUserState.matrixUser!!.avatarData.name).isEqualTo(A_USER_NAME) + Truth.assertThat(withUserState.matrixUser!!.avatarData.url).isEqualTo(AN_AVATAR_URL) } } @@ -78,11 +66,11 @@ class RoomListPresenterTests { presenter.present() }.test { val initialState = awaitItem() - assertThat(initialState.matrixUser).isNull() + Truth.assertThat(initialState.matrixUser).isNull() val withUserState = awaitItem() - assertThat(withUserState.matrixUser).isNotNull() + Truth.assertThat(withUserState.matrixUser).isNotNull() // username fallback to user id value - assertThat(withUserState.matrixUser!!.username).isEqualTo(A_USER_ID.value) + Truth.assertThat(withUserState.matrixUser!!.username).isEqualTo(A_USER_ID.value) } } @@ -97,10 +85,10 @@ class RoomListPresenterTests { }.test { skipItems(1) val withUserState = awaitItem() - assertThat(withUserState.filter).isEqualTo("") + Truth.assertThat(withUserState.filter).isEqualTo("") withUserState.eventSink.invoke(RoomListEvents.UpdateFilter("t")) val withFilterState = awaitItem() - assertThat(withFilterState.filter).isEqualTo("t") + Truth.assertThat(withFilterState.filter).isEqualTo("t") } } @@ -120,13 +108,14 @@ class RoomListPresenterTests { skipItems(1) val withUserState = awaitItem() // Room list is loaded with 16 placeholders - assertThat(withUserState.roomList.size).isEqualTo(16) - assertThat(withUserState.roomList.all { it.isPlaceholder }).isTrue() + Truth.assertThat(withUserState.roomList.size).isEqualTo(16) + Truth.assertThat(withUserState.roomList.all { it.isPlaceholder }).isTrue() roomSummaryDataSource.postRoomSummary(listOf(aRoomSummaryFilled())) skipItems(1) val withRoomState = awaitItem() - assertThat(withRoomState.roomList.size).isEqualTo(1) - assertThat(withRoomState.roomList.first()).isEqualTo(aRoomListRoomSummary) + Truth.assertThat(withRoomState.roomList.size).isEqualTo(1) + Truth.assertThat(withRoomState.roomList.first()) + .isEqualTo(aRoomListRoomSummary) } } @@ -149,15 +138,16 @@ class RoomListPresenterTests { // Test filtering with result loadedState.eventSink.invoke(RoomListEvents.UpdateFilter(A_ROOM_NAME.substring(0, 3))) val withNotFilteredRoomState = awaitItem() - assertThat(withNotFilteredRoomState.filter).isEqualTo(A_ROOM_NAME.substring(0, 3)) - assertThat(withNotFilteredRoomState.roomList.size).isEqualTo(1) - assertThat(withNotFilteredRoomState.roomList.first()).isEqualTo(aRoomListRoomSummary) + Truth.assertThat(withNotFilteredRoomState.filter).isEqualTo(A_ROOM_NAME.substring(0, 3)) + Truth.assertThat(withNotFilteredRoomState.roomList.size).isEqualTo(1) + Truth.assertThat(withNotFilteredRoomState.roomList.first()) + .isEqualTo(aRoomListRoomSummary) // Test filtering without result withNotFilteredRoomState.eventSink.invoke(RoomListEvents.UpdateFilter("tada")) skipItems(1) // Filter update val withFilteredRoomState = awaitItem() - assertThat(withFilteredRoomState.filter).isEqualTo("tada") - assertThat(withFilteredRoomState.roomList).isEmpty() + Truth.assertThat(withFilteredRoomState.filter).isEqualTo("tada") + Truth.assertThat(withFilteredRoomState.roomList).isEmpty() } } @@ -178,23 +168,29 @@ class RoomListPresenterTests { skipItems(3) val loadedState = awaitItem() // check initial value - assertThat(roomSummaryDataSource.latestSlidingSyncRange).isNull() + Truth.assertThat(roomSummaryDataSource.latestSlidingSyncRange).isNull() // Test empty range loadedState.eventSink.invoke(RoomListEvents.UpdateVisibleRange(IntRange(1, 0))) - assertThat(roomSummaryDataSource.latestSlidingSyncRange).isNull() + Truth.assertThat(roomSummaryDataSource.latestSlidingSyncRange).isNull() // Update visible range and check that range is transmitted to the SDK after computation loadedState.eventSink.invoke(RoomListEvents.UpdateVisibleRange(IntRange(0, 0))) - assertThat(roomSummaryDataSource.latestSlidingSyncRange).isEqualTo(IntRange(0, 20)) + Truth.assertThat(roomSummaryDataSource.latestSlidingSyncRange) + .isEqualTo(IntRange(0, 20)) loadedState.eventSink.invoke(RoomListEvents.UpdateVisibleRange(IntRange(0, 1))) - assertThat(roomSummaryDataSource.latestSlidingSyncRange).isEqualTo(IntRange(0, 21)) + Truth.assertThat(roomSummaryDataSource.latestSlidingSyncRange) + .isEqualTo(IntRange(0, 21)) loadedState.eventSink.invoke(RoomListEvents.UpdateVisibleRange(IntRange(19, 29))) - assertThat(roomSummaryDataSource.latestSlidingSyncRange).isEqualTo(IntRange(0, 49)) + Truth.assertThat(roomSummaryDataSource.latestSlidingSyncRange) + .isEqualTo(IntRange(0, 49)) loadedState.eventSink.invoke(RoomListEvents.UpdateVisibleRange(IntRange(49, 59))) - assertThat(roomSummaryDataSource.latestSlidingSyncRange).isEqualTo(IntRange(29, 79)) + Truth.assertThat(roomSummaryDataSource.latestSlidingSyncRange) + .isEqualTo(IntRange(29, 79)) loadedState.eventSink.invoke(RoomListEvents.UpdateVisibleRange(IntRange(149, 159))) - assertThat(roomSummaryDataSource.latestSlidingSyncRange).isEqualTo(IntRange(129, 179)) + Truth.assertThat(roomSummaryDataSource.latestSlidingSyncRange) + .isEqualTo(IntRange(129, 179)) loadedState.eventSink.invoke(RoomListEvents.UpdateVisibleRange(IntRange(149, 259))) - assertThat(roomSummaryDataSource.latestSlidingSyncRange).isEqualTo(IntRange(129, 279)) + Truth.assertThat(roomSummaryDataSource.latestSlidingSyncRange) + .isEqualTo(IntRange(129, 279)) } } @@ -217,3 +213,4 @@ private val aRoomListRoomSummary = RoomListRoomSummary( avatarData = AvatarData(id = A_ROOM_ID.value, name = A_ROOM_NAME), isPlaceholder = false, ) + diff --git a/features/roomlist/proguard-rules.pro b/features/roomlist/proguard-rules.pro deleted file mode 100644 index 481bb43481..0000000000 --- a/features/roomlist/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/features/roomlist/src/androidTest/kotlin/io/element/android/features/roomlist/ExampleInstrumentedTest.kt b/features/roomlist/src/androidTest/kotlin/io/element/android/features/roomlist/ExampleInstrumentedTest.kt deleted file mode 100644 index e66201078b..0000000000 --- a/features/roomlist/src/androidTest/kotlin/io/element/android/features/roomlist/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2022 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.features.roomlist - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import org.junit.Assert.assertEquals -import org.junit.Test -import org.junit.runner.RunWith - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("io.element.android.features.roomlist.test", appContext.packageName) - } -} diff --git a/features/roomlist/src/main/AndroidManifest.xml b/features/roomlist/src/main/AndroidManifest.xml deleted file mode 100644 index 19db0c3d57..0000000000 --- a/features/roomlist/src/main/AndroidManifest.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - diff --git a/libraries/dateformatter/test/build.gradle.kts b/libraries/dateformatter/test/build.gradle.kts index afc7e66059..0364afcf00 100644 --- a/libraries/dateformatter/test/build.gradle.kts +++ b/libraries/dateformatter/test/build.gradle.kts @@ -24,7 +24,7 @@ android { namespace = "io.element.android.libraries.dateformatter.test" dependencies { - implementation(projects.libraries.dateformatter.api) + api(projects.libraries.dateformatter.api) api(libs.datetime) } } diff --git a/features/roomlist/src/test/kotlin/io/element/android/features/roomlist/FakeLastMessageFormatter.kt b/libraries/dateformatter/test/src/main/kotlin/io/element/android/libraries/dateformatter/test/FakeLastMessageFormatter.kt similarity index 94% rename from features/roomlist/src/test/kotlin/io/element/android/features/roomlist/FakeLastMessageFormatter.kt rename to libraries/dateformatter/test/src/main/kotlin/io/element/android/libraries/dateformatter/test/FakeLastMessageFormatter.kt index 0040b9f480..539da5e6ac 100644 --- a/features/roomlist/src/test/kotlin/io/element/android/features/roomlist/FakeLastMessageFormatter.kt +++ b/libraries/dateformatter/test/src/main/kotlin/io/element/android/libraries/dateformatter/test/FakeLastMessageFormatter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.roomlist +package io.element.android.libraries.dateformatter.test import io.element.android.libraries.dateformatter.api.LastMessageFormatter diff --git a/plugins/src/main/kotlin/extension/DependencyHandleScope.kt b/plugins/src/main/kotlin/extension/DependencyHandleScope.kt index 1bd6048ea2..d2d84f835b 100644 --- a/plugins/src/main/kotlin/extension/DependencyHandleScope.kt +++ b/plugins/src/main/kotlin/extension/DependencyHandleScope.kt @@ -60,11 +60,11 @@ fun DependencyHandlerScope.allLibraries() { } fun DependencyHandlerScope.allFeatures() { - implementation(project(":features:onboarding")) - implementation(project(":features:login")) - implementation(project(":features:logout")) - implementation(project(":features:roomlist")) + implementation(project(":features:onboarding:impl")) + implementation(project(":features:login:impl")) + implementation(project(":features:logout:impl")) + implementation(project(":features:roomlist:impl")) implementation(project(":features:messages:impl")) - implementation(project(":features:rageshake")) - implementation(project(":features:preferences")) + implementation(project(":features:rageshake:impl")) + implementation(project(":features:preferences:impl")) } diff --git a/settings.gradle.kts b/settings.gradle.kts index 60680c5eb6..55bc4c0ad9 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -51,12 +51,6 @@ include(":libraries:dateformatter:test") include(":libraries:elementresources") include(":libraries:ui-strings") include(":libraries:testtags") -include(":features:onboarding") -include(":features:login") -include(":features:logout") -include(":features:roomlist") -include(":features:rageshake") -include(":features:preferences") include(":libraries:designsystem") include(":libraries:di") include(":tests:uitests") @@ -66,10 +60,24 @@ include(":libraries:architecture") include(":features:template") include(":libraries:androidutils") include(":samples:minimal") -include(":features:messages") -include(":features:messages:api") -include(":features:messages:impl") include(":libraries:encrypted-db") include(":libraries:session-storage:api") include(":libraries:session-storage:impl") include(":libraries:session-storage:impl-memory") + +include(":features:onboarding:api") +include(":features:onboarding:impl") +include(":features:logout:api") +include(":features:logout:impl") +include(":features:roomlist:api") +include(":features:roomlist:impl") +include(":features:rageshake:api") +include(":features:rageshake:impl") +include(":features:rageshake:test") +include(":features:preferences:api") +include(":features:preferences:impl") +include(":features:messages:api") +include(":features:messages:impl") +include(":features:login:api") +include(":features:login:impl") + From b07e0e62b1751c16055ab03608a29bdd73fa2e7f Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 9 Mar 2023 10:18:25 +0100 Subject: [PATCH 14/25] [Architecture] clean and makes compile --- .../features/roomlist/impl/RoomListPresenterTests.kt | 10 +++++++++- libraries/dateformatter/impl/build.gradle.kts | 2 +- samples/minimal/build.gradle.kts | 5 ++--- settings.gradle.kts | 1 - 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/features/roomlist/impl/src/test/kotlin/io/element/android/features/roomlist/impl/RoomListPresenterTests.kt b/features/roomlist/impl/src/test/kotlin/io/element/android/features/roomlist/impl/RoomListPresenterTests.kt index 41914a1d4e..02ef4fc89b 100644 --- a/features/roomlist/impl/src/test/kotlin/io/element/android/features/roomlist/impl/RoomListPresenterTests.kt +++ b/features/roomlist/impl/src/test/kotlin/io/element/android/features/roomlist/impl/RoomListPresenterTests.kt @@ -24,7 +24,15 @@ import io.element.android.features.roomlist.impl.model.RoomListRoomSummary import io.element.android.libraries.dateformatter.api.LastMessageFormatter import io.element.android.libraries.dateformatter.test.FakeLastMessageFormatter import io.element.android.libraries.designsystem.components.avatar.AvatarData -import io.element.android.libraries.matrix.test.* +import io.element.android.libraries.matrix.test.AN_AVATAR_URL +import io.element.android.libraries.matrix.test.AN_EXCEPTION +import io.element.android.libraries.matrix.test.A_MESSAGE +import io.element.android.libraries.matrix.test.A_ROOM_ID +import io.element.android.libraries.matrix.test.A_ROOM_NAME +import io.element.android.libraries.matrix.test.A_SESSION_ID +import io.element.android.libraries.matrix.test.A_USER_ID +import io.element.android.libraries.matrix.test.A_USER_NAME +import io.element.android.libraries.matrix.test.FakeMatrixClient import io.element.android.libraries.matrix.test.room.FakeRoomSummaryDataSource import io.element.android.libraries.matrix.test.room.aRoomSummaryFilled import kotlinx.coroutines.test.runTest diff --git a/libraries/dateformatter/impl/build.gradle.kts b/libraries/dateformatter/impl/build.gradle.kts index 3e7f698c1f..9815a40714 100644 --- a/libraries/dateformatter/impl/build.gradle.kts +++ b/libraries/dateformatter/impl/build.gradle.kts @@ -35,7 +35,7 @@ android { implementation(projects.libraries.di) implementation(projects.anvilannotations) - implementation(projects.libraries.dateformatter.api) + api(projects.libraries.dateformatter.api) api(libs.datetime) testImplementation(libs.test.junit) diff --git a/samples/minimal/build.gradle.kts b/samples/minimal/build.gradle.kts index a7da2a94c8..47f5675a07 100644 --- a/samples/minimal/build.gradle.kts +++ b/samples/minimal/build.gradle.kts @@ -53,10 +53,9 @@ dependencies { implementation(projects.libraries.designsystem) implementation(projects.libraries.architecture) implementation(projects.libraries.core) - implementation(projects.libraries.dateformatter.api) implementation(projects.libraries.dateformatter.impl) - implementation(projects.features.roomlist) - implementation(projects.features.login) + implementation(projects.features.roomlist.impl) + implementation(projects.features.login.impl) implementation(libs.coroutines.core) coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.2") } diff --git a/settings.gradle.kts b/settings.gradle.kts index 55bc4c0ad9..5edb63e6b0 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -80,4 +80,3 @@ include(":features:messages:api") include(":features:messages:impl") include(":features:login:api") include(":features:login:impl") - From c5c39dc40a4bd3c0d970d433084c382ad52f9b7f Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 9 Mar 2023 10:37:17 +0100 Subject: [PATCH 15/25] [Architecture] fix compile and rename LoginRootScreen -> LoginRootView --- .../android/features/login/impl/root/LoginRootNode.kt | 4 +--- .../impl/root/{LoginRootScreen.kt => LoginRootView.kt} | 6 +++--- .../io/element/android/samples/minimal/LoginScreen.kt | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) rename features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/{LoginRootScreen.kt => LoginRootView.kt} (99%) diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootNode.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootNode.kt index 43070ba0da..fce214f2e4 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootNode.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootNode.kt @@ -18,7 +18,6 @@ package io.element.android.features.login.impl.root import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.lifecycle.Lifecycle import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.plugin.Plugin @@ -26,7 +25,6 @@ import com.bumble.appyx.core.plugin.plugins import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode -import io.element.android.libraries.designsystem.utils.OnLifecycleEvent import io.element.android.libraries.di.AppScope @ContributesNode(AppScope::class) @@ -47,7 +45,7 @@ class LoginRootNode @AssistedInject constructor( @Composable override fun View(modifier: Modifier) { val state = presenter.present() - LoginRootScreen( + LoginRootView( state = state, modifier = modifier, onChangeServer = this::onChangeHomeServer, diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootScreen.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootView.kt similarity index 99% rename from features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootScreen.kt rename to features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootView.kt index 781652ae0e..c82cff1721 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootScreen.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/root/LoginRootView.kt @@ -62,7 +62,7 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp -import io.element.android.features.login.error.loginError +import io.element.android.features.login.impl.error.loginError import io.element.android.libraries.designsystem.ElementTextStyles import io.element.android.libraries.designsystem.components.dialogs.ErrorDialog import io.element.android.libraries.designsystem.components.form.textFieldState @@ -85,7 +85,7 @@ import io.element.android.libraries.ui.strings.R as StringR @OptIn(ExperimentalMaterial3Api::class) @Composable -fun LoginRootScreen( +fun LoginRootView( state: LoginRootState, modifier: Modifier = Modifier, onChangeServer: () -> Unit = {}, @@ -349,7 +349,7 @@ internal fun LoginRootScreenDarkPreview(@PreviewParameter(LoginRootStateProvider @Composable private fun ContentToPreview(state: LoginRootState) { - LoginRootScreen( + LoginRootView( state = state, onBackPressed = {} ) diff --git a/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/LoginScreen.kt b/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/LoginScreen.kt index 4eb80e6120..e7ea426a65 100644 --- a/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/LoginScreen.kt +++ b/samples/minimal/src/main/kotlin/io/element/android/samples/minimal/LoginScreen.kt @@ -20,7 +20,7 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import io.element.android.features.login.impl.root.LoginRootPresenter -import io.element.android.features.login.impl.root.LoginRootScreen +import io.element.android.features.login.impl.root.LoginRootView import io.element.android.libraries.matrix.api.auth.MatrixAuthenticationService class LoginScreen(private val authenticationService: MatrixAuthenticationService) { @@ -31,7 +31,7 @@ class LoginScreen(private val authenticationService: MatrixAuthenticationService LoginRootPresenter(authenticationService = authenticationService) } val state = presenter.present() - LoginRootScreen( + LoginRootView( state = state, modifier = modifier, onBackPressed = {}, From cf74fadb19ad9d9d747eb3a0ad71b18dcff49d31 Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 9 Mar 2023 11:25:46 +0100 Subject: [PATCH 16/25] [Architecture] Fix unittest compilation --- .../rageshake/impl/bugreport/BugReportPresenterTest.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt index 1d87eb6306..9869698703 100644 --- a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt +++ b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt @@ -22,8 +22,8 @@ import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat -import io.element.android.features.rageshake.impl.crash.ui.A_CRASH_DATA -import io.element.android.features.rageshake.impl.crash.ui.FakeCrashDataStore +import io.element.android.features.rageshake.test.crash.A_CRASH_DATA +import io.element.android.features.rageshake.test.crash.FakeCrashDataStore import io.element.android.libraries.architecture.Async import io.element.android.libraries.matrix.test.A_FAILURE_REASON import kotlinx.coroutines.ExperimentalCoroutinesApi From 335b99b567f2f13dfb3c935dfeb62b3eb634e4b0 Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 9 Mar 2023 11:40:07 +0100 Subject: [PATCH 17/25] [Architecture] remove unused drawable file --- .../res/drawable/bg_gradient_ftue_breaker.xml | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100644 features/onboarding/impl/src/main/res/drawable/bg_gradient_ftue_breaker.xml diff --git a/features/onboarding/impl/src/main/res/drawable/bg_gradient_ftue_breaker.xml b/features/onboarding/impl/src/main/res/drawable/bg_gradient_ftue_breaker.xml deleted file mode 100644 index a03a34bd35..0000000000 --- a/features/onboarding/impl/src/main/res/drawable/bg_gradient_ftue_breaker.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - From 184a68b637bece117a72674475bea28b837fd8c8 Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 9 Mar 2023 12:31:30 +0100 Subject: [PATCH 18/25] [Architecture] split createroom feature module --- appnav/build.gradle.kts | 2 +- .../android/appnav/LoggedInFlowNode.kt | 5 +-- features/createroom/.gitignore | 1 - features/createroom/api/build.gradle.kts | 27 ++++++++++++++++ .../createroom/api/CreateRoomEntryPoint.kt | 21 ++++++++++++ features/createroom/consumer-rules.pro | 0 .../createroom/{ => impl}/build.gradle.kts | 13 ++++++-- .../createroom/impl}/CreateRoomFlowNode.kt | 25 +++++++++------ .../impl/DefaultCreateRoomEntryPoint.kt | 32 +++++++++++++++++++ .../impl}/root/CreateRoomRootEvents.kt | 2 +- .../impl}/root/CreateRoomRootNode.kt | 2 +- .../impl}/root/CreateRoomRootPresenter.kt | 2 +- .../impl}/root/CreateRoomRootScreen.kt | 2 +- .../impl}/root/CreateRoomRootState.kt | 2 +- .../impl}/root/CreateRoomRootStateProvider.kt | 2 +- .../root/CreateRoomRootPresenterTests.kt | 4 ++- features/createroom/proguard-rules.pro | 21 ------------ .../createroom/src/main/AndroidManifest.xml | 20 ------------ .../kotlin/extension/DependencyHandleScope.kt | 2 +- settings.gradle.kts | 3 +- 20 files changed, 122 insertions(+), 66 deletions(-) delete mode 100644 features/createroom/.gitignore create mode 100644 features/createroom/api/build.gradle.kts create mode 100644 features/createroom/api/src/main/kotlin/io/element/android/features/createroom/api/CreateRoomEntryPoint.kt delete mode 100644 features/createroom/consumer-rules.pro rename features/createroom/{ => impl}/build.gradle.kts (87%) rename features/createroom/{src/main/kotlin/io/element/android/features/createroom => impl/src/main/kotlin/io/element/android/features/createroom/impl}/CreateRoomFlowNode.kt (70%) create mode 100644 features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/DefaultCreateRoomEntryPoint.kt rename features/createroom/{src/main/kotlin/io/element/android/features/createroom => impl/src/main/kotlin/io/element/android/features/createroom/impl}/root/CreateRoomRootEvents.kt (92%) rename features/createroom/{src/main/kotlin/io/element/android/features/createroom => impl/src/main/kotlin/io/element/android/features/createroom/impl}/root/CreateRoomRootNode.kt (96%) rename features/createroom/{src/main/kotlin/io/element/android/features/createroom => impl/src/main/kotlin/io/element/android/features/createroom/impl}/root/CreateRoomRootPresenter.kt (95%) rename features/createroom/{src/main/kotlin/io/element/android/features/createroom => impl/src/main/kotlin/io/element/android/features/createroom/impl}/root/CreateRoomRootScreen.kt (99%) rename features/createroom/{src/main/kotlin/io/element/android/features/createroom => impl/src/main/kotlin/io/element/android/features/createroom/impl}/root/CreateRoomRootState.kt (93%) rename features/createroom/{src/main/kotlin/io/element/android/features/createroom => impl/src/main/kotlin/io/element/android/features/createroom/impl}/root/CreateRoomRootStateProvider.kt (94%) rename features/createroom/{src/test/kotlin/io/element/android/features/createroom => impl/src/test/kotlin/io/element/android/features/createroom/impl}/root/CreateRoomRootPresenterTests.kt (88%) delete mode 100644 features/createroom/proguard-rules.pro delete mode 100644 features/createroom/src/main/AndroidManifest.xml diff --git a/appnav/build.gradle.kts b/appnav/build.gradle.kts index e201d0817b..77f4690793 100644 --- a/appnav/build.gradle.kts +++ b/appnav/build.gradle.kts @@ -43,7 +43,7 @@ dependencies { implementation(projects.features.preferences.api) implementation(projects.features.logout.api) implementation(projects.features.onboarding.api) - implementation(projects.features.createroom) + implementation(projects.features.createroom.api) implementation(projects.libraries.core) implementation(projects.libraries.architecture) diff --git a/appnav/src/main/kotlin/io/element/android/appnav/LoggedInFlowNode.kt b/appnav/src/main/kotlin/io/element/android/appnav/LoggedInFlowNode.kt index 74f39105ad..d86d302ac7 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/LoggedInFlowNode.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/LoggedInFlowNode.kt @@ -35,7 +35,7 @@ import com.bumble.appyx.navmodel.backstack.operation.push import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode -import io.element.android.features.createroom.CreateRoomFlowNode +import io.element.android.features.createroom.api.CreateRoomEntryPoint import io.element.android.features.preferences.api.PreferencesEntryPoint import io.element.android.features.roomlist.api.RoomListEntryPoint import io.element.android.libraries.architecture.BackstackNode @@ -57,6 +57,7 @@ class LoggedInFlowNode @AssistedInject constructor( @Assisted plugins: List, private val roomListEntryPoint: RoomListEntryPoint, private val preferencesEntryPoint: PreferencesEntryPoint, + private val createRoomEntryPoint: CreateRoomEntryPoint, ) : BackstackNode( backstack = BackStack( initialElement = NavTarget.RoomList, @@ -160,7 +161,7 @@ class LoggedInFlowNode @AssistedInject constructor( .build() } NavTarget.CreateRoom -> { - CreateRoomFlowNode(buildContext) + createRoomEntryPoint.createNode(this, buildContext) } } } diff --git a/features/createroom/.gitignore b/features/createroom/.gitignore deleted file mode 100644 index 42afabfd2a..0000000000 --- a/features/createroom/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/features/createroom/api/build.gradle.kts b/features/createroom/api/build.gradle.kts new file mode 100644 index 0000000000..b3fceedc27 --- /dev/null +++ b/features/createroom/api/build.gradle.kts @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("io.element.android-library") +} + +android { + namespace = "io.element.android.features.createroom.api" +} + +dependencies { + implementation(projects.libraries.architecture) +} diff --git a/features/createroom/api/src/main/kotlin/io/element/android/features/createroom/api/CreateRoomEntryPoint.kt b/features/createroom/api/src/main/kotlin/io/element/android/features/createroom/api/CreateRoomEntryPoint.kt new file mode 100644 index 0000000000..049c101806 --- /dev/null +++ b/features/createroom/api/src/main/kotlin/io/element/android/features/createroom/api/CreateRoomEntryPoint.kt @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.createroom.api + +import io.element.android.libraries.architecture.SimpleFeatureEntryPoint + +interface CreateRoomEntryPoint : SimpleFeatureEntryPoint diff --git a/features/createroom/consumer-rules.pro b/features/createroom/consumer-rules.pro deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/features/createroom/build.gradle.kts b/features/createroom/impl/build.gradle.kts similarity index 87% rename from features/createroom/build.gradle.kts rename to features/createroom/impl/build.gradle.kts index 0450de2c3d..dc7eaded75 100644 --- a/features/createroom/build.gradle.kts +++ b/features/createroom/impl/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 New Vector Ltd + * Copyright (c) 2022 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,13 +18,19 @@ @Suppress("DSL_SCOPE_VIOLATION") plugins { id("io.element.android-compose-library") - alias(libs.plugins.ksp) alias(libs.plugins.anvil) + alias(libs.plugins.ksp) id("kotlin-parcelize") } android { - namespace = "io.element.android.features.createroom" + namespace = "io.element.android.features.createroom.impl" + + testOptions { + unitTests { + isIncludeAndroidResources = true + } + } } anvil { @@ -42,6 +48,7 @@ dependencies { implementation(projects.libraries.designsystem) implementation(projects.libraries.elementresources) implementation(projects.libraries.uiStrings) + api(projects.features.createroom.api) testImplementation(libs.test.junit) testImplementation(libs.coroutines.test) diff --git a/features/createroom/src/main/kotlin/io/element/android/features/createroom/CreateRoomFlowNode.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/CreateRoomFlowNode.kt similarity index 70% rename from features/createroom/src/main/kotlin/io/element/android/features/createroom/CreateRoomFlowNode.kt rename to features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/CreateRoomFlowNode.kt index 408fe0cb44..618eda0166 100644 --- a/features/createroom/src/main/kotlin/io/element/android/features/createroom/CreateRoomFlowNode.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/CreateRoomFlowNode.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.createroom +package io.element.android.features.createroom.impl import android.os.Parcelable import androidx.compose.runtime.Composable @@ -22,22 +22,29 @@ import androidx.compose.ui.Modifier import com.bumble.appyx.core.composable.Children import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node -import com.bumble.appyx.core.node.ParentNode +import com.bumble.appyx.core.plugin.Plugin import com.bumble.appyx.navmodel.backstack.BackStack -import io.element.android.features.createroom.root.CreateRoomRootNode +import dagger.assisted.Assisted +import dagger.assisted.AssistedInject +import io.element.android.anvilannotations.ContributesNode +import io.element.android.features.createroom.impl.root.CreateRoomRootNode +import io.element.android.libraries.architecture.BackstackNode import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler import io.element.android.libraries.architecture.createNode +import io.element.android.libraries.di.SessionScope import kotlinx.parcelize.Parcelize -class CreateRoomFlowNode( - buildContext: BuildContext, - private val backstack: BackStack = BackStack( +@ContributesNode(SessionScope::class) +class CreateRoomFlowNode @AssistedInject constructor( + @Assisted buildContext: BuildContext, + @Assisted plugins: List, +) : BackstackNode( + backstack = BackStack( initialElement = NavTarget.Root, savedStateMap = buildContext.savedStateMap, ), -) : ParentNode( - navModel = backstack, - buildContext = buildContext + buildContext = buildContext, + plugins = plugins ) { sealed interface NavTarget : Parcelable { diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/DefaultCreateRoomEntryPoint.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/DefaultCreateRoomEntryPoint.kt new file mode 100644 index 0000000000..214ed3a9ec --- /dev/null +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/DefaultCreateRoomEntryPoint.kt @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.features.createroom.impl + +import com.bumble.appyx.core.modality.BuildContext +import com.bumble.appyx.core.node.Node +import com.squareup.anvil.annotations.ContributesBinding +import io.element.android.features.createroom.api.CreateRoomEntryPoint +import io.element.android.libraries.architecture.createNode +import io.element.android.libraries.di.AppScope +import javax.inject.Inject + +@ContributesBinding(AppScope::class) +class DefaultCreateRoomEntryPoint @Inject constructor() : CreateRoomEntryPoint { + override fun createNode(parentNode: Node, buildContext: BuildContext): Node { + return parentNode.createNode(buildContext) + } +} diff --git a/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootEvents.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootEvents.kt similarity index 92% rename from features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootEvents.kt rename to features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootEvents.kt index 820d071866..2159caf0aa 100644 --- a/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootEvents.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootEvents.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.createroom.root +package io.element.android.features.createroom.impl.root sealed interface CreateRoomRootEvents { object CreateRoom : CreateRoomRootEvents diff --git a/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootNode.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootNode.kt similarity index 96% rename from features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootNode.kt rename to features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootNode.kt index 8d3d41b434..de7893e2e3 100644 --- a/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootNode.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootNode.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.createroom.root +package io.element.android.features.createroom.impl.root import android.os.Parcelable import androidx.compose.runtime.Composable diff --git a/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootPresenter.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootPresenter.kt similarity index 95% rename from features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootPresenter.kt rename to features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootPresenter.kt index ad93d9143d..6ff99f421c 100644 --- a/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootPresenter.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootPresenter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.createroom.root +package io.element.android.features.createroom.impl.root import androidx.compose.runtime.Composable import io.element.android.libraries.architecture.Presenter diff --git a/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootScreen.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootScreen.kt similarity index 99% rename from features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootScreen.kt rename to features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootScreen.kt index 889207265e..33e6d2b711 100644 --- a/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootScreen.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootScreen.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.createroom.root +package io.element.android.features.createroom.impl.root import androidx.annotation.DrawableRes import androidx.compose.foundation.clickable diff --git a/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootState.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootState.kt similarity index 93% rename from features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootState.kt rename to features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootState.kt index 9793cd950e..3e47b322b7 100644 --- a/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootState.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootState.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.createroom.root +package io.element.android.features.createroom.impl.root // TODO add your ui models. Remove the eventSink if you don't have events. // Do not use default value, so no member get forgotten in the presenters. diff --git a/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootStateProvider.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootStateProvider.kt similarity index 94% rename from features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootStateProvider.kt rename to features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootStateProvider.kt index b5ff38bcec..4c3049d32f 100644 --- a/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootStateProvider.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootStateProvider.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.createroom.root +package io.element.android.features.createroom.impl.root import androidx.compose.ui.tooling.preview.PreviewParameterProvider diff --git a/features/createroom/src/test/kotlin/io/element/android/features/createroom/root/CreateRoomRootPresenterTests.kt b/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootPresenterTests.kt similarity index 88% rename from features/createroom/src/test/kotlin/io/element/android/features/createroom/root/CreateRoomRootPresenterTests.kt rename to features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootPresenterTests.kt index c03b48efa8..e6c9155d88 100644 --- a/features/createroom/src/test/kotlin/io/element/android/features/createroom/root/CreateRoomRootPresenterTests.kt +++ b/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootPresenterTests.kt @@ -16,12 +16,14 @@ @file:OptIn(ExperimentalCoroutinesApi::class) -package io.element.android.features.createroom.root +package io.element.android.features.createroom.impl.root import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat +import io.element.android.features.createroom.impl.root.CreateRoomRootEvents +import io.element.android.features.createroom.impl.root.CreateRoomRootPresenter import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest import org.junit.Test diff --git a/features/createroom/proguard-rules.pro b/features/createroom/proguard-rules.pro deleted file mode 100644 index 481bb43481..0000000000 --- a/features/createroom/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/features/createroom/src/main/AndroidManifest.xml b/features/createroom/src/main/AndroidManifest.xml deleted file mode 100644 index 86d497f107..0000000000 --- a/features/createroom/src/main/AndroidManifest.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - diff --git a/plugins/src/main/kotlin/extension/DependencyHandleScope.kt b/plugins/src/main/kotlin/extension/DependencyHandleScope.kt index 565df12d80..812b281ffd 100644 --- a/plugins/src/main/kotlin/extension/DependencyHandleScope.kt +++ b/plugins/src/main/kotlin/extension/DependencyHandleScope.kt @@ -69,5 +69,5 @@ fun DependencyHandlerScope.allFeatures() { implementation(project(":features:messages:impl")) implementation(project(":features:rageshake:impl")) implementation(project(":features:preferences:impl")) - implementation(project(":features:createroom")) + implementation(project(":features:createroom:impl")) } diff --git a/settings.gradle.kts b/settings.gradle.kts index 709e491e56..c975591405 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -80,4 +80,5 @@ include(":features:messages:api") include(":features:messages:impl") include(":features:login:api") include(":features:login:impl") -include(":features:createroom") +include(":features:createroom:api") +include(":features:createroom:impl") From 699e8163286492091f41f61fbc59335091f81b34 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 9 Mar 2023 14:16:48 +0100 Subject: [PATCH 19/25] Remove duplicated Fake class. --- .../impl/bugreport/BugReportPresenterTest.kt | 2 ++ .../impl/bugreport/FakeScreenshotHolder.kt | 30 ------------------- .../test/rageshake/FakeRageshakeDataStore.kt | 1 - .../test/screenshot/FakeScreenshotHolder.kt | 1 - 4 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/FakeScreenshotHolder.kt diff --git a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt index 9869698703..93ed963543 100644 --- a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt +++ b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt @@ -24,6 +24,8 @@ import app.cash.turbine.test import com.google.common.truth.Truth.assertThat import io.element.android.features.rageshake.test.crash.A_CRASH_DATA import io.element.android.features.rageshake.test.crash.FakeCrashDataStore +import io.element.android.features.rageshake.test.screenshot.A_SCREENSHOT_URI +import io.element.android.features.rageshake.test.screenshot.FakeScreenshotHolder import io.element.android.libraries.architecture.Async import io.element.android.libraries.matrix.test.A_FAILURE_REASON import kotlinx.coroutines.ExperimentalCoroutinesApi diff --git a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/FakeScreenshotHolder.kt b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/FakeScreenshotHolder.kt deleted file mode 100644 index 0ed7714287..0000000000 --- a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/FakeScreenshotHolder.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2023 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.features.rageshake.impl.bugreport - -import android.graphics.Bitmap -import io.element.android.features.rageshake.api.screenshot.ScreenshotHolder - -const val A_SCREENSHOT_URI = "file://content/uri" - -class FakeScreenshotHolder(private val screenshotUri: String? = null) : ScreenshotHolder { - override fun writeBitmap(data: Bitmap) = Unit - - override fun getFileUri() = screenshotUri - - override fun reset() = Unit -} diff --git a/features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/rageshake/FakeRageshakeDataStore.kt b/features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/rageshake/FakeRageshakeDataStore.kt index 7bf15e982a..a250e50361 100644 --- a/features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/rageshake/FakeRageshakeDataStore.kt +++ b/features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/rageshake/FakeRageshakeDataStore.kt @@ -22,7 +22,6 @@ import kotlinx.coroutines.flow.MutableStateFlow const val A_SENSITIVITY = 1f -// TODO Remove this duplicated class when we will rework modules. class FakeRageshakeDataStore( isEnabled: Boolean = true, sensitivity: Float = A_SENSITIVITY, diff --git a/features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/screenshot/FakeScreenshotHolder.kt b/features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/screenshot/FakeScreenshotHolder.kt index bb4d25737a..5e45960b28 100644 --- a/features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/screenshot/FakeScreenshotHolder.kt +++ b/features/rageshake/test/src/main/kotlin/io/element/android/features/rageshake/test/screenshot/FakeScreenshotHolder.kt @@ -21,7 +21,6 @@ import io.element.android.features.rageshake.api.screenshot.ScreenshotHolder const val A_SCREENSHOT_URI = "file://content/uri" -// TODO Remove this duplicated class when we will rework modules. class FakeScreenshotHolder(private val screenshotUri: String? = null) : ScreenshotHolder { override fun writeBitmap(data: Bitmap) = Unit From 6a34caf33d875abccbed98ea9d90c34591ba3b52 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 9 Mar 2023 14:52:40 +0100 Subject: [PATCH 20/25] Create allFeatureApis extension and rename allFeatures to allFeaturesImpl --- app/build.gradle.kts | 4 ++-- appnav/build.gradle.kts | 11 +++-------- .../main/kotlin/extension/DependencyHandleScope.kt | 13 ++++++++++++- tests/uitests/build.gradle.kts | 4 ++-- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index e3fbc3287e..fae8587d88 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -17,7 +17,7 @@ @file:Suppress("UnstableApiUsage") import com.android.build.api.variant.FilterConfiguration.FilterType.ABI -import extension.allFeatures +import extension.allFeaturesImpl import extension.allLibraries // TODO: Remove once https://youtrack.jetbrains.com/issue/KTIJ-19369 is fixed @@ -197,7 +197,7 @@ knit { dependencies { allLibraries() - allFeatures() + allFeaturesImpl() implementation(projects.libraries.matrix.impl) implementation(projects.libraries.dateformatter.impl) implementation(projects.libraries.sessionStorage.impl) diff --git a/appnav/build.gradle.kts b/appnav/build.gradle.kts index 77f4690793..ee9a4fc238 100644 --- a/appnav/build.gradle.kts +++ b/appnav/build.gradle.kts @@ -16,6 +16,8 @@ @file:Suppress("UnstableApiUsage") +import extension.allFeaturesApi + // TODO: Remove once https://youtrack.jetbrains.com/issue/KTIJ-19369 is fixed @Suppress("DSL_SCOPE_VIOLATION") plugins { @@ -36,14 +38,7 @@ dependencies { implementation(libs.dagger) kapt(libs.dagger.compiler) - implementation(projects.features.messages.api) - implementation(projects.features.roomlist.api) - implementation(projects.features.rageshake.api) - implementation(projects.features.login.api) - implementation(projects.features.preferences.api) - implementation(projects.features.logout.api) - implementation(projects.features.onboarding.api) - implementation(projects.features.createroom.api) + allFeaturesApi() implementation(projects.libraries.core) implementation(projects.libraries.architecture) diff --git a/plugins/src/main/kotlin/extension/DependencyHandleScope.kt b/plugins/src/main/kotlin/extension/DependencyHandleScope.kt index 812b281ffd..a0d574c803 100644 --- a/plugins/src/main/kotlin/extension/DependencyHandleScope.kt +++ b/plugins/src/main/kotlin/extension/DependencyHandleScope.kt @@ -61,7 +61,18 @@ fun DependencyHandlerScope.allLibraries() { implementation(project(":libraries:di")) } -fun DependencyHandlerScope.allFeatures() { +fun DependencyHandlerScope.allFeaturesApi() { + implementation(project(":features:onboarding:api")) + implementation(project(":features:login:api")) + implementation(project(":features:logout:api")) + implementation(project(":features:roomlist:api")) + implementation(project(":features:messages:api")) + implementation(project(":features:rageshake:api")) + implementation(project(":features:preferences:api")) + implementation(project(":features:createroom:api")) +} + +fun DependencyHandlerScope.allFeaturesImpl() { implementation(project(":features:onboarding:impl")) implementation(project(":features:login:impl")) implementation(project(":features:logout:impl")) diff --git a/tests/uitests/build.gradle.kts b/tests/uitests/build.gradle.kts index 6d970e34b0..86431f2c1c 100644 --- a/tests/uitests/build.gradle.kts +++ b/tests/uitests/build.gradle.kts @@ -14,7 +14,7 @@ * limitations under the License. */ -import extension.allFeatures +import extension.allFeaturesImpl import extension.allLibraries // TODO: Remove once https://youtrack.jetbrains.com/issue/KTIJ-19369 is fixed @@ -40,5 +40,5 @@ dependencies { ksp(libs.showkase.processor) allLibraries() - allFeatures() + allFeaturesImpl() } From 2bd252b9c52aab307cf2cd7fa3dcbc3b48b6118e Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 9 Mar 2023 15:43:50 +0100 Subject: [PATCH 21/25] Rename CreateRoomRootScreen --- .../features/createroom/impl/root/CreateRoomRootNode.kt | 2 +- .../root/{CreateRoomRootScreen.kt => CreateRoomRootView.kt} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/{CreateRoomRootScreen.kt => CreateRoomRootView.kt} (99%) diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootNode.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootNode.kt index de7893e2e3..16a965695f 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootNode.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootNode.kt @@ -43,7 +43,7 @@ class CreateRoomRootNode @AssistedInject constructor( @Composable override fun View(modifier: Modifier) { val state = presenter.present() - CreateRoomRootScreen( + CreateRoomRootView( state = state, modifier = modifier, onClosePressed = this::navigateUp, diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootScreen.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootView.kt similarity index 99% rename from features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootScreen.kt rename to features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootView.kt index 33e6d2b711..f06623b3d8 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootScreen.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootView.kt @@ -59,7 +59,7 @@ import io.element.android.libraries.ui.strings.R as StringR @OptIn(ExperimentalMaterial3Api::class) @Composable -fun CreateRoomRootScreen( +fun CreateRoomRootView( state: CreateRoomRootState, modifier: Modifier = Modifier, onClosePressed: () -> Unit = {}, @@ -230,7 +230,7 @@ fun CreateRoomRootViewDarkPreview(@PreviewParameter(CreateRoomRootStateProvider: @Composable private fun ContentToPreview(state: CreateRoomRootState) { - CreateRoomRootScreen( + CreateRoomRootView( state = state, ) } From 9d2bb2f776c3ac92001873c55960a5265d26aae0 Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 9 Mar 2023 16:27:24 +0100 Subject: [PATCH 22/25] [Architecture] Fix UT compilation after removing duplicated class --- .../rageshake/impl/detection/RageshakeDetectionPresenterTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/detection/RageshakeDetectionPresenterTest.kt b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/detection/RageshakeDetectionPresenterTest.kt index 312671ccbe..cca82d64d5 100644 --- a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/detection/RageshakeDetectionPresenterTest.kt +++ b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/detection/RageshakeDetectionPresenterTest.kt @@ -25,10 +25,10 @@ import app.cash.turbine.test import com.google.common.truth.Truth.assertThat import io.element.android.features.rageshake.api.detection.RageshakeDetectionEvents import io.element.android.features.rageshake.api.screenshot.ImageResult -import io.element.android.features.rageshake.impl.bugreport.FakeScreenshotHolder import io.element.android.features.rageshake.impl.preferences.DefaultRageshakePreferencesPresenter import io.element.android.features.rageshake.test.rageshake.FakeRageShake import io.element.android.features.rageshake.test.rageshake.FakeRageshakeDataStore +import io.element.android.features.rageshake.test.screenshot.FakeScreenshotHolder import io.element.android.libraries.matrix.test.AN_EXCEPTION import io.mockk.mockk import kotlinx.coroutines.ExperimentalCoroutinesApi From 953b8280bd268eb7723e3a131bf44dbcc8a2f51d Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 9 Mar 2023 16:44:12 +0100 Subject: [PATCH 23/25] [Architecture] regenerate screenshots --- ...CreateRoomRootViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...reateRoomRootViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...p_ChangeServerViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...p_ChangeServerViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...p_ChangeServerViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...p_ChangeServerViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png} | 0 ...p_ChangeServerViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png} | 0 ..._ChangeServerViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ..._ChangeServerViewLightPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ..._ChangeServerViewLightPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ..._ChangeServerViewLightPreview_0_null_3,NEXUS_5,1.0,en].png} | 0 ..._ChangeServerViewLightPreview_0_null_4,NEXUS_5,1.0,en].png} | 0 ...up_LoginRootScreenDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...up_LoginRootScreenDarkPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...up_LoginRootScreenDarkPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...up_LoginRootScreenDarkPreview_0_null_3,NEXUS_5,1.0,en].png} | 0 ...up_LoginRootScreenDarkPreview_0_null_4,NEXUS_5,1.0,en].png} | 0 ...up_LoginRootScreenDarkPreview_0_null_5,NEXUS_5,1.0,en].png} | 0 ...p_LoginRootScreenLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...p_LoginRootScreenLightPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...p_LoginRootScreenLightPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...p_LoginRootScreenLightPreview_0_null_3,NEXUS_5,1.0,en].png} | 0 ...p_LoginRootScreenLightPreview_0_null_4,NEXUS_5,1.0,en].png} | 0 ...p_LoginRootScreenLightPreview_0_null_5,NEXUS_5,1.0,en].png} | 0 ..._LogoutPreferenceViewDarkPreview_0_null,NEXUS_5,1.0,en].png | 3 --- ...LogoutPreferenceViewLightPreview_0_null,NEXUS_5,1.0,en].png | 3 --- ...Group_SheetContentDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...Group_SheetContentDarkPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...Group_SheetContentDarkPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...roup_SheetContentLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...roup_SheetContentLightPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...roup_SheetContentLightPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...essageComposerViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...ssageComposerViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...ineItemEncryptedViewDarkPreview_0_null,NEXUS_5,1.0,en].png} | 0 ...neItemEncryptedViewLightPreview_0_null,NEXUS_5,1.0,en].png} | 0 ...elineItemImageViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...elineItemImageViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...elineItemImageViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...lineItemImageViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...lineItemImageViewLightPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...lineItemImageViewLightPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...eItemInformativeViewDarkPreview_0_null,NEXUS_5,1.0,en].png} | 0 ...ItemInformativeViewLightPreview_0_null,NEXUS_5,1.0,en].png} | 0 ...lineItemRedactedViewDarkPreview_0_null,NEXUS_5,1.0,en].png} | 0 ...ineItemRedactedViewLightPreview_0_null,NEXUS_5,1.0,en].png} | 0 ...melineItemTextViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...melineItemTextViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...melineItemTextViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...melineItemTextViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png} | 0 ...melineItemTextViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png} | 0 ...melineItemTextViewDarkPreview_0_null_5,NEXUS_5,1.0,en].png} | 0 ...elineItemTextViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...elineItemTextViewLightPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...elineItemTextViewLightPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...elineItemTextViewLightPreview_0_null_3,NEXUS_5,1.0,en].png} | 0 ...elineItemTextViewLightPreview_0_null_4,NEXUS_5,1.0,en].png} | 0 ...elineItemTextViewLightPreview_0_null_5,NEXUS_5,1.0,en].png} | 0 ...elineItemUnknownViewDarkPreview_0_null,NEXUS_5,1.0,en].png} | 0 ...lineItemUnknownViewLightPreview_0_null,NEXUS_5,1.0,en].png} | 0 ...Group_HtmlDocumentDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...Group_HtmlDocumentDarkPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentDarkPreview_0_null_10,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentDarkPreview_0_null_11,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentDarkPreview_0_null_12,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentDarkPreview_0_null_13,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentDarkPreview_0_null_14,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentDarkPreview_0_null_15,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentDarkPreview_0_null_16,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentDarkPreview_0_null_17,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentDarkPreview_0_null_18,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentDarkPreview_0_null_19,NEXUS_5,1.0,en].png} | 0 ...Group_HtmlDocumentDarkPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...Group_HtmlDocumentDarkPreview_0_null_3,NEXUS_5,1.0,en].png} | 0 ...Group_HtmlDocumentDarkPreview_0_null_4,NEXUS_5,1.0,en].png} | 0 ...Group_HtmlDocumentDarkPreview_0_null_5,NEXUS_5,1.0,en].png} | 0 ...Group_HtmlDocumentDarkPreview_0_null_6,NEXUS_5,1.0,en].png} | 0 ...Group_HtmlDocumentDarkPreview_0_null_7,NEXUS_5,1.0,en].png} | 0 ...Group_HtmlDocumentDarkPreview_0_null_8,NEXUS_5,1.0,en].png} | 0 ...Group_HtmlDocumentDarkPreview_0_null_9,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentLightPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...oup_HtmlDocumentLightPreview_0_null_10,NEXUS_5,1.0,en].png} | 0 ...oup_HtmlDocumentLightPreview_0_null_11,NEXUS_5,1.0,en].png} | 0 ...oup_HtmlDocumentLightPreview_0_null_12,NEXUS_5,1.0,en].png} | 0 ...oup_HtmlDocumentLightPreview_0_null_13,NEXUS_5,1.0,en].png} | 0 ...oup_HtmlDocumentLightPreview_0_null_14,NEXUS_5,1.0,en].png} | 0 ...oup_HtmlDocumentLightPreview_0_null_15,NEXUS_5,1.0,en].png} | 0 ...oup_HtmlDocumentLightPreview_0_null_16,NEXUS_5,1.0,en].png} | 0 ...oup_HtmlDocumentLightPreview_0_null_17,NEXUS_5,1.0,en].png} | 0 ...oup_HtmlDocumentLightPreview_0_null_18,NEXUS_5,1.0,en].png} | 0 ...oup_HtmlDocumentLightPreview_0_null_19,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentLightPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentLightPreview_0_null_3,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentLightPreview_0_null_4,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentLightPreview_0_null_5,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentLightPreview_0_null_6,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentLightPreview_0_null_7,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentLightPreview_0_null_8,NEXUS_5,1.0,en].png} | 0 ...roup_HtmlDocumentLightPreview_0_null_9,NEXUS_5,1.0,en].png} | 0 ...emDaySeparatorViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...emDaySeparatorViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...mDaySeparatorViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...mDaySeparatorViewLightPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...LoadingMoreIndicatorDarkPreview_0_null,NEXUS_5,1.0,en].png} | 0 ...oadingMoreIndicatorLightPreview_0_null,NEXUS_5,1.0,en].png} | 0 ...MessageEventBubbleDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...MessageEventBubbleDarkPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...essageEventBubbleDarkPreview_0_null_10,NEXUS_5,1.0,en].png} | 0 ...essageEventBubbleDarkPreview_0_null_11,NEXUS_5,1.0,en].png} | 0 ...MessageEventBubbleDarkPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...MessageEventBubbleDarkPreview_0_null_3,NEXUS_5,1.0,en].png} | 0 ...MessageEventBubbleDarkPreview_0_null_4,NEXUS_5,1.0,en].png} | 0 ...MessageEventBubbleDarkPreview_0_null_5,NEXUS_5,1.0,en].png} | 0 ...MessageEventBubbleDarkPreview_0_null_6,NEXUS_5,1.0,en].png} | 0 ...MessageEventBubbleDarkPreview_0_null_7,NEXUS_5,1.0,en].png} | 0 ...MessageEventBubbleDarkPreview_0_null_8,NEXUS_5,1.0,en].png} | 0 ...MessageEventBubbleDarkPreview_0_null_9,NEXUS_5,1.0,en].png} | 0 ...essageEventBubbleLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...essageEventBubbleLightPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...ssageEventBubbleLightPreview_0_null_10,NEXUS_5,1.0,en].png} | 0 ...ssageEventBubbleLightPreview_0_null_11,NEXUS_5,1.0,en].png} | 0 ...essageEventBubbleLightPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...essageEventBubbleLightPreview_0_null_3,NEXUS_5,1.0,en].png} | 0 ...essageEventBubbleLightPreview_0_null_4,NEXUS_5,1.0,en].png} | 0 ...essageEventBubbleLightPreview_0_null_5,NEXUS_5,1.0,en].png} | 0 ...essageEventBubbleLightPreview_0_null_6,NEXUS_5,1.0,en].png} | 0 ...essageEventBubbleLightPreview_0_null_7,NEXUS_5,1.0,en].png} | 0 ...essageEventBubbleLightPreview_0_null_8,NEXUS_5,1.0,en].png} | 0 ...essageEventBubbleLightPreview_0_null_9,NEXUS_5,1.0,en].png} | 0 ...agesReactionButtonDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...agesReactionButtonDarkPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...agesReactionButtonDarkPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...agesReactionButtonDarkPreview_0_null_3,NEXUS_5,1.0,en].png} | 0 ...gesReactionButtonLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...gesReactionButtonLightPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...gesReactionButtonLightPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...gesReactionButtonLightPreview_0_null_3,NEXUS_5,1.0,en].png} | 0 ...ineItemReactionsViewDarkPreview_0_null,NEXUS_5,1.0,en].png} | 0 ...neItemReactionsViewLightPreview_0_null,NEXUS_5,1.0,en].png} | 0 ...Group_TimelineViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...Group_TimelineViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...Group_TimelineViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...Group_TimelineViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png} | 0 ...Group_TimelineViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png} | 0 ...Group_TimelineViewDarkPreview_0_null_5,NEXUS_5,1.0,en].png} | 0 ...roup_TimelineViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...roup_TimelineViewLightPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...roup_TimelineViewLightPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...roup_TimelineViewLightPreview_0_null_3,NEXUS_5,1.0,en].png} | 0 ...roup_TimelineViewLightPreview_0_null_4,NEXUS_5,1.0,en].png} | 0 ...roup_TimelineViewLightPreview_0_null_5,NEXUS_5,1.0,en].png} | 0 ...Group_MessagesViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...roup_MessagesViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...oup_OnBoardingScreenDarkPreview_0_null,NEXUS_5,1.0,en].png} | 0 ...up_OnBoardingScreenLightPreview_0_null,NEXUS_5,1.0,en].png} | 0 ...referencesRootViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...referencesRootViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...eferencesRootViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...eferencesRootViewLightPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...up_UserPreferencesDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...up_UserPreferencesDarkPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...up_UserPreferencesDarkPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...p_UserPreferencesLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...p_UserPreferencesLightPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...p_UserPreferencesLightPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...up_CrashDetectionViewDarkPreview_0_null,NEXUS_5,1.0,en].png | 3 --- ...p_CrashDetectionViewLightPreview_0_null,NEXUS_5,1.0,en].png | 3 --- ...ageshakeDialogContentDarkPreview_0_null,NEXUS_5,1.0,en].png | 3 --- ...geshakeDialogContentLightPreview_0_null,NEXUS_5,1.0,en].png | 3 --- ...roup_BugReportViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...roup_BugReportViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...roup_BugReportViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...roup_BugReportViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png} | 0 ...oup_BugReportViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...oup_BugReportViewLightPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...oup_BugReportViewLightPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...oup_BugReportViewLightPreview_0_null_3,NEXUS_5,1.0,en].png} | 0 ...hakePreferencesViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png | 3 --- ...hakePreferencesViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png | 3 --- ...akePreferencesViewLightPreview_0_null_0,NEXUS_5,1.0,en].png | 3 --- ...akePreferencesViewLightPreview_0_null_1,NEXUS_5,1.0,en].png | 3 --- ...efaultRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png} | 0 ...faultRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png} | 0 ...oup_RoomSummaryRowDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...oup_RoomSummaryRowDarkPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...oup_RoomSummaryRowDarkPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...oup_RoomSummaryRowDarkPreview_0_null_3,NEXUS_5,1.0,en].png} | 0 ...oup_RoomSummaryRowDarkPreview_0_null_4,NEXUS_5,1.0,en].png} | 0 ...oup_RoomSummaryRowDarkPreview_0_null_5,NEXUS_5,1.0,en].png} | 0 ...up_RoomSummaryRowLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...up_RoomSummaryRowLightPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...up_RoomSummaryRowLightPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...up_RoomSummaryRowLightPreview_0_null_3,NEXUS_5,1.0,en].png} | 0 ...up_RoomSummaryRowLightPreview_0_null_4,NEXUS_5,1.0,en].png} | 0 ...up_RoomSummaryRowLightPreview_0_null_5,NEXUS_5,1.0,en].png} | 0 ...SearchRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png} | 0 ...earchRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png} | 0 ...Group_RoomListViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...roup_RoomListViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...up_ConfirmationDialogDarkPreview_0_null,NEXUS_5,1.0,en].png | 3 --- ...p_ConfirmationDialogLightPreview_0_null,NEXUS_5,1.0,en].png | 3 --- ...faultGroup_BackButtonPreviewDark_0_null,NEXUS_5,1.0,en].png | 3 --- ...aultGroup_BackButtonPreviewLight_0_null,NEXUS_5,1.0,en].png | 3 --- 204 files changed, 42 deletions(-) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.createroom.root_null_DefaultGroup_CreateRoomRootViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.createroom.impl.root_null_DefaultGroup_CreateRoomRootViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.createroom.root_null_DefaultGroup_CreateRoomRootViewLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.createroom.impl.root_null_DefaultGroup_CreateRoomRootViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_3,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_4,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_3,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_4,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_5,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_3,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_4,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_5,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_5,NEXUS_5,1.0,en].png} (100%) delete mode 100644 tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.logout_null_DefaultGroup_LogoutPreferenceViewDarkPreview_0_null,NEXUS_5,1.0,en].png delete mode 100644 tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.logout_null_DefaultGroup_LogoutPreferenceViewLightPreview_0_null,NEXUS_5,1.0,en].png rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.textcomposer_null_DefaultGroup_MessageComposerViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.textcomposer_null_DefaultGroup_MessageComposerViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.textcomposer_null_DefaultGroup_MessageComposerViewLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.textcomposer_null_DefaultGroup_MessageComposerViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemEncryptedViewDarkPreview_0_null,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemEncryptedViewDarkPreview_0_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemEncryptedViewLightPreview_0_null,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemEncryptedViewLightPreview_0_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemImageViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemImageViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemImageViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemImageViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemImageViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemImageViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemImageViewLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemImageViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemImageViewLightPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemImageViewLightPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemImageViewLightPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemImageViewLightPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemInformativeViewDarkPreview_0_null,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemInformativeViewDarkPreview_0_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemInformativeViewLightPreview_0_null,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemInformativeViewLightPreview_0_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemRedactedViewDarkPreview_0_null,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemRedactedViewDarkPreview_0_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemRedactedViewLightPreview_0_null,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemRedactedViewLightPreview_0_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_5,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_3,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_4,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_5,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemUnknownViewDarkPreview_0_null,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemUnknownViewDarkPreview_0_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemUnknownViewLightPreview_0_null,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemUnknownViewLightPreview_0_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_10,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_10,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_11,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_11,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_12,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_12,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_13,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_13,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_14,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_14,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_15,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_15,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_16,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_16,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_17,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_17,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_18,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_18,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_19,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_19,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_3,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_4,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_5,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_6,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_6,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_7,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_7,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_8,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_8,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_9,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_9,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_10,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_10,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_11,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_11,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_12,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_12,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_13,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_13,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_14,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_14,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_15,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_15,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_16,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_16,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_17,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_17,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_18,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_18,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_19,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_19,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_3,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_4,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_5,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_6,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_6,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_7,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_7,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_8,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_8,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_9,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_9,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewLightPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewLightPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.virtual_null_DefaultGroup_TimelineLoadingMoreIndicatorDarkPreview_0_null,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.virtual_null_DefaultGroup_TimelineLoadingMoreIndicatorDarkPreview_0_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.virtual_null_DefaultGroup_TimelineLoadingMoreIndicatorLightPreview_0_null,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.virtual_null_DefaultGroup_TimelineLoadingMoreIndicatorLightPreview_0_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_10,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_10,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_11,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_11,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_3,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_4,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_5,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_6,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_6,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_7,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_7,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_8,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_8,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_9,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_9,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_10,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_10,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_11,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_11,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_3,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_4,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_5,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_6,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_6,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_7,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_7,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_8,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_8,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_9,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_9,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_3,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_3,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_TimelineItemReactionsViewDarkPreview_0_null,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_TimelineItemReactionsViewDarkPreview_0_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_TimelineItemReactionsViewLightPreview_0_null,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_TimelineItemReactionsViewLightPreview_0_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_5,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_3,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_4,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_5,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages_null_DefaultGroup_MessagesViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl_null_DefaultGroup_MessagesViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages_null_DefaultGroup_MessagesViewLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl_null_DefaultGroup_MessagesViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.onboarding_null_DefaultGroup_OnBoardingScreenDarkPreview_0_null,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.onboarding.impl_null_DefaultGroup_OnBoardingScreenDarkPreview_0_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.onboarding_null_DefaultGroup_OnBoardingScreenLightPreview_0_null,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.onboarding.impl_null_DefaultGroup_OnBoardingScreenLightPreview_0_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.root_null_DefaultGroup_PreferencesRootViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.root_null_DefaultGroup_PreferencesRootViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.root_null_DefaultGroup_PreferencesRootViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.root_null_DefaultGroup_PreferencesRootViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.root_null_DefaultGroup_PreferencesRootViewLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.root_null_DefaultGroup_PreferencesRootViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.root_null_DefaultGroup_PreferencesRootViewLightPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.root_null_DefaultGroup_PreferencesRootViewLightPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.user_null_DefaultGroup_UserPreferencesDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.user_null_DefaultGroup_UserPreferencesDarkPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.user_null_DefaultGroup_UserPreferencesDarkPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.user_null_DefaultGroup_UserPreferencesDarkPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.user_null_DefaultGroup_UserPreferencesDarkPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.user_null_DefaultGroup_UserPreferencesDarkPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.user_null_DefaultGroup_UserPreferencesLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.user_null_DefaultGroup_UserPreferencesLightPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.user_null_DefaultGroup_UserPreferencesLightPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.user_null_DefaultGroup_UserPreferencesLightPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.user_null_DefaultGroup_UserPreferencesLightPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.user_null_DefaultGroup_UserPreferencesLightPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) delete mode 100644 tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionViewDarkPreview_0_null,NEXUS_5,1.0,en].png delete mode 100644 tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionViewLightPreview_0_null,NEXUS_5,1.0,en].png delete mode 100644 tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentDarkPreview_0_null,NEXUS_5,1.0,en].png delete mode 100644 tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentLightPreview_0_null,NEXUS_5,1.0,en].png rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_3,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_3,NEXUS_5,1.0,en].png} (100%) delete mode 100644 tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png delete mode 100644 tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png delete mode 100644 tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewLightPreview_0_null_0,NEXUS_5,1.0,en].png delete mode 100644 tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewLightPreview_0_null_1,NEXUS_5,1.0,en].png rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_DefaultRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_DefaultRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_DefaultRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_DefaultRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_3,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_4,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_5,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_3,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_4,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_5,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_SearchRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_SearchRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_SearchRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_SearchRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist_null_DefaultGroup_RoomListViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl_null_DefaultGroup_RoomListViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist_null_DefaultGroup_RoomListViewLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl_null_DefaultGroup_RoomListViewLightPreview_0_null_0,NEXUS_5,1.0,en].png} (100%) delete mode 100644 tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogDarkPreview_0_null,NEXUS_5,1.0,en].png delete mode 100644 tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogLightPreview_0_null,NEXUS_5,1.0,en].png delete mode 100644 tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_BackButtonPreviewDark_0_null,NEXUS_5,1.0,en].png delete mode 100644 tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_BackButtonPreviewLight_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.createroom.root_null_DefaultGroup_CreateRoomRootViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.createroom.impl.root_null_DefaultGroup_CreateRoomRootViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.createroom.root_null_DefaultGroup_CreateRoomRootViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.createroom.impl.root_null_DefaultGroup_CreateRoomRootViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.createroom.root_null_DefaultGroup_CreateRoomRootViewLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.createroom.impl.root_null_DefaultGroup_CreateRoomRootViewLightPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.createroom.root_null_DefaultGroup_CreateRoomRootViewLightPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.createroom.impl.root_null_DefaultGroup_CreateRoomRootViewLightPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_0_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.impl.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.logout_null_DefaultGroup_LogoutPreferenceViewDarkPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.logout_null_DefaultGroup_LogoutPreferenceViewDarkPreview_0_null,NEXUS_5,1.0,en].png deleted file mode 100644 index 67a9b9b439..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.logout_null_DefaultGroup_LogoutPreferenceViewDarkPreview_0_null,NEXUS_5,1.0,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ef0c92421e87d1d100a1ad72f7643c99d42167414c5d21ac4a11391078733644 -size 9016 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.logout_null_DefaultGroup_LogoutPreferenceViewLightPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.logout_null_DefaultGroup_LogoutPreferenceViewLightPreview_0_null,NEXUS_5,1.0,en].png deleted file mode 100644 index caab04513f..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.logout_null_DefaultGroup_LogoutPreferenceViewLightPreview_0_null,NEXUS_5,1.0,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3c0411a2f6cdbad8d2115c734d54ad13c1f0c6b24dfc90d33a7781d751a60d54 -size 8622 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.textcomposer_null_DefaultGroup_MessageComposerViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.textcomposer_null_DefaultGroup_MessageComposerViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.textcomposer_null_DefaultGroup_MessageComposerViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.textcomposer_null_DefaultGroup_MessageComposerViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.textcomposer_null_DefaultGroup_MessageComposerViewLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.textcomposer_null_DefaultGroup_MessageComposerViewLightPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.textcomposer_null_DefaultGroup_MessageComposerViewLightPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.textcomposer_null_DefaultGroup_MessageComposerViewLightPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemEncryptedViewDarkPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemEncryptedViewDarkPreview_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemEncryptedViewDarkPreview_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemEncryptedViewDarkPreview_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemEncryptedViewLightPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemEncryptedViewLightPreview_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemEncryptedViewLightPreview_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemEncryptedViewLightPreview_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemImageViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemImageViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemImageViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemImageViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemImageViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemImageViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemImageViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemImageViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemImageViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemImageViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemImageViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemImageViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemImageViewLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemImageViewLightPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemImageViewLightPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemImageViewLightPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemImageViewLightPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemImageViewLightPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemImageViewLightPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemImageViewLightPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemImageViewLightPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemImageViewLightPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemImageViewLightPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemImageViewLightPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemInformativeViewDarkPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemInformativeViewDarkPreview_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemInformativeViewDarkPreview_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemInformativeViewDarkPreview_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemInformativeViewLightPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemInformativeViewLightPreview_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemInformativeViewLightPreview_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemInformativeViewLightPreview_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemRedactedViewDarkPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemRedactedViewDarkPreview_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemRedactedViewDarkPreview_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemRedactedViewDarkPreview_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemRedactedViewLightPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemRedactedViewLightPreview_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemRedactedViewLightPreview_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemRedactedViewLightPreview_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewDarkPreview_0_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemTextViewLightPreview_0_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemUnknownViewDarkPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemUnknownViewDarkPreview_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemUnknownViewDarkPreview_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemUnknownViewDarkPreview_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemUnknownViewLightPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemUnknownViewLightPreview_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.event_null_DefaultGroup_TimelineItemUnknownViewLightPreview_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.event_null_DefaultGroup_TimelineItemUnknownViewLightPreview_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_10,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_10,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_10,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_11,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_11,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_11,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_12,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_12,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_12,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_13,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_13,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_13,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_13,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_14,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_14,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_14,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_14,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_15,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_15,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_15,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_15,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_16,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_16,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_16,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_16,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_17,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_17,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_17,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_17,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_18,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_18,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_18,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_18,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_19,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_19,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_19,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_19,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_7,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_8,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_8,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_8,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_9,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_9,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentDarkPreview_0_null_9,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_10,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_10,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_10,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_11,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_11,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_11,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_12,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_12,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_12,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_13,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_13,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_13,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_13,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_14,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_14,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_14,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_14,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_15,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_15,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_15,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_15,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_16,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_16,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_16,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_16,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_17,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_17,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_17,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_17,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_18,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_18,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_18,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_18,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_19,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_19,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_19,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_19,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_7,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_8,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_8,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_8,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_9,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_9,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.html_null_DefaultGroup_HtmlDocumentLightPreview_0_null_9,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewLightPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewLightPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewLightPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewLightPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewLightPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewLightPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.virtual_null_DefaultGroup_TimelineItemDaySeparatorViewLightPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.virtual_null_DefaultGroup_TimelineLoadingMoreIndicatorDarkPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.virtual_null_DefaultGroup_TimelineLoadingMoreIndicatorDarkPreview_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.virtual_null_DefaultGroup_TimelineLoadingMoreIndicatorDarkPreview_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.virtual_null_DefaultGroup_TimelineLoadingMoreIndicatorDarkPreview_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.virtual_null_DefaultGroup_TimelineLoadingMoreIndicatorLightPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.virtual_null_DefaultGroup_TimelineLoadingMoreIndicatorLightPreview_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components.virtual_null_DefaultGroup_TimelineLoadingMoreIndicatorLightPreview_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components.virtual_null_DefaultGroup_TimelineLoadingMoreIndicatorLightPreview_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_10,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_10,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_10,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_11,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_11,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_11,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_7,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_8,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_8,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_8,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_9,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_9,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleDarkPreview_0_null_9,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_10,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_10,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_10,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_11,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_11,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_11,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_7,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_8,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_8,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_8,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_9,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_9,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessageEventBubbleLightPreview_0_null_9,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonDarkPreview_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_MessagesReactionButtonLightPreview_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_TimelineItemReactionsViewDarkPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_TimelineItemReactionsViewDarkPreview_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_TimelineItemReactionsViewDarkPreview_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_TimelineItemReactionsViewDarkPreview_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_TimelineItemReactionsViewLightPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_TimelineItemReactionsViewLightPreview_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_TimelineItemReactionsViewLightPreview_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline.components_null_DefaultGroup_TimelineItemReactionsViewLightPreview_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewDarkPreview_0_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.timeline_null_DefaultGroup_TimelineViewLightPreview_0_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages_null_DefaultGroup_MessagesViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl_null_DefaultGroup_MessagesViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages_null_DefaultGroup_MessagesViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl_null_DefaultGroup_MessagesViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages_null_DefaultGroup_MessagesViewLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl_null_DefaultGroup_MessagesViewLightPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages_null_DefaultGroup_MessagesViewLightPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl_null_DefaultGroup_MessagesViewLightPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.onboarding_null_DefaultGroup_OnBoardingScreenDarkPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.onboarding.impl_null_DefaultGroup_OnBoardingScreenDarkPreview_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.onboarding_null_DefaultGroup_OnBoardingScreenDarkPreview_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.onboarding.impl_null_DefaultGroup_OnBoardingScreenDarkPreview_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.onboarding_null_DefaultGroup_OnBoardingScreenLightPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.onboarding.impl_null_DefaultGroup_OnBoardingScreenLightPreview_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.onboarding_null_DefaultGroup_OnBoardingScreenLightPreview_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.onboarding.impl_null_DefaultGroup_OnBoardingScreenLightPreview_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.root_null_DefaultGroup_PreferencesRootViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.root_null_DefaultGroup_PreferencesRootViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.root_null_DefaultGroup_PreferencesRootViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.root_null_DefaultGroup_PreferencesRootViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.root_null_DefaultGroup_PreferencesRootViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.root_null_DefaultGroup_PreferencesRootViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.root_null_DefaultGroup_PreferencesRootViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.root_null_DefaultGroup_PreferencesRootViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.root_null_DefaultGroup_PreferencesRootViewLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.root_null_DefaultGroup_PreferencesRootViewLightPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.root_null_DefaultGroup_PreferencesRootViewLightPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.root_null_DefaultGroup_PreferencesRootViewLightPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.root_null_DefaultGroup_PreferencesRootViewLightPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.root_null_DefaultGroup_PreferencesRootViewLightPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.root_null_DefaultGroup_PreferencesRootViewLightPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.root_null_DefaultGroup_PreferencesRootViewLightPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.user_null_DefaultGroup_UserPreferencesDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.user_null_DefaultGroup_UserPreferencesDarkPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.user_null_DefaultGroup_UserPreferencesDarkPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.user_null_DefaultGroup_UserPreferencesDarkPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.user_null_DefaultGroup_UserPreferencesDarkPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.user_null_DefaultGroup_UserPreferencesDarkPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.user_null_DefaultGroup_UserPreferencesDarkPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.user_null_DefaultGroup_UserPreferencesDarkPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.user_null_DefaultGroup_UserPreferencesDarkPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.user_null_DefaultGroup_UserPreferencesDarkPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.user_null_DefaultGroup_UserPreferencesDarkPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.user_null_DefaultGroup_UserPreferencesDarkPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.user_null_DefaultGroup_UserPreferencesLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.user_null_DefaultGroup_UserPreferencesLightPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.user_null_DefaultGroup_UserPreferencesLightPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.user_null_DefaultGroup_UserPreferencesLightPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.user_null_DefaultGroup_UserPreferencesLightPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.user_null_DefaultGroup_UserPreferencesLightPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.user_null_DefaultGroup_UserPreferencesLightPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.user_null_DefaultGroup_UserPreferencesLightPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.user_null_DefaultGroup_UserPreferencesLightPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.user_null_DefaultGroup_UserPreferencesLightPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.user_null_DefaultGroup_UserPreferencesLightPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.impl.user_null_DefaultGroup_UserPreferencesLightPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionViewDarkPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionViewDarkPreview_0_null,NEXUS_5,1.0,en].png deleted file mode 100644 index f6af4745a7..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionViewDarkPreview_0_null,NEXUS_5,1.0,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4d995bd6d70846a5e0662220a087ea0c32c7d96b7c6516b36dbbb3834c8a8f7a -size 24837 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionViewLightPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionViewLightPreview_0_null,NEXUS_5,1.0,en].png deleted file mode 100644 index 4580fe0f25..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionViewLightPreview_0_null,NEXUS_5,1.0,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:be0b29f6bff994c832be9b7970c2acb19b0c5e5c5676d0f9fd11bf716ef14cc0 -size 24840 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentDarkPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentDarkPreview_0_null,NEXUS_5,1.0,en].png deleted file mode 100644 index 0a9700be78..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentDarkPreview_0_null,NEXUS_5,1.0,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8ce3ce57b0b52ff01e9f47884802e5847ff67af04f70bf0f287cdd26da098fd2 -size 27408 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentLightPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentLightPreview_0_null,NEXUS_5,1.0,en].png deleted file mode 100644 index 28138c6496..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentLightPreview_0_null,NEXUS_5,1.0,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f93b061d0f155b3a86e399661f3b3cc63fb30809b1a77a0f5d936dafde810baa -size 27411 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewDarkPreview_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.impl.bugreport_null_DefaultGroup_BugReportViewLightPreview_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png deleted file mode 100644 index 0862295a3f..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:23afdbfb4262b15b1855b434790e661da479bb7b0a310756de5c8e1f3ba2d351 -size 23773 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png deleted file mode 100644 index dcaa459404..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e6c24aef96ec2076c98566cf736ddd5e08056def929a84f5cbf6939986126ed0 -size 22381 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewLightPreview_0_null_0,NEXUS_5,1.0,en].png deleted file mode 100644 index 162591c397..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewLightPreview_0_null_0,NEXUS_5,1.0,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8fc3bf4aa9a13f88a8366f2feb8dbfda64ceb2c04f819a1ff96cb09d88221a16 -size 23233 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewLightPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewLightPreview_0_null_1,NEXUS_5,1.0,en].png deleted file mode 100644 index 0452656d2d..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewLightPreview_0_null_1,NEXUS_5,1.0,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:279aad81f277b6c985b22b73f53b32cd7a922fd12fe37f861cffc952bbf38f51 -size 21484 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_DefaultRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_DefaultRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_DefaultRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_DefaultRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_DefaultRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_DefaultRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_DefaultRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_DefaultRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowDarkPreview_0_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_RoomSummaryRowLightPreview_0_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_SearchRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_SearchRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_SearchRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_SearchRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_SearchRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_SearchRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_SearchRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl.components_null_DefaultGroup_SearchRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist_null_DefaultGroup_RoomListViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl_null_DefaultGroup_RoomListViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist_null_DefaultGroup_RoomListViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl_null_DefaultGroup_RoomListViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist_null_DefaultGroup_RoomListViewLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl_null_DefaultGroup_RoomListViewLightPreview_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist_null_DefaultGroup_RoomListViewLightPreview_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.impl_null_DefaultGroup_RoomListViewLightPreview_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogDarkPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogDarkPreview_0_null,NEXUS_5,1.0,en].png deleted file mode 100644 index b76cef193d..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogDarkPreview_0_null,NEXUS_5,1.0,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:716d8d42019944987e856dbe0978e9f8967998defb7421bcad12edbc50cec0a8 -size 13020 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogLightPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogLightPreview_0_null,NEXUS_5,1.0,en].png deleted file mode 100644 index ff5b2f2203..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogLightPreview_0_null,NEXUS_5,1.0,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:609bd13480751ae36a6192a0609ca8d10f897bd25049bea3091e6852ab598433 -size 13052 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_BackButtonPreviewDark_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_BackButtonPreviewDark_0_null,NEXUS_5,1.0,en].png deleted file mode 100644 index bd230a9fea..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_BackButtonPreviewDark_0_null,NEXUS_5,1.0,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:17b110e460f4212927c46d593352dac88493bb7be9a5d2ae8b4e0b8e6c79d0bf -size 5695 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_BackButtonPreviewLight_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_BackButtonPreviewLight_0_null,NEXUS_5,1.0,en].png deleted file mode 100644 index 56028abd8d..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_BackButtonPreviewLight_0_null,NEXUS_5,1.0,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:29c30e97a5c1de9e855001c6f27322bce8795954ac5c134c34ea3c9de417acd2 -size 5250 From b348ad7af33e5e7cf24d8c011db78dc79baa0158 Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 9 Mar 2023 17:30:49 +0100 Subject: [PATCH 24/25] Hopefully makes CI happy --- features/onboarding/impl/build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/features/onboarding/impl/build.gradle.kts b/features/onboarding/impl/build.gradle.kts index 8dc0b1b0fa..c009a0bf71 100644 --- a/features/onboarding/impl/build.gradle.kts +++ b/features/onboarding/impl/build.gradle.kts @@ -41,6 +41,7 @@ dependencies { implementation(projects.libraries.elementresources) implementation(projects.libraries.testtags) implementation(projects.libraries.uiStrings) + implementation(projects.libraries.androidutils) implementation(libs.accompanist.pager) implementation(libs.accompanist.pagerindicator) api(projects.features.onboarding.api) From 399bfdc5e630cbe53757135f734b528b4496df6b Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 9 Mar 2023 17:54:35 +0100 Subject: [PATCH 25/25] Add small comments --- .../element/android/libraries/architecture/BackstackNode.kt | 5 +++++ .../android/libraries/architecture/FeatureEntryPoint.kt | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/BackstackNode.kt b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/BackstackNode.kt index 44aef63fda..ec607e9281 100644 --- a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/BackstackNode.kt +++ b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/BackstackNode.kt @@ -23,6 +23,11 @@ import com.bumble.appyx.core.node.ParentNode import com.bumble.appyx.core.plugin.Plugin import com.bumble.appyx.navmodel.backstack.BackStack +/** + * This class is just an helper for configuring a backstack directly in the constructor. + * With this we can more easily use constructor injection without having a secondary constructor to create the [BackStack] instance. + * Can be used instead of [ParentNode] in flow nodes. + */ @Stable abstract class BackstackNode( val backstack: BackStack, diff --git a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/FeatureEntryPoint.kt b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/FeatureEntryPoint.kt index 711f780b22..031bab7397 100644 --- a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/FeatureEntryPoint.kt +++ b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/FeatureEntryPoint.kt @@ -19,8 +19,14 @@ package io.element.android.libraries.architecture import com.bumble.appyx.core.modality.BuildContext import com.bumble.appyx.core.node.Node +/** + * This interface represents an entrypoint to a feature. Should be used to return the entrypoint node of the feature without exposing the internal types. + */ interface FeatureEntryPoint +/** + * Can be used when the feature only exposes a simple node without the need of plugins. + */ interface SimpleFeatureEntryPoint : FeatureEntryPoint { fun createNode(parentNode: Node, buildContext: BuildContext): Node }