Create Presentation module and remove Presenter from core

This commit is contained in:
ganfra
2023-01-04 12:11:12 +01:00
parent a53aae132d
commit 1893e6866e
8 changed files with 22 additions and 7 deletions

View File

@@ -2,7 +2,6 @@ plugins {
id("io.element.android-compose-library")
alias(libs.plugins.ksp)
alias(libs.plugins.anvil)
alias(libs.plugins.molecule)
}
android {
@@ -18,10 +17,10 @@ dependencies {
anvil(project(":anvilcodegen"))
implementation(project(":libraries:di"))
implementation(project(":libraries:core"))
implementation(project(":libraries:presentation"))
implementation(project(":libraries:matrix"))
implementation(project(":libraries:designsystem"))
implementation(libs.appyx.core)
implementation(libs.mavericks.compose)
implementation(libs.datetime)
implementation(libs.accompanist.placeholder)
testImplementation(libs.test.junit)

View File

@@ -8,6 +8,7 @@ import com.bumble.appyx.core.modality.BuildContext
import com.bumble.appyx.core.node.Node
import io.element.android.x.features.roomlist.model.RoomListEvents
import io.element.android.x.matrix.core.RoomId
import io.element.android.x.presentation.presenterConnector
class RoomListNode(
buildContext: BuildContext,

View File

@@ -9,7 +9,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.x.core.architecture.Presenter
import io.element.android.x.core.coroutine.parallelMap
import io.element.android.x.designsystem.components.avatar.AvatarData
import io.element.android.x.designsystem.components.avatar.AvatarSize
@@ -21,6 +20,7 @@ import io.element.android.x.features.roomlist.model.RoomListState
import io.element.android.x.matrix.MatrixClient
import io.element.android.x.matrix.media.MediaResolver
import io.element.android.x.matrix.room.RoomSummary
import io.element.android.x.presentation.Presenter
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.persistentListOf
import kotlinx.collections.immutable.toImmutableList

1
libraries/presentation/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

View File

@@ -0,0 +1,14 @@
plugins {
id("io.element.android-library")
alias(libs.plugins.molecule)
}
android {
namespace = "io.element.android.x.libraries.presentation"
}
dependencies {
api(libs.dagger)
api(libs.appyx.core)
api(libs.androidx.lifecycle.runtime)
}

View File

@@ -1,11 +1,10 @@
package io.element.android.x.features.roomlist
package io.element.android.x.presentation
import androidx.compose.ui.platform.AndroidUiDispatcher
import androidx.lifecycle.lifecycleScope
import app.cash.molecule.AndroidUiDispatcher
import app.cash.molecule.RecompositionClock
import app.cash.molecule.launchMolecule
import com.bumble.appyx.core.node.Node
import io.element.android.x.core.architecture.Presenter
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.StateFlow

View File

@@ -1,4 +1,4 @@
package io.element.android.x.core.architecture
package io.element.android.x.presentation
import androidx.compose.runtime.Composable
import kotlinx.coroutines.flow.Flow

View File

@@ -31,3 +31,4 @@ include(":libraries:designsystem")
include(":libraries:di")
include(":anvilannotations")
include(":anvilcodegen")
include(":libraries:presentation")