diff --git a/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementPresenter.kt b/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementPresenter.kt index dbe619a867..05c42b784e 100644 --- a/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementPresenter.kt +++ b/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementPresenter.kt @@ -13,12 +13,10 @@ import dev.zacsweers.metro.Inject import io.element.android.features.announcement.impl.store.AnnouncementStore import io.element.android.features.announcement.impl.store.AnnouncementStore.SpaceAnnouncement import io.element.android.libraries.architecture.Presenter -import io.element.android.libraries.core.meta.BuildMeta import kotlinx.coroutines.launch @Inject class SpaceAnnouncementPresenter( - private val buildMeta: BuildMeta, private val announcementStore: AnnouncementStore, ) : Presenter { @Composable @@ -34,8 +32,6 @@ class SpaceAnnouncementPresenter( } return SpaceAnnouncementState( - applicationName = buildMeta.applicationName, - desktopApplicationName = buildMeta.desktopApplicationName, eventSink = ::handleEvents ) } diff --git a/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementState.kt b/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementState.kt index f02519a405..7628ed27ae 100644 --- a/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementState.kt +++ b/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementState.kt @@ -8,7 +8,5 @@ package io.element.android.features.announcement.impl.spaces data class SpaceAnnouncementState( - val applicationName: String, - val desktopApplicationName: String, val eventSink: (SpaceAnnouncementEvents) -> Unit ) diff --git a/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementStateProvider.kt b/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementStateProvider.kt index 0eb2e8ff48..d994edf3d8 100644 --- a/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementStateProvider.kt +++ b/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementStateProvider.kt @@ -17,11 +17,7 @@ open class SpaceAnnouncementStateProvider : PreviewParameterProvider Unit = {}, ) = SpaceAnnouncementState( - applicationName = applicationName, - desktopApplicationName = desktopApplicationName, eventSink = eventSink, ) diff --git a/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementView.kt b/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementView.kt index 7f0a7291a5..2a8c5257aa 100644 --- a/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementView.kt +++ b/features/announcement/impl/src/main/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementView.kt @@ -55,11 +55,10 @@ fun SpaceAnnouncementView( isScrollable = true, contentPadding = PaddingValues(top = 24.dp, start = 16.dp, end = 16.dp, bottom = 24.dp), header = { - SpaceAnnouncementHeader(state = state) + SpaceAnnouncementHeader() }, content = { SpaceAnnouncementContent( - state = state, modifier = Modifier.padding(horizontal = 8.dp), ) }, @@ -73,17 +72,13 @@ fun SpaceAnnouncementView( @Composable private fun SpaceAnnouncementHeader( - state: SpaceAnnouncementState, modifier: Modifier = Modifier, ) { IconTitleSubtitleMolecule( modifier = modifier.padding(top = 16.dp, bottom = 16.dp), title = stringResource(id = R.string.screen_space_announcement_title), showBetaLabel = true, - subTitle = stringResource( - id = R.string.screen_space_announcement_subtitle, - state.applicationName - ), + subTitle = stringResource(id = R.string.screen_space_announcement_subtitle), iconStyle = BigIcon.Style.Default( vectorIcon = CompoundIcons.WorkspaceSolid(), usePrimaryTint = true, @@ -93,7 +88,6 @@ private fun SpaceAnnouncementHeader( @Composable private fun SpaceAnnouncementContent( - state: SpaceAnnouncementState, modifier: Modifier = Modifier, ) { Column( @@ -103,7 +97,7 @@ private fun SpaceAnnouncementContent( modifier = Modifier.fillMaxWidth(), items = persistentListOf( InfoListItem( - message = stringResource(id = R.string.screen_space_announcement_item1, state.desktopApplicationName), + message = stringResource(id = R.string.screen_space_announcement_item1), iconVector = CompoundIcons.VisibilityOn(), ), InfoListItem( @@ -116,11 +110,11 @@ private fun SpaceAnnouncementContent( ), InfoListItem( message = stringResource(id = R.string.screen_space_announcement_item4), - iconVector = CompoundIcons.Leave(), + iconVector = CompoundIcons.Explore(), ), InfoListItem( message = stringResource(id = R.string.screen_space_announcement_item5), - iconVector = CompoundIcons.Explore(), + iconVector = CompoundIcons.Leave(), ), ), textStyle = ElementTheme.typography.fontBodyLgMedium, diff --git a/features/announcement/impl/src/main/res/values/localazy.xml b/features/announcement/impl/src/main/res/values/localazy.xml index b995021dfd..eff394be10 100644 --- a/features/announcement/impl/src/main/res/values/localazy.xml +++ b/features/announcement/impl/src/main/res/values/localazy.xml @@ -1,11 +1,11 @@ - "View spaces you’ve created or joined on %1$s desktop" + "View spaces you\'ve created or joined" "Accept or decline invites to spaces" "Discover any rooms you can join in your spaces" - "Leave any spaces you’ve joined" - "Join public spaces" - "More features will be added in the future, such as creating or managing spaces on mobile." - "Welcome to the beta version of Spaces on %1$s mobile! With this first version you can:" + "Join public spaces" + "Leave any spaces you’ve joined" + "Creating and managing spaces is coming soon." + "Welcome to the beta version of Spaces! With this first version you can:" "Introducing Spaces" diff --git a/features/announcement/impl/src/test/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementPresenterTest.kt b/features/announcement/impl/src/test/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementPresenterTest.kt index c3ab3a410c..5adb4dccec 100644 --- a/features/announcement/impl/src/test/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementPresenterTest.kt +++ b/features/announcement/impl/src/test/kotlin/io/element/android/features/announcement/impl/spaces/SpaceAnnouncementPresenterTest.kt @@ -10,26 +10,12 @@ package io.element.android.features.announcement.impl.spaces import com.google.common.truth.Truth.assertThat import io.element.android.features.announcement.impl.store.AnnouncementStore import io.element.android.features.announcement.impl.store.InMemoryAnnouncementStore -import io.element.android.libraries.core.meta.BuildMeta -import io.element.android.libraries.matrix.test.AN_APPLICATION_NAME -import io.element.android.libraries.matrix.test.AN_APPLICATION_NAME_DESKTOP -import io.element.android.libraries.matrix.test.core.aBuildMeta import io.element.android.tests.testutils.test import kotlinx.coroutines.flow.first import kotlinx.coroutines.test.runTest import org.junit.Test class SpaceAnnouncementPresenterTest { - @Test - fun `present - initial state`() = runTest { - val presenter = createSpaceAnnouncementPresenter() - presenter.test { - val state = awaitItem() - assertThat(state.applicationName).isEqualTo(AN_APPLICATION_NAME) - assertThat(state.desktopApplicationName).isEqualTo(AN_APPLICATION_NAME_DESKTOP) - } - } - @Test fun `present - when user continues, the store is updated`() = runTest { val store = InMemoryAnnouncementStore() @@ -46,12 +32,7 @@ class SpaceAnnouncementPresenterTest { } private fun createSpaceAnnouncementPresenter( - buildMeta: BuildMeta = aBuildMeta( - applicationName = AN_APPLICATION_NAME, - desktopApplicationName = AN_APPLICATION_NAME_DESKTOP, - ), announcementStore: AnnouncementStore = InMemoryAnnouncementStore(), ) = SpaceAnnouncementPresenter( - buildMeta = buildMeta, announcementStore = announcementStore, )