From 87853b467f18b369282caafa9f3fdfef77fc369e Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Wed, 5 Jul 2023 10:19:07 +0100 Subject: [PATCH] s/view/show/ --- ...onEntryPoint.kt => ShowLocationEntryPoint.kt} | 2 +- .../{view => show}/AndroidLocationActions.kt | 2 +- .../impl/{view => show}/LocationActions.kt | 2 +- .../ShowLocationEntryPointImpl.kt} | 10 +++++----- .../ShowLocationEvents.kt} | 6 +++--- .../ShowLocationNode.kt} | 12 ++++++------ .../ShowLocationPresenter.kt} | 14 +++++++------- .../ShowLocationState.kt} | 6 +++--- .../ShowLocationStateProvider.kt} | 12 ++++++------ .../ShowLocationView.kt} | 16 ++++++++-------- .../impl/{view => show}/FakeLocationActions.kt | 2 +- .../ShowLocationPresenterTest.kt} | 10 +++++----- .../features/messages/impl/MessagesFlowNode.kt | 8 ++++---- ...ViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...ViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...ViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 ...iewLightPreview_0_null_0,NEXUS_5,1.0,en].png} | 0 ...iewLightPreview_0_null_1,NEXUS_5,1.0,en].png} | 0 ...iewLightPreview_0_null_2,NEXUS_5,1.0,en].png} | 0 19 files changed, 51 insertions(+), 51 deletions(-) rename features/location/api/src/main/kotlin/io/element/android/features/location/api/{ViewLocationEntryPoint.kt => ShowLocationEntryPoint.kt} (95%) rename features/location/impl/src/main/kotlin/io/element/android/features/location/impl/{view => show}/AndroidLocationActions.kt (97%) rename features/location/impl/src/main/kotlin/io/element/android/features/location/impl/{view => show}/LocationActions.kt (93%) rename features/location/impl/src/main/kotlin/io/element/android/features/location/impl/{view/ViewLocationEntryPointImpl.kt => show/ShowLocationEntryPointImpl.kt} (77%) rename features/location/impl/src/main/kotlin/io/element/android/features/location/impl/{view/ViewLocationEvents.kt => show/ShowLocationEvents.kt} (82%) rename features/location/impl/src/main/kotlin/io/element/android/features/location/impl/{view/ViewLocationNode.kt => show/ShowLocationNode.kt} (85%) rename features/location/impl/src/main/kotlin/io/element/android/features/location/impl/{view/ViewLocationPresenter.kt => show/ShowLocationPresenter.kt} (80%) rename features/location/impl/src/main/kotlin/io/element/android/features/location/impl/{view/ViewLocationState.kt => show/ShowLocationState.kt} (84%) rename features/location/impl/src/main/kotlin/io/element/android/features/location/impl/{view/ViewLocationStateProvider.kt => show/ShowLocationStateProvider.kt} (83%) rename features/location/impl/src/main/kotlin/io/element/android/features/location/impl/{view/ViewLocationView.kt => show/ShowLocationView.kt} (90%) rename features/location/impl/src/test/kotlin/io/element/android/features/location/impl/{view => show}/FakeLocationActions.kt (95%) rename features/location/impl/src/test/kotlin/io/element/android/features/location/impl/{view/ViewLocationPresenterTest.kt => show/ShowLocationPresenterTest.kt} (89%) rename tests/uitests/src/test/snapshots/images/{io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.location.impl.view_null_DefaultGroup_ViewLocationViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.location.impl.show_null_DefaultGroup_ShowLocationViewDarkPreview_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.location.impl.view_null_DefaultGroup_ViewLocationViewDarkPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.location.impl.show_null_DefaultGroup_ShowLocationViewDarkPreview_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.location.impl.view_null_DefaultGroup_ViewLocationViewDarkPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.location.impl.show_null_DefaultGroup_ShowLocationViewDarkPreview_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.location.impl.view_null_DefaultGroup_ViewLocationViewLightPreview_0_null_0,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.location.impl.show_null_DefaultGroup_ShowLocationViewLightPreview_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.location.impl.view_null_DefaultGroup_ViewLocationViewLightPreview_0_null_1,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.location.impl.show_null_DefaultGroup_ShowLocationViewLightPreview_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.location.impl.view_null_DefaultGroup_ViewLocationViewLightPreview_0_null_2,NEXUS_5,1.0,en].png => io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.location.impl.show_null_DefaultGroup_ShowLocationViewLightPreview_0_null_2,NEXUS_5,1.0,en].png} (100%) diff --git a/features/location/api/src/main/kotlin/io/element/android/features/location/api/ViewLocationEntryPoint.kt b/features/location/api/src/main/kotlin/io/element/android/features/location/api/ShowLocationEntryPoint.kt similarity index 95% rename from features/location/api/src/main/kotlin/io/element/android/features/location/api/ViewLocationEntryPoint.kt rename to features/location/api/src/main/kotlin/io/element/android/features/location/api/ShowLocationEntryPoint.kt index a5fb396775..3c429dfa63 100644 --- a/features/location/api/src/main/kotlin/io/element/android/features/location/api/ViewLocationEntryPoint.kt +++ b/features/location/api/src/main/kotlin/io/element/android/features/location/api/ShowLocationEntryPoint.kt @@ -21,7 +21,7 @@ import com.bumble.appyx.core.node.Node import io.element.android.libraries.architecture.FeatureEntryPoint import io.element.android.libraries.architecture.NodeInputs -interface ViewLocationEntryPoint : FeatureEntryPoint { +interface ShowLocationEntryPoint : FeatureEntryPoint { data class Inputs(val location: Location, val description: String?) : NodeInputs diff --git a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/AndroidLocationActions.kt b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/AndroidLocationActions.kt similarity index 97% rename from features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/AndroidLocationActions.kt rename to features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/AndroidLocationActions.kt index 55de9a305e..b347e2a8a3 100644 --- a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/AndroidLocationActions.kt +++ b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/AndroidLocationActions.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.location.impl.view +package io.element.android.features.location.impl.show import android.content.Context import android.content.Intent diff --git a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/LocationActions.kt b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/LocationActions.kt similarity index 93% rename from features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/LocationActions.kt rename to features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/LocationActions.kt index 6ab9058024..c9e982f15d 100644 --- a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/LocationActions.kt +++ b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/LocationActions.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.location.impl.view +package io.element.android.features.location.impl.show import androidx.compose.runtime.Composable import io.element.android.features.location.api.Location diff --git a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationEntryPointImpl.kt b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationEntryPointImpl.kt similarity index 77% rename from features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationEntryPointImpl.kt rename to features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationEntryPointImpl.kt index 5d565f575b..7dc1fc02f3 100644 --- a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationEntryPointImpl.kt +++ b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationEntryPointImpl.kt @@ -14,19 +14,19 @@ * limitations under the License. */ -package io.element.android.features.location.impl.view +package io.element.android.features.location.impl.show 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.location.api.ViewLocationEntryPoint +import io.element.android.features.location.api.ShowLocationEntryPoint import io.element.android.libraries.architecture.createNode import io.element.android.libraries.di.AppScope import javax.inject.Inject @ContributesBinding(AppScope::class) -class ViewLocationEntryPointImpl @Inject constructor() : ViewLocationEntryPoint { - override fun createNode(parentNode: Node, buildContext: BuildContext, inputs: ViewLocationEntryPoint.Inputs): Node { - return parentNode.createNode(buildContext, listOf(inputs)) +class ShowLocationEntryPointImpl @Inject constructor() : ShowLocationEntryPoint { + override fun createNode(parentNode: Node, buildContext: BuildContext, inputs: ShowLocationEntryPoint.Inputs): Node { + return parentNode.createNode(buildContext, listOf(inputs)) } } diff --git a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationEvents.kt b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationEvents.kt similarity index 82% rename from features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationEvents.kt rename to features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationEvents.kt index 21676a0e71..8d5b1143fb 100644 --- a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationEvents.kt +++ b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationEvents.kt @@ -14,8 +14,8 @@ * limitations under the License. */ -package io.element.android.features.location.impl.view +package io.element.android.features.location.impl.show -sealed interface ViewLocationEvents { - object Share : ViewLocationEvents +sealed interface ShowLocationEvents { + object Share : ShowLocationEvents } diff --git a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationNode.kt b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationNode.kt similarity index 85% rename from features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationNode.kt rename to features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationNode.kt index ae6e42a3f6..24094b03ca 100644 --- a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationNode.kt +++ b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationNode.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.location.impl.view +package io.element.android.features.location.impl.show import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -26,14 +26,14 @@ import dagger.assisted.Assisted import dagger.assisted.AssistedInject import im.vector.app.features.analytics.plan.MobileScreen import io.element.android.anvilannotations.ContributesNode -import io.element.android.features.location.api.ViewLocationEntryPoint +import io.element.android.features.location.api.ShowLocationEntryPoint import io.element.android.libraries.architecture.inputs import io.element.android.libraries.di.RoomScope import io.element.android.services.analytics.api.AnalyticsService @ContributesNode(RoomScope::class) -class ViewLocationNode @AssistedInject constructor( - presenterFactory: ViewLocationPresenter.Factory, +class ShowLocationNode @AssistedInject constructor( + presenterFactory: ShowLocationPresenter.Factory, analyticsService: AnalyticsService, @Assisted buildContext: BuildContext, @Assisted plugins: List, @@ -47,12 +47,12 @@ class ViewLocationNode @AssistedInject constructor( ) } - private val inputs: ViewLocationEntryPoint.Inputs = inputs() + private val inputs: ShowLocationEntryPoint.Inputs = inputs() private val presenter = presenterFactory.create(inputs.location, inputs.description) @Composable override fun View(modifier: Modifier) { - ViewLocationView( + ShowLocationView( state = presenter.present(), modifier = modifier, onBackPressed = ::navigateUp diff --git a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationPresenter.kt b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationPresenter.kt similarity index 80% rename from features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationPresenter.kt rename to features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationPresenter.kt index 64739f1d33..6bcd9d45db 100644 --- a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationPresenter.kt +++ b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationPresenter.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.location.impl.view +package io.element.android.features.location.impl.show import androidx.compose.runtime.Composable import androidx.compose.runtime.rememberCoroutineScope @@ -26,28 +26,28 @@ import io.element.android.libraries.architecture.Presenter import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch -class ViewLocationPresenter @AssistedInject constructor( +class ShowLocationPresenter @AssistedInject constructor( private val actions: LocationActions, @Assisted private val location: Location, @Assisted private val description: String? -) : Presenter { +) : Presenter { @AssistedFactory interface Factory { - fun create(location: Location, description: String?): ViewLocationPresenter + fun create(location: Location, description: String?): ShowLocationPresenter } @Composable - override fun present(): ViewLocationState { + override fun present(): ShowLocationState { val coroutineScope = rememberCoroutineScope() actions.Configure() - return ViewLocationState( + return ShowLocationState( location = location, description = description ) { when (it) { - ViewLocationEvents.Share -> coroutineScope.share(location, description) + ShowLocationEvents.Share -> coroutineScope.share(location, description) } } } diff --git a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationState.kt b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationState.kt similarity index 84% rename from features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationState.kt rename to features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationState.kt index db8387e71e..c381acb347 100644 --- a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationState.kt +++ b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationState.kt @@ -14,12 +14,12 @@ * limitations under the License. */ -package io.element.android.features.location.impl.view +package io.element.android.features.location.impl.show import io.element.android.features.location.api.Location -data class ViewLocationState( +data class ShowLocationState( val location: Location, val description: String?, - val eventSink: (ViewLocationEvents) -> Unit, + val eventSink: (ShowLocationEvents) -> Unit, ) diff --git a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationStateProvider.kt b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationStateProvider.kt similarity index 83% rename from features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationStateProvider.kt rename to features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationStateProvider.kt index a4de1b039c..878cc47882 100644 --- a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationStateProvider.kt +++ b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationStateProvider.kt @@ -14,25 +14,25 @@ * limitations under the License. */ -package io.element.android.features.location.impl.view +package io.element.android.features.location.impl.show import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.features.location.api.Location -class ViewLocationStateProvider : PreviewParameterProvider { - override val values: Sequence +class ShowLocationStateProvider : PreviewParameterProvider { + override val values: Sequence get() = sequenceOf( - ViewLocationState( + ShowLocationState( Location(1.23, 2.34, 4f), description = null, eventSink = {}, ), - ViewLocationState( + ShowLocationState( Location(1.23, 2.34, 4f), description = "My favourite place!", eventSink = {}, ), - ViewLocationState( + ShowLocationState( Location(1.23, 2.34, 4f), description = "For some reason I decided to write a small essay in the location description. " + "It is so long that it will wrap onto more than two lines!", diff --git a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationView.kt b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationView.kt similarity index 90% rename from features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationView.kt rename to features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationView.kt index 897d38eaf6..25aa7fbfad 100644 --- a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/view/ViewLocationView.kt +++ b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationView.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.location.impl.view +package io.element.android.features.location.impl.show import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.ExperimentalLayoutApi @@ -49,8 +49,8 @@ import io.element.android.libraries.ui.strings.CommonStrings @OptIn(ExperimentalLayoutApi::class, ExperimentalMaterial3Api::class) @Composable -fun ViewLocationView( - state: ViewLocationState, +fun ShowLocationView( + state: ShowLocationState, modifier: Modifier = Modifier, onBackPressed: () -> Unit = {}, ) { @@ -72,7 +72,7 @@ fun ViewLocationView( BackButton(onClick = onBackPressed) }, actions = { - IconButton(onClick = { state.eventSink(ViewLocationEvents.Share) }) { + IconButton(onClick = { state.eventSink(ShowLocationEvents.Share) }) { Icon(imageVector = Icons.Outlined.Share, contentDescription = stringResource(CommonStrings.action_share)) } } @@ -108,17 +108,17 @@ fun ViewLocationView( @Preview @Composable -internal fun ViewLocationViewLightPreview(@PreviewParameter(ViewLocationStateProvider::class) state: ViewLocationState) = +internal fun ShowLocationViewLightPreview(@PreviewParameter(ShowLocationStateProvider::class) state: ShowLocationState) = ElementPreviewLight { ContentToPreview(state) } @Preview @Composable -internal fun ViewLocationViewDarkPreview(@PreviewParameter(ViewLocationStateProvider::class) state: ViewLocationState) = +internal fun ShowLocationViewDarkPreview(@PreviewParameter(ShowLocationStateProvider::class) state: ShowLocationState) = ElementPreviewDark { ContentToPreview(state) } @Composable -private fun ContentToPreview(state: ViewLocationState) { - ViewLocationView( +private fun ContentToPreview(state: ShowLocationState) { + ShowLocationView( state = state, onBackPressed = {}, ) diff --git a/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/view/FakeLocationActions.kt b/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/show/FakeLocationActions.kt similarity index 95% rename from features/location/impl/src/test/kotlin/io/element/android/features/location/impl/view/FakeLocationActions.kt rename to features/location/impl/src/test/kotlin/io/element/android/features/location/impl/show/FakeLocationActions.kt index 03fdf5222a..a1806746e8 100644 --- a/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/view/FakeLocationActions.kt +++ b/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/show/FakeLocationActions.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.location.impl.view +package io.element.android.features.location.impl.show import androidx.compose.runtime.Composable import io.element.android.features.location.api.Location diff --git a/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/view/ViewLocationPresenterTest.kt b/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/show/ShowLocationPresenterTest.kt similarity index 89% rename from features/location/impl/src/test/kotlin/io/element/android/features/location/impl/view/ViewLocationPresenterTest.kt rename to features/location/impl/src/test/kotlin/io/element/android/features/location/impl/show/ShowLocationPresenterTest.kt index 44dac70be8..b0448afcfe 100644 --- a/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/view/ViewLocationPresenterTest.kt +++ b/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/show/ShowLocationPresenterTest.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.features.location.impl.view +package io.element.android.features.location.impl.show import app.cash.molecule.RecompositionClock import app.cash.molecule.moleculeFlow @@ -24,14 +24,14 @@ import io.element.android.features.location.api.Location import kotlinx.coroutines.test.runTest import org.junit.Test -class ViewLocationPresenterTest { +class ShowLocationPresenterTest { private val actions = FakeLocationActions() private val location = Location(1.23, 4.56, 7.8f) @Test fun `emits initial state`() = runTest { - val presenter = ViewLocationPresenter( + val presenter = ShowLocationPresenter( actions, location, A_DESCRIPTION, @@ -48,7 +48,7 @@ class ViewLocationPresenterTest { @Test fun `uses action to share location`() = runTest { - val presenter = ViewLocationPresenter( + val presenter = ShowLocationPresenter( actions, location, A_DESCRIPTION, @@ -58,7 +58,7 @@ class ViewLocationPresenterTest { presenter.present() }.test { val initialState = awaitItem() - initialState.eventSink(ViewLocationEvents.Share) + initialState.eventSink(ShowLocationEvents.Share) Truth.assertThat(actions.configured).isTrue() Truth.assertThat(actions.sharedLocation).isEqualTo(location) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt index dffffd0329..ef9db5fcec 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt @@ -31,7 +31,7 @@ import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode import io.element.android.features.location.api.Location import io.element.android.features.location.api.SendLocationEntryPoint -import io.element.android.features.location.api.ViewLocationEntryPoint +import io.element.android.features.location.api.ShowLocationEntryPoint import io.element.android.features.messages.api.MessagesEntryPoint import io.element.android.features.messages.impl.attachments.Attachment import io.element.android.features.messages.impl.attachments.preview.AttachmentsPreviewNode @@ -62,7 +62,7 @@ class MessagesFlowNode @AssistedInject constructor( @Assisted buildContext: BuildContext, @Assisted plugins: List, private val sendLocationEntryPoint: SendLocationEntryPoint, - private val viewLocationEntryPoint: ViewLocationEntryPoint, + private val showLocationEntryPoint: ShowLocationEntryPoint, ) : BackstackNode( backstack = BackStack( initialElement = NavTarget.Messages, @@ -155,8 +155,8 @@ class MessagesFlowNode @AssistedInject constructor( createNode(buildContext, listOf(inputs)) } is NavTarget.LocationViewer -> { - val inputs = ViewLocationEntryPoint.Inputs(navTarget.location, navTarget.description) - viewLocationEntryPoint.createNode(this, buildContext, inputs) + val inputs = ShowLocationEntryPoint.Inputs(navTarget.location, navTarget.description) + showLocationEntryPoint.createNode(this, buildContext, inputs) } is NavTarget.EventDebugInfo -> { val inputs = EventDebugInfoNode.Inputs(navTarget.eventId, navTarget.debugInfo) diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.location.impl.view_null_DefaultGroup_ViewLocationViewDarkPreview_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.location.impl.show_null_DefaultGroup_ShowLocationViewDarkPreview_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.location.impl.view_null_DefaultGroup_ViewLocationViewDarkPreview_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.location.impl.show_null_DefaultGroup_ShowLocationViewDarkPreview_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.location.impl.view_null_DefaultGroup_ViewLocationViewDarkPreview_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.location.impl.show_null_DefaultGroup_ShowLocationViewDarkPreview_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.location.impl.view_null_DefaultGroup_ViewLocationViewDarkPreview_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.location.impl.show_null_DefaultGroup_ShowLocationViewDarkPreview_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.location.impl.view_null_DefaultGroup_ViewLocationViewDarkPreview_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.location.impl.show_null_DefaultGroup_ShowLocationViewDarkPreview_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.location.impl.view_null_DefaultGroup_ViewLocationViewDarkPreview_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.location.impl.show_null_DefaultGroup_ShowLocationViewDarkPreview_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.location.impl.view_null_DefaultGroup_ViewLocationViewLightPreview_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.location.impl.show_null_DefaultGroup_ShowLocationViewLightPreview_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.location.impl.view_null_DefaultGroup_ViewLocationViewLightPreview_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.location.impl.show_null_DefaultGroup_ShowLocationViewLightPreview_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.location.impl.view_null_DefaultGroup_ViewLocationViewLightPreview_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.location.impl.show_null_DefaultGroup_ShowLocationViewLightPreview_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.location.impl.view_null_DefaultGroup_ViewLocationViewLightPreview_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.location.impl.show_null_DefaultGroup_ShowLocationViewLightPreview_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.location.impl.view_null_DefaultGroup_ViewLocationViewLightPreview_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.location.impl.show_null_DefaultGroup_ShowLocationViewLightPreview_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.location.impl.view_null_DefaultGroup_ViewLocationViewLightPreview_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.location.impl.show_null_DefaultGroup_ShowLocationViewLightPreview_0_null_2,NEXUS_5,1.0,en].png