Merge branch 'develop' of https://github.com/vector-im/element-x-android into feature/dla/emojibase_integration
This commit is contained in:
commit
6c6aa04c96
11 changed files with 31 additions and 41 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
|
@ -38,7 +38,7 @@ jobs:
|
||||||
distribution: 'temurin' # See 'Supported distributions' for available options
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
- name: Configure gradle
|
- name: Configure gradle
|
||||||
uses: gradle/gradle-build-action@v2.7.1
|
uses: gradle/gradle-build-action@v2.8.0
|
||||||
with:
|
with:
|
||||||
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
|
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
|
||||||
- name: Assemble debug APK
|
- name: Assemble debug APK
|
||||||
|
|
|
||||||
2
.github/workflows/nightlyReports.yml
vendored
2
.github/workflows/nightlyReports.yml
vendored
|
|
@ -62,7 +62,7 @@ jobs:
|
||||||
distribution: 'temurin' # See 'Supported distributions' for available options
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
- name: Configure gradle
|
- name: Configure gradle
|
||||||
uses: gradle/gradle-build-action@v2.7.1
|
uses: gradle/gradle-build-action@v2.8.0
|
||||||
with:
|
with:
|
||||||
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
|
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
|
||||||
- name: Dependency analysis
|
- name: Dependency analysis
|
||||||
|
|
|
||||||
2
.github/workflows/quality.yml
vendored
2
.github/workflows/quality.yml
vendored
|
|
@ -40,7 +40,7 @@ jobs:
|
||||||
distribution: 'temurin' # See 'Supported distributions' for available options
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
- name: Configure gradle
|
- name: Configure gradle
|
||||||
uses: gradle/gradle-build-action@v2.7.1
|
uses: gradle/gradle-build-action@v2.8.0
|
||||||
with:
|
with:
|
||||||
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
|
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
|
||||||
- name: Run code quality check suite
|
- name: Run code quality check suite
|
||||||
|
|
|
||||||
2
.github/workflows/recordScreenshots.yml
vendored
2
.github/workflows/recordScreenshots.yml
vendored
|
|
@ -24,7 +24,7 @@ jobs:
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
# Add gradle cache, this should speed up the process
|
# Add gradle cache, this should speed up the process
|
||||||
- name: Configure gradle
|
- name: Configure gradle
|
||||||
uses: gradle/gradle-build-action@v2.7.1
|
uses: gradle/gradle-build-action@v2.8.0
|
||||||
with:
|
with:
|
||||||
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
|
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
|
||||||
- name: Record screenshots
|
- name: Record screenshots
|
||||||
|
|
|
||||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
|
@ -25,7 +25,7 @@ jobs:
|
||||||
distribution: 'temurin' # See 'Supported distributions' for available options
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
- name: Configure gradle
|
- name: Configure gradle
|
||||||
uses: gradle/gradle-build-action@v2.7.1
|
uses: gradle/gradle-build-action@v2.8.0
|
||||||
- name: Create app bundle
|
- name: Create app bundle
|
||||||
env:
|
env:
|
||||||
ELEMENT_ANDROID_MAPTILER_API_KEY: ${{ secrets.MAPTILER_KEY }}
|
ELEMENT_ANDROID_MAPTILER_API_KEY: ${{ secrets.MAPTILER_KEY }}
|
||||||
|
|
|
||||||
2
.github/workflows/sonar.yml
vendored
2
.github/workflows/sonar.yml
vendored
|
|
@ -32,7 +32,7 @@ jobs:
|
||||||
distribution: 'temurin' # See 'Supported distributions' for available options
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
- name: Configure gradle
|
- name: Configure gradle
|
||||||
uses: gradle/gradle-build-action@v2.7.1
|
uses: gradle/gradle-build-action@v2.8.0
|
||||||
with:
|
with:
|
||||||
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
|
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
|
||||||
- name: 🔊 Publish results to Sonar
|
- name: 🔊 Publish results to Sonar
|
||||||
|
|
|
||||||
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
|
|
@ -34,7 +34,7 @@ jobs:
|
||||||
distribution: 'temurin' # See 'Supported distributions' for available options
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
- name: Configure gradle
|
- name: Configure gradle
|
||||||
uses: gradle/gradle-build-action@v2.7.1
|
uses: gradle/gradle-build-action@v2.8.0
|
||||||
with:
|
with:
|
||||||
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
|
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ import com.bumble.appyx.core.node.Node
|
||||||
import com.bumble.appyx.core.node.ParentNode
|
import com.bumble.appyx.core.node.ParentNode
|
||||||
import com.bumble.appyx.core.plugin.Plugin
|
import com.bumble.appyx.core.plugin.Plugin
|
||||||
import io.element.android.appnav.LoggedInAppScopeFlowNode
|
import io.element.android.appnav.LoggedInAppScopeFlowNode
|
||||||
import io.element.android.appnav.room.RoomLoadedFlowNode
|
|
||||||
import io.element.android.appnav.RootFlowNode
|
import io.element.android.appnav.RootFlowNode
|
||||||
|
import io.element.android.appnav.room.RoomLoadedFlowNode
|
||||||
import io.element.android.libraries.architecture.bindings
|
import io.element.android.libraries.architecture.bindings
|
||||||
import io.element.android.libraries.architecture.createNode
|
import io.element.android.libraries.architecture.createNode
|
||||||
import io.element.android.libraries.di.DaggerComponentOwner
|
import io.element.android.libraries.di.DaggerComponentOwner
|
||||||
|
|
@ -45,15 +45,14 @@ class MainNode(
|
||||||
buildContext: BuildContext,
|
buildContext: BuildContext,
|
||||||
private val mainDaggerComponentOwner: MainDaggerComponentsOwner,
|
private val mainDaggerComponentOwner: MainDaggerComponentsOwner,
|
||||||
plugins: List<Plugin>,
|
plugins: List<Plugin>,
|
||||||
) :
|
) : ParentNode<MainNode.RootNavTarget>(
|
||||||
ParentNode<MainNode.RootNavTarget>(
|
navModel = PermanentNavModel(
|
||||||
navModel = PermanentNavModel(
|
navTargets = setOf(RootNavTarget),
|
||||||
navTargets = setOf(RootNavTarget),
|
savedStateMap = buildContext.savedStateMap,
|
||||||
savedStateMap = buildContext.savedStateMap,
|
|
||||||
),
|
|
||||||
buildContext = buildContext,
|
|
||||||
plugins = plugins,
|
|
||||||
),
|
),
|
||||||
|
buildContext = buildContext,
|
||||||
|
plugins = plugins,
|
||||||
|
),
|
||||||
DaggerComponentOwner by mainDaggerComponentOwner {
|
DaggerComponentOwner by mainDaggerComponentOwner {
|
||||||
|
|
||||||
private val loggedInFlowNodeCallback = object : LoggedInAppScopeFlowNode.LifecycleCallback {
|
private val loggedInFlowNodeCallback = object : LoggedInAppScopeFlowNode.LifecycleCallback {
|
||||||
|
|
|
||||||
|
|
@ -23,16 +23,15 @@ import coil.Coil
|
||||||
import com.bumble.appyx.core.composable.Children
|
import com.bumble.appyx.core.composable.Children
|
||||||
import com.bumble.appyx.core.lifecycle.subscribe
|
import com.bumble.appyx.core.lifecycle.subscribe
|
||||||
import com.bumble.appyx.core.modality.BuildContext
|
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.Node
|
||||||
|
import com.bumble.appyx.core.node.ParentNode
|
||||||
import com.bumble.appyx.core.plugin.Plugin
|
import com.bumble.appyx.core.plugin.Plugin
|
||||||
import com.bumble.appyx.core.plugin.plugins
|
import com.bumble.appyx.core.plugin.plugins
|
||||||
import com.bumble.appyx.navmodel.backstack.BackStack
|
|
||||||
import dagger.assisted.Assisted
|
import dagger.assisted.Assisted
|
||||||
import dagger.assisted.AssistedInject
|
import dagger.assisted.AssistedInject
|
||||||
import io.element.android.anvilannotations.ContributesNode
|
import io.element.android.anvilannotations.ContributesNode
|
||||||
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.animation.rememberDefaultTransitionHandler
|
|
||||||
import io.element.android.libraries.architecture.bindings
|
import io.element.android.libraries.architecture.bindings
|
||||||
import io.element.android.libraries.architecture.createNode
|
import io.element.android.libraries.architecture.createNode
|
||||||
import io.element.android.libraries.architecture.inputs
|
import io.element.android.libraries.architecture.inputs
|
||||||
|
|
@ -51,9 +50,9 @@ import kotlinx.parcelize.Parcelize
|
||||||
class LoggedInAppScopeFlowNode @AssistedInject constructor(
|
class LoggedInAppScopeFlowNode @AssistedInject constructor(
|
||||||
@Assisted buildContext: BuildContext,
|
@Assisted buildContext: BuildContext,
|
||||||
@Assisted plugins: List<Plugin>,
|
@Assisted plugins: List<Plugin>,
|
||||||
) : BackstackNode<LoggedInAppScopeFlowNode.NavTarget>(
|
) : ParentNode<LoggedInAppScopeFlowNode.NavTarget>(
|
||||||
backstack = BackStack(
|
navModel = PermanentNavModel(
|
||||||
initialElement = NavTarget.Root,
|
navTargets = setOf(NavTarget),
|
||||||
savedStateMap = buildContext.savedStateMap,
|
savedStateMap = buildContext.savedStateMap,
|
||||||
),
|
),
|
||||||
buildContext = buildContext,
|
buildContext = buildContext,
|
||||||
|
|
@ -63,10 +62,8 @@ class LoggedInAppScopeFlowNode @AssistedInject constructor(
|
||||||
fun onOpenBugReport()
|
fun onOpenBugReport()
|
||||||
}
|
}
|
||||||
|
|
||||||
sealed interface NavTarget : Parcelable {
|
@Parcelize
|
||||||
@Parcelize
|
object NavTarget : Parcelable
|
||||||
data object Root : NavTarget
|
|
||||||
}
|
|
||||||
|
|
||||||
interface LifecycleCallback : NodeLifecycleCallback {
|
interface LifecycleCallback : NodeLifecycleCallback {
|
||||||
fun onFlowCreated(identifier: String, client: MatrixClient)
|
fun onFlowCreated(identifier: String, client: MatrixClient)
|
||||||
|
|
@ -95,31 +92,24 @@ class LoggedInAppScopeFlowNode @AssistedInject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node {
|
override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node {
|
||||||
return when (navTarget) {
|
val callback = object : LoggedInFlowNode.Callback {
|
||||||
NavTarget.Root -> {
|
override fun onOpenBugReport() {
|
||||||
val callback = object : LoggedInFlowNode.Callback {
|
plugins<Callback>().forEach { it.onOpenBugReport() }
|
||||||
override fun onOpenBugReport() {
|
|
||||||
plugins<Callback>().forEach { it.onOpenBugReport() }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
val nodeLifecycleCallbacks = plugins<NodeLifecycleCallback>()
|
|
||||||
createNode<LoggedInFlowNode>(buildContext, nodeLifecycleCallbacks + callback)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
val nodeLifecycleCallbacks = plugins<NodeLifecycleCallback>()
|
||||||
|
return createNode<LoggedInFlowNode>(buildContext, nodeLifecycleCallbacks + callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun attachSession(): LoggedInFlowNode {
|
suspend fun attachSession(): LoggedInFlowNode {
|
||||||
return waitForChildAttached { navTarget ->
|
return waitForChildAttached { _ -> true }
|
||||||
navTarget is NavTarget.Root
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
override fun View(modifier: Modifier) {
|
override fun View(modifier: Modifier) {
|
||||||
Children(
|
Children(
|
||||||
navModel = backstack,
|
navModel = navModel,
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
transitionHandler = rememberDefaultTransitionHandler(),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ dependencycheck = "8.4.0"
|
||||||
dependencyanalysis = "1.21.0"
|
dependencyanalysis = "1.21.0"
|
||||||
stem = "2.3.0"
|
stem = "2.3.0"
|
||||||
sqldelight = "1.5.5"
|
sqldelight = "1.5.5"
|
||||||
telephoto = "0.5.0"
|
telephoto = "0.6.0-SNAPSHOT"
|
||||||
|
|
||||||
# DI
|
# DI
|
||||||
dagger = "2.47"
|
dagger = "2.47"
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ dependencyResolutionManagement {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
maven { url = URI("https://oss.sonatype.org/content/repositories/snapshots/") }
|
||||||
maven {
|
maven {
|
||||||
url = URI("https://www.jitpack.io")
|
url = URI("https://www.jitpack.io")
|
||||||
content {
|
content {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue