Merge branch 'develop' into feature/bma/sxcludePreviewFromCodeCoverage
This commit is contained in:
commit
92d8e4f55b
952 changed files with 1476 additions and 2027 deletions
|
|
@ -14,10 +14,19 @@ ij_smart_tabs = false
|
|||
ij_visual_guides = none
|
||||
ij_wrap_on_typing = false
|
||||
|
||||
# Ktlint rule, for more information see https://pinterest.github.io/ktlint/faq/#why-is-editorconfig-property-disabled_rules-deprecated-and-how-do-i-resolve-this
|
||||
# Ktlint rule, for more information see https://pinterest.github.io/ktlint/1.1.1/faq/#how-do-i-enable-or-disable-a-rule
|
||||
ktlint_standard_wrapping = disabled
|
||||
ktlint_standard_trailing-comma-on-call-site = disabled
|
||||
|
||||
ktlint_standard_trailing-comma-on-declaration-site = disabled
|
||||
ktlint_standard_multiline-expression-wrapping = disabled
|
||||
ktlint_standard_string-template-indent = disabled
|
||||
ktlint_standard_spacing-between-declarations-with-annotations = disabled
|
||||
ktlint_standard_function-signature = disabled
|
||||
ktlint_standard_annotation = disabled
|
||||
ktlint_standard_parameter-list-wrapping = disabled
|
||||
ktlint_standard_indent = disabled
|
||||
ktlint_standard_blank-line-before-declaration = disabled
|
||||
ktlint_function_naming_ignore_when_annotated_with=Composable
|
||||
|
||||
[*.java]
|
||||
ij_java_align_consecutive_assignments = false
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ import java.io.File
|
|||
*/
|
||||
@AutoService(CodeGenerator::class)
|
||||
class ContributesNodeCodeGenerator : CodeGenerator {
|
||||
|
||||
override fun isApplicable(context: AnvilContext): Boolean = true
|
||||
|
||||
override fun generateCode(codeGenDir: File, module: ModuleDescriptor, projectFiles: Collection<KtFile>): Collection<GeneratedFile> {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ import io.element.android.x.initializer.CrashInitializer
|
|||
import io.element.android.x.initializer.TracingInitializer
|
||||
|
||||
class ElementXApplication : Application(), DaggerComponentOwner {
|
||||
|
||||
override val daggerComponent: AppComponent = DaggerAppComponent.factory().create(this)
|
||||
|
||||
override fun onCreate() {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ import timber.log.Timber
|
|||
private val loggerTag = LoggerTag("MainActivity")
|
||||
|
||||
class MainActivity : NodeActivity() {
|
||||
|
||||
private lateinit var mainNode: MainNode
|
||||
private lateinit var appBindings: AppBindings
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ class MainNode(
|
|||
plugins = plugins,
|
||||
),
|
||||
DaggerComponentOwner {
|
||||
|
||||
override val daggerComponent = (context as DaggerComponentOwner).daggerComponent
|
||||
|
||||
override fun resolve(navTarget: RootNavTarget, buildContext: BuildContext): Node {
|
||||
|
|
@ -68,5 +67,4 @@ class MainNode(
|
|||
|
||||
@Parcelize
|
||||
object RootNavTarget : Parcelable
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,8 +27,12 @@ import io.element.android.libraries.matrix.api.tracing.TracingService
|
|||
@ContributesTo(AppScope::class)
|
||||
interface AppBindings {
|
||||
fun snackbarDispatcher(): SnackbarDispatcher
|
||||
|
||||
fun tracingService(): TracingService
|
||||
|
||||
fun bugReporter(): BugReporter
|
||||
|
||||
fun lockScreenService(): LockScreenService
|
||||
|
||||
fun preferencesStore(): PreferencesStore
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,9 +28,11 @@ import io.element.android.libraries.di.SingleIn
|
|||
@SingleIn(AppScope::class)
|
||||
@MergeComponent(AppScope::class)
|
||||
interface AppComponent : NodeFactoriesBindings {
|
||||
|
||||
@Component.Factory
|
||||
interface Factory {
|
||||
fun create(@ApplicationContext @BindsInstance context: Context): AppComponent
|
||||
fun create(
|
||||
@ApplicationContext @BindsInstance
|
||||
context: Context
|
||||
): AppComponent
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ import java.io.File
|
|||
@Module
|
||||
@ContributesTo(AppScope::class)
|
||||
object AppModule {
|
||||
|
||||
@Provides
|
||||
fun providesBaseDirectory(@ApplicationContext context: Context): File {
|
||||
return File(context.filesDir, "sessions")
|
||||
|
|
@ -82,14 +81,20 @@ object AppModule {
|
|||
buildType = buildType,
|
||||
applicationName = context.getString(R.string.app_name),
|
||||
applicationId = BuildConfig.APPLICATION_ID,
|
||||
lowPrivacyLoggingEnabled = false, // TODO EAx Config.LOW_PRIVACY_LOG_ENABLE,
|
||||
// TODO EAx Config.LOW_PRIVACY_LOG_ENABLE,
|
||||
lowPrivacyLoggingEnabled = false,
|
||||
versionName = BuildConfig.VERSION_NAME,
|
||||
versionCode = BuildConfig.VERSION_CODE,
|
||||
gitRevision = "TODO", // BuildConfig.GIT_REVISION,
|
||||
gitRevisionDate = "TODO", // BuildConfig.GIT_REVISION_DATE,
|
||||
gitBranchName = "TODO", // BuildConfig.GIT_BRANCH_NAME,
|
||||
flavorDescription = "TODO", // BuildConfig.FLAVOR_DESCRIPTION,
|
||||
flavorShortDescription = "TODO", // BuildConfig.SHORT_FLAVOR_DESCRIPTION,
|
||||
// BuildConfig.GIT_REVISION,
|
||||
gitRevision = "TODO",
|
||||
// BuildConfig.GIT_REVISION_DATE,
|
||||
gitRevisionDate = "TODO",
|
||||
// BuildConfig.GIT_BRANCH_NAME,
|
||||
gitBranchName = "TODO",
|
||||
// BuildConfig.FLAVOR_DESCRIPTION,
|
||||
flavorDescription = "TODO",
|
||||
// BuildConfig.SHORT_FLAVOR_DESCRIPTION,
|
||||
flavorShortDescription = "TODO",
|
||||
)
|
||||
|
||||
@Provides
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ import javax.inject.Inject
|
|||
class DefaultRoomComponentFactory @Inject constructor(
|
||||
private val roomComponentBuilder: RoomComponent.Builder
|
||||
) : RoomComponentFactory {
|
||||
|
||||
override fun create(room: MatrixRoom): Any {
|
||||
return roomComponentBuilder.room(room).build()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ import javax.inject.Inject
|
|||
class DefaultSessionComponentFactory @Inject constructor(
|
||||
private val sessionComponentBuilder: SessionComponent.Builder
|
||||
) : SessionComponentFactory {
|
||||
|
||||
override fun create(client: MatrixClient): Any {
|
||||
return sessionComponentBuilder.client(client).build()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import io.element.android.libraries.matrix.api.room.MatrixRoom
|
|||
@SingleIn(RoomScope::class)
|
||||
@MergeSubcomponent(RoomScope::class)
|
||||
interface RoomComponent : NodeFactoriesBindings {
|
||||
|
||||
@Subcomponent.Builder
|
||||
interface Builder {
|
||||
@BindsInstance
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import io.element.android.libraries.matrix.api.MatrixClient
|
|||
@SingleIn(SessionScope::class)
|
||||
@MergeSubcomponent(SessionScope::class)
|
||||
interface SessionComponent : NodeFactoriesBindings {
|
||||
|
||||
@Subcomponent.Builder
|
||||
interface Builder {
|
||||
@BindsInstance
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import androidx.startup.Initializer
|
|||
import io.element.android.features.rageshake.impl.crash.VectorUncaughtExceptionHandler
|
||||
|
||||
class CrashInitializer : Initializer<Unit> {
|
||||
|
||||
override fun create(context: Context) {
|
||||
VectorUncaughtExceptionHandler(context).activate()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ import io.element.android.x.di.AppBindings
|
|||
import timber.log.Timber
|
||||
|
||||
class TracingInitializer : Initializer<Unit> {
|
||||
|
||||
override fun create(context: Context) {
|
||||
val appBindings = context.bindings<AppBindings>()
|
||||
val tracingService = appBindings.tracingService()
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ import org.robolectric.RuntimeEnvironment
|
|||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
class IntentProviderImplTest {
|
||||
|
||||
@Test
|
||||
fun `test getViewRoomIntent with Session`() {
|
||||
val sut = createIntentProviderImpl()
|
||||
|
|
|
|||
|
|
@ -25,48 +25,27 @@ import kotlin.time.Duration.Companion.seconds
|
|||
|
||||
/**
|
||||
* Configuration for the lock screen feature.
|
||||
* @property isPinMandatory Whether the PIN is mandatory or not.
|
||||
* @property pinBlacklist Some PINs are forbidden.
|
||||
* @property pinSize The size of the PIN.
|
||||
* @property maxPinCodeAttemptsBeforeLogout Number of attempts before the user is logged out.
|
||||
* @property gracePeriod Time period before locking the app once backgrounded.
|
||||
* @property isStrongBiometricsEnabled Authentication with strong methods (fingerprint, some face/iris unlock implementations) is supported.
|
||||
* @property isWeakBiometricsEnabled Authentication with weak methods (most face/iris unlock implementations) is supported.
|
||||
*/
|
||||
data class LockScreenConfig(
|
||||
/**
|
||||
* Whether the PIN is mandatory or not.
|
||||
*/
|
||||
val isPinMandatory: Boolean,
|
||||
|
||||
/**
|
||||
* Some PINs are forbidden.
|
||||
*/
|
||||
val pinBlacklist: Set<String>,
|
||||
|
||||
/**
|
||||
* The size of the PIN.
|
||||
*/
|
||||
val pinSize: Int,
|
||||
|
||||
/**
|
||||
* Number of attempts before the user is logged out.
|
||||
*/
|
||||
val maxPinCodeAttemptsBeforeLogout: Int,
|
||||
|
||||
/**
|
||||
* Time period before locking the app once backgrounded.
|
||||
*/
|
||||
val gracePeriod: Duration,
|
||||
|
||||
/**
|
||||
* Authentication with strong methods (fingerprint, some face/iris unlock implementations) is supported.
|
||||
*/
|
||||
val isStrongBiometricsEnabled: Boolean,
|
||||
|
||||
/**
|
||||
* Authentication with weak methods (most face/iris unlock implementations) is supported.
|
||||
*/
|
||||
val isWeakBiometricsEnabled: Boolean,
|
||||
)
|
||||
|
||||
@ContributesTo(AppScope::class)
|
||||
@Module
|
||||
object LockScreenConfigModule {
|
||||
|
||||
@Provides
|
||||
fun providesLockScreenConfig(): LockScreenConfig = LockScreenConfig(
|
||||
isPinMandatory = false,
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@
|
|||
package io.element.android.appconfig
|
||||
|
||||
object MatrixConfiguration {
|
||||
const val matrixToPermalinkBaseUrl: String = "https://matrix.to/#/"
|
||||
const val MATRIX_TO_PERMALINK_BASE_URL: String = "https://matrix.to/#/"
|
||||
val clientPermalinkBaseUrl: String? = null
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ package io.element.android.appconfig
|
|||
|
||||
object NotificationConfig {
|
||||
// TODO EAx Implement and set to true at some point
|
||||
const val supportMarkAsReadAction = false
|
||||
const val SUPPORT_MARK_AS_READ_ACTION = false
|
||||
|
||||
// TODO EAx Implement and set to true at some point
|
||||
const val supportQuickReplyAction = false
|
||||
const val SUPPORT_QUICK_REPLY_ACTION = false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,5 +20,5 @@ object PushConfig {
|
|||
/**
|
||||
* Note: pusher_app_id cannot exceed 64 chars.
|
||||
*/
|
||||
const val pusher_app_id: String = "im.vector.app.android"
|
||||
const val PUSHER_APP_ID: String = "im.vector.app.android"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@
|
|||
package io.element.android.appconfig
|
||||
|
||||
object RoomListConfig {
|
||||
const val showInviteMenuItem = false
|
||||
const val showReportProblemMenuItem = false
|
||||
const val SHOW_INVITE_MENU_ITEM = false
|
||||
const val SHOW_REPORT_PROBLEM_MENU_ITEM = false
|
||||
|
||||
const val hasDropdownMenu = showInviteMenuItem || showReportProblemMenuItem
|
||||
const val HAS_DROP_DOWN_MENU = SHOW_INVITE_MENU_ITEM || SHOW_REPORT_PROBLEM_MENU_ITEM
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,5 +17,5 @@
|
|||
package io.element.android.appconfig
|
||||
|
||||
object SecureBackupConfig {
|
||||
const val LearnMoreUrl: String = "https://element.io/help#encryption5"
|
||||
const val LEARN_MORE_URL: String = "https://element.io/help#encryption5"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,5 +17,5 @@
|
|||
package io.element.android.appconfig
|
||||
|
||||
object TimelineConfig {
|
||||
const val maxReadReceiptToDisplay = 3
|
||||
const val MAX_READ_RECEIPT_TO_DISPLAY = 3
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,4 +40,3 @@ fun <T : Any> BackStack<T>.removeLast(element: T) {
|
|||
} ?: return
|
||||
accept(Remove(lastExpectedNavElement.key))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ class LoggedInEventProcessor @Inject constructor(
|
|||
roomMembershipObserver: RoomMembershipObserver,
|
||||
sessionVerificationService: SessionVerificationService,
|
||||
) {
|
||||
|
||||
private var observingJob: Job? = null
|
||||
|
||||
private val displayLeftRoomMessage = roomMembershipObserver.updates
|
||||
|
|
|
|||
|
|
@ -111,7 +111,6 @@ class LoggedInFlowNode @AssistedInject constructor(
|
|||
buildContext = buildContext,
|
||||
plugins = plugins
|
||||
) {
|
||||
|
||||
interface Callback : Plugin {
|
||||
fun onOpenBugReport()
|
||||
}
|
||||
|
|
@ -138,7 +137,7 @@ class LoggedInFlowNode @AssistedInject constructor(
|
|||
},
|
||||
onStop = {
|
||||
coroutineScope.launch {
|
||||
//Counterpart startSync is done in observeSyncStateAndNetworkStatus method.
|
||||
// Counterpart startSync is done in observeSyncStateAndNetworkStatus method.
|
||||
syncService.stopSync()
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ class RootFlowNode @AssistedInject constructor(
|
|||
buildContext = buildContext,
|
||||
plugins = plugins
|
||||
) {
|
||||
|
||||
override fun onBuilt() {
|
||||
matrixClientsHolder.restoreWithSavedState(buildContext.savedStateMap)
|
||||
super.onBuilt()
|
||||
|
|
@ -268,10 +267,9 @@ class RootFlowNode @AssistedInject constructor(
|
|||
}
|
||||
|
||||
private suspend fun attachSession(sessionId: SessionId): LoggedInAppScopeFlowNode {
|
||||
//TODO handle multi-session
|
||||
// TODO handle multi-session
|
||||
return waitForChildAttached { navTarget ->
|
||||
navTarget is NavTarget.LoggedInFlow && navTarget.sessionId == sessionId
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ private const val SAVE_INSTANCE_KEY = "io.element.android.x.di.MatrixClientsHold
|
|||
@SingleIn(AppScope::class)
|
||||
@ContributesBinding(AppScope::class)
|
||||
class MatrixClientsHolder @Inject constructor(private val authenticationService: MatrixAuthenticationService) : MatrixClientProvider {
|
||||
|
||||
private val sessionIdsToMatrixClient = ConcurrentHashMap<SessionId, MatrixClient>()
|
||||
private val restoreMutex = Mutex()
|
||||
|
||||
|
|
@ -65,8 +64,9 @@ class MatrixClientsHolder @Inject constructor(private val authenticationService:
|
|||
@Suppress("UNCHECKED_CAST")
|
||||
fun restoreWithSavedState(state: SavedStateMap?) {
|
||||
Timber.d("Restore state")
|
||||
if (state == null || sessionIdsToMatrixClient.isNotEmpty()) return Unit.also {
|
||||
if (state == null || sessionIdsToMatrixClient.isNotEmpty()) {
|
||||
Timber.w("Restore with non-empty map")
|
||||
return
|
||||
}
|
||||
val sessionIds = state[SAVE_INSTANCE_KEY] as? Array<SessionId>
|
||||
Timber.d("Restore matrix session keys = ${sessionIds?.map { it.value }}")
|
||||
|
|
|
|||
|
|
@ -1,21 +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.loggedin
|
||||
|
||||
// sealed interface LoggedInEvents {
|
||||
// data object MyEvent : LoggedInEvents
|
||||
// }
|
||||
|
|
@ -35,7 +35,6 @@ class LoggedInNode @AssistedInject constructor(
|
|||
buildContext = buildContext,
|
||||
plugins = plugins
|
||||
) {
|
||||
|
||||
@Composable
|
||||
override fun View(modifier: Modifier) {
|
||||
val loggedInState = loggedInPresenter.present()
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ class LoggedInPresenter @Inject constructor(
|
|||
private val networkMonitor: NetworkMonitor,
|
||||
private val pushService: PushService,
|
||||
) : Presenter<LoggedInState> {
|
||||
|
||||
@Composable
|
||||
override fun present(): LoggedInState {
|
||||
LaunchedEffect(Unit) {
|
||||
|
|
|
|||
|
|
@ -59,15 +59,15 @@ fun SyncStateView(
|
|||
) {
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.background(color = ElementTheme.colors.bgSubtleSecondary)
|
||||
.padding(horizontal = 24.dp, vertical = 10.dp),
|
||||
.background(color = ElementTheme.colors.bgSubtleSecondary)
|
||||
.padding(horizontal = 24.dp, vertical = 10.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(10.dp)
|
||||
) {
|
||||
CircularProgressIndicator(
|
||||
modifier = Modifier
|
||||
.progressSemantics()
|
||||
.size(12.dp),
|
||||
.progressSemantics()
|
||||
.size(12.dp),
|
||||
color = ElementTheme.colors.textPrimary,
|
||||
strokeWidth = 1.5.dp,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ open class LoadingRoomStateProvider : PreviewParameterProvider<LoadingRoomState>
|
|||
|
||||
@SingleIn(SessionScope::class)
|
||||
class LoadingRoomStateFlowFactory @Inject constructor(private val matrixClient: MatrixClient) {
|
||||
|
||||
fun create(lifecycleScope: CoroutineScope, roomId: RoomId): StateFlow<LoadingRoomState> =
|
||||
getRoomFlow(roomId)
|
||||
.map { room ->
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ class RoomFlowNode @AssistedInject constructor(
|
|||
buildContext = buildContext,
|
||||
plugins = plugins
|
||||
) {
|
||||
|
||||
data class Inputs(
|
||||
val roomId: RoomId,
|
||||
val initialElement: RoomLoadedFlowNode.NavTarget = RoomLoadedFlowNode.NavTarget.Messages,
|
||||
|
|
@ -136,4 +135,3 @@ class RoomFlowNode @AssistedInject constructor(
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@ class RoomLoadedFlowNode @AssistedInject constructor(
|
|||
buildContext = buildContext,
|
||||
plugins = plugins,
|
||||
), DaggerComponentOwner {
|
||||
|
||||
interface Callback : Plugin {
|
||||
fun onOpenRoom(roomId: RoomId)
|
||||
fun onForwardedToSingleRoom(roomId: RoomId)
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ class RootNavStateFlowFactory @Inject constructor(
|
|||
private val matrixClientsHolder: MatrixClientsHolder,
|
||||
private val loginUserStory: LoginUserStory,
|
||||
) {
|
||||
|
||||
private var currentCacheIndex = 0
|
||||
|
||||
fun create(savedStateMap: SavedStateMap?): Flow<RootNavState> {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ class RootPresenter @Inject constructor(
|
|||
private val rageshakeDetectionPresenter: RageshakeDetectionPresenter,
|
||||
private val appErrorStateService: AppErrorStateService,
|
||||
) : Presenter<RootState> {
|
||||
|
||||
@Composable
|
||||
override fun present(): RootState {
|
||||
val rageshakeDetectionState = rageshakeDetectionPresenter.present()
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ import org.junit.Rule
|
|||
import org.junit.Test
|
||||
|
||||
class RoomFlowNodeTest {
|
||||
|
||||
@get:Rule
|
||||
val instantTaskExecutorRule = InstantTaskExecutorRule()
|
||||
|
||||
|
|
@ -49,7 +48,6 @@ class RoomFlowNodeTest {
|
|||
val mainDispatcherRule = MainDispatcherRule()
|
||||
|
||||
private class FakeMessagesEntryPoint : MessagesEntryPoint {
|
||||
|
||||
var nodeId: String? = null
|
||||
var callback: MessagesEntryPoint.Callback? = null
|
||||
|
||||
|
|
@ -68,12 +66,10 @@ class RoomFlowNodeTest {
|
|||
}
|
||||
|
||||
private class FakeRoomDetailsEntryPoint : RoomDetailsEntryPoint {
|
||||
|
||||
var nodeId: String? = null
|
||||
|
||||
override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): RoomDetailsEntryPoint.NodeBuilder {
|
||||
return object : RoomDetailsEntryPoint.NodeBuilder {
|
||||
|
||||
override fun params(params: RoomDetailsEntryPoint.Params): RoomDetailsEntryPoint.NodeBuilder {
|
||||
return this
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ import org.junit.Rule
|
|||
import org.junit.Test
|
||||
|
||||
class LoggedInPresenterTest {
|
||||
|
||||
@get:Rule
|
||||
val warmUpRule = WarmUpRule()
|
||||
|
||||
|
|
|
|||
|
|
@ -28,25 +28,24 @@ import kotlinx.coroutines.test.runTest
|
|||
import org.junit.Test
|
||||
|
||||
class LoadingRoomStateFlowFactoryTest {
|
||||
|
||||
@Test
|
||||
fun `flow should emit Loading and then Loaded when there is a room in cache`() = runTest {
|
||||
val room = FakeMatrixRoom(sessionId= A_SESSION_ID, roomId = A_ROOM_ID)
|
||||
val room = FakeMatrixRoom(sessionId = A_SESSION_ID, roomId = A_ROOM_ID)
|
||||
val matrixClient = FakeMatrixClient(A_SESSION_ID).apply {
|
||||
givenGetRoomResult(A_ROOM_ID, room)
|
||||
}
|
||||
val flowFactory = LoadingRoomStateFlowFactory(matrixClient)
|
||||
flowFactory
|
||||
.create(this, A_ROOM_ID)
|
||||
.test {
|
||||
assertThat(awaitItem()).isEqualTo(LoadingRoomState.Loading)
|
||||
assertThat(awaitItem()).isEqualTo(LoadingRoomState.Loaded(room))
|
||||
}
|
||||
.test {
|
||||
assertThat(awaitItem()).isEqualTo(LoadingRoomState.Loading)
|
||||
assertThat(awaitItem()).isEqualTo(LoadingRoomState.Loaded(room))
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `flow should emit Loading and then Loaded when there is a room in cache after SS is loaded`() = runTest {
|
||||
val room = FakeMatrixRoom(sessionId= A_SESSION_ID, roomId = A_ROOM_ID)
|
||||
val room = FakeMatrixRoom(sessionId = A_SESSION_ID, roomId = A_ROOM_ID)
|
||||
val roomListService = FakeRoomListService()
|
||||
val matrixClient = FakeMatrixClient(A_SESSION_ID, roomListService = roomListService)
|
||||
val flowFactory = LoadingRoomStateFlowFactory(matrixClient)
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ allprojects {
|
|||
config.from(files("$rootDir/tools/detekt/detekt.yml"))
|
||||
}
|
||||
dependencies {
|
||||
detektPlugins("io.nlopez.compose.rules:detekt:0.3.8")
|
||||
detektPlugins("io.nlopez.compose.rules:detekt:0.3.9")
|
||||
}
|
||||
|
||||
// KtLint
|
||||
|
|
@ -72,7 +72,7 @@ allprojects {
|
|||
configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> {
|
||||
// See https://github.com/pinterest/ktlint/releases/
|
||||
// TODO Regularly check for new version here ^
|
||||
version.set("0.48.2")
|
||||
version.set("1.1.1")
|
||||
android.set(true)
|
||||
ignoreFailures.set(false)
|
||||
enableExperimentalRules.set(true)
|
||||
|
|
@ -100,8 +100,8 @@ allprojects {
|
|||
kotlinOptions.allWarningsAsErrors = project.properties["allWarningsAsErrors"] == "true"
|
||||
|
||||
kotlinOptions {
|
||||
// Uncomment to suppress Compose Kotlin compiler compatibility warning
|
||||
/*
|
||||
// Uncomment to suppress Compose Kotlin compiler compatibility warning
|
||||
freeCompilerArgs += listOf(
|
||||
"-P",
|
||||
"plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true"
|
||||
|
|
@ -194,7 +194,7 @@ subprojects {
|
|||
|
||||
// Workaround for https://github.com/airbnb/Showkase/issues/335
|
||||
subprojects {
|
||||
tasks.withType<KspTask>() {
|
||||
tasks.withType<KspTask> {
|
||||
doLast {
|
||||
fileTree(layout.buildDirectory).apply { include("**/*ShowkaseExtension*.kt") }.files.forEach { file ->
|
||||
ReplaceRegExp().apply {
|
||||
|
|
@ -216,13 +216,15 @@ subprojects {
|
|||
if (project.findProperty("composeCompilerReports") == "true") {
|
||||
freeCompilerArgs += listOf(
|
||||
"-P",
|
||||
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=${project.layout.buildDirectory.asFile.get().absolutePath}/compose_compiler"
|
||||
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
|
||||
"${project.layout.buildDirectory.asFile.get().absolutePath}/compose_compiler"
|
||||
)
|
||||
}
|
||||
if (project.findProperty("composeCompilerMetrics") == "true") {
|
||||
freeCompilerArgs += listOf(
|
||||
"-P",
|
||||
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=${project.layout.buildDirectory.asFile.get().absolutePath}/compose_compiler"
|
||||
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
|
||||
"${project.layout.buildDirectory.asFile.get().absolutePath}/compose_compiler"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
1
changelog.d/2156.bugfix
Normal file
1
changelog.d/2156.bugfix
Normal file
|
|
@ -0,0 +1 @@
|
|||
Improve rendering of voice messages in the timeline in large displays
|
||||
|
|
@ -25,8 +25,8 @@ import io.element.android.features.analytics.api.AnalyticsOptInEvents
|
|||
import io.element.android.features.analytics.api.R
|
||||
import io.element.android.libraries.designsystem.components.LINK_TAG
|
||||
import io.element.android.libraries.designsystem.components.list.ListItemContent
|
||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||
import io.element.android.libraries.designsystem.text.buildAnnotatedStringWithStyledPart
|
||||
import io.element.android.libraries.designsystem.theme.components.ListItem
|
||||
import io.element.android.libraries.designsystem.theme.components.ListSupportingText
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ class AnalyticsOptInNode @AssistedInject constructor(
|
|||
@Assisted plugins: List<Plugin>,
|
||||
private val presenter: AnalyticsOptInPresenter,
|
||||
) : Node(buildContext, plugins = plugins) {
|
||||
|
||||
private fun onClickTerms(activity: Activity, darkTheme: Boolean) {
|
||||
activity.openUrlInChromeCustomTab(null, darkTheme, AnalyticsConfig.POLICY_LINK)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ class AnalyticsOptInPresenter @Inject constructor(
|
|||
private val buildMeta: BuildMeta,
|
||||
private val analyticsService: AnalyticsService,
|
||||
) : Presenter<AnalyticsOptInState> {
|
||||
|
||||
@Composable
|
||||
override fun present(): AnalyticsOptInState {
|
||||
val localCoroutineScope = rememberCoroutineScope()
|
||||
|
|
|
|||
|
|
@ -19,8 +19,7 @@ package io.element.android.features.analytics.impl
|
|||
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
|
||||
import javax.inject.Inject
|
||||
|
||||
open class AnalyticsOptInStateProvider @Inject constructor(
|
||||
) : PreviewParameterProvider<AnalyticsOptInState> {
|
||||
open class AnalyticsOptInStateProvider @Inject constructor() : PreviewParameterProvider<AnalyticsOptInState> {
|
||||
override val values: Sequence<AnalyticsOptInState>
|
||||
get() = sequenceOf(
|
||||
aAnalyticsOptInState(),
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ class DefaultAnalyticsPreferencesPresenter @Inject constructor(
|
|||
private val analyticsService: AnalyticsService,
|
||||
private val buildMeta: BuildMeta,
|
||||
) : AnalyticsPreferencesPresenter {
|
||||
|
||||
@Composable
|
||||
override fun present(): AnalyticsPreferencesState {
|
||||
val localCoroutineScope = rememberCoroutineScope()
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ import org.junit.Rule
|
|||
import org.junit.Test
|
||||
|
||||
class AnalyticsOptInPresenterTest {
|
||||
|
||||
@get:Rule
|
||||
val warmUpRule = WarmUpRule()
|
||||
|
||||
|
|
@ -70,4 +69,3 @@ class AnalyticsOptInPresenterTest {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import org.junit.Rule
|
|||
import org.junit.Test
|
||||
|
||||
class AnalyticsPreferencesPresenterTest {
|
||||
|
||||
@get:Rule
|
||||
val warmUpRule = WarmUpRule()
|
||||
|
||||
|
|
@ -82,4 +81,3 @@ class AnalyticsPreferencesPresenterTest {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ import io.element.android.features.call.ui.ElementCallActivity
|
|||
import io.element.android.libraries.designsystem.utils.CommonDrawables
|
||||
|
||||
class CallForegroundService : Service() {
|
||||
|
||||
companion object {
|
||||
fun start(context: Context) {
|
||||
val intent = Intent(context, CallForegroundService::class.java)
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ data class WidgetMessage(
|
|||
@SerialName("action") val action: Action,
|
||||
@SerialName("data") val data: JsonElement? = null,
|
||||
) {
|
||||
|
||||
@Serializable
|
||||
enum class Direction {
|
||||
@SerialName("fromWidget")
|
||||
FromWidget,
|
||||
|
||||
@SerialName("toWidget")
|
||||
ToWidget
|
||||
}
|
||||
|
|
@ -41,6 +41,7 @@ data class WidgetMessage(
|
|||
enum class Action {
|
||||
@SerialName("im.vector.hangup")
|
||||
HangUp,
|
||||
|
||||
@SerialName("send_event")
|
||||
SendEvent,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ class CallScreenPresenter @AssistedInject constructor(
|
|||
private val matrixClientsProvider: MatrixClientProvider,
|
||||
private val appCoroutineScope: CoroutineScope,
|
||||
) : Presenter<CallScreenState> {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(callType: CallType, navigator: CallScreenNavigator): CallScreenPresenter
|
||||
|
|
@ -224,6 +223,4 @@ class CallScreenPresenter @AssistedInject constructor(
|
|||
navigator.close()
|
||||
widgetDriver?.close()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import android.net.Uri
|
|||
import javax.inject.Inject
|
||||
|
||||
class CallIntentDataParser @Inject constructor() {
|
||||
|
||||
private val validHttpSchemes = sequenceOf("https")
|
||||
|
||||
fun parse(data: String?): String? {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ import kotlinx.coroutines.flow.MutableSharedFlow
|
|||
class WebViewWidgetMessageInterceptor(
|
||||
private val webView: WebView,
|
||||
) : WidgetMessageInterceptor {
|
||||
|
||||
companion object {
|
||||
// We call both the WebMessageListener and the JavascriptInterface objects in JS with this
|
||||
// 'listenerName' so they can both receive the data from the WebView when
|
||||
|
|
@ -56,7 +55,7 @@ class WebViewWidgetMessageInterceptor(
|
|||
|| !message.data.response && message.data.api == "fromWidget") {
|
||||
let json = JSON.stringify(event.data)
|
||||
${"console.log('message sent: ' + json);".takeIf { BuildConfig.DEBUG } }
|
||||
${LISTENER_NAME}.postMessage(json);
|
||||
$LISTENER_NAME.postMessage(json);
|
||||
} else {
|
||||
${"console.log('message received (ignored): ' + JSON.stringify(event.data));".takeIf { BuildConfig.DEBUG } }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import io.element.android.features.call.data.WidgetMessage
|
|||
import kotlinx.serialization.json.Json
|
||||
|
||||
object WidgetMessageSerializer {
|
||||
|
||||
private val coder = Json { ignoreUnknownKeys = true }
|
||||
|
||||
fun deserialize(message: String): Result<WidgetMessage> {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ import io.element.android.features.call.ui.mapWebkitPermissions
|
|||
import org.junit.Test
|
||||
|
||||
class MapWebkitPermissionsTest {
|
||||
|
||||
@Test
|
||||
fun `given Webkit's RESOURCE_AUDIO_CAPTURE returns Android's RECORD_AUDIO permission`() {
|
||||
val permission = mapWebkitPermissions(arrayOf(PermissionRequest.RESOURCE_AUDIO_CAPTURE))
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ import org.junit.Rule
|
|||
import org.junit.Test
|
||||
|
||||
class CallScreenPresenterTest {
|
||||
|
||||
@get:Rule
|
||||
val warmUpRule = WarmUpRule()
|
||||
|
||||
|
|
@ -191,7 +190,7 @@ class CallScreenPresenterTest {
|
|||
moleculeFlow(RecompositionMode.Immediate) {
|
||||
presenter.present()
|
||||
}.test {
|
||||
consumeItemsUntilTimeout()
|
||||
consumeItemsUntilTimeout()
|
||||
|
||||
assertThat(matrixClient.syncService().syncState.value).isEqualTo(SyncState.Running)
|
||||
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@
|
|||
package io.element.android.features.call.ui
|
||||
|
||||
class FakeCallScreenNavigator : CallScreenNavigator {
|
||||
var closeCalled = false
|
||||
private set
|
||||
var closeCalled = false
|
||||
private set
|
||||
|
||||
override fun close() {
|
||||
closeCalled = true
|
||||
}
|
||||
override fun close() {
|
||||
closeCalled = true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ import java.net.URLEncoder
|
|||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
class CallIntentDataParserTest {
|
||||
|
||||
private val callIntentDataParser = CallIntentDataParser()
|
||||
|
||||
@Test
|
||||
|
|
@ -117,7 +116,7 @@ class CallIntentDataParserTest {
|
|||
@Test
|
||||
fun `Element Call url with url extra param appPrompt gets url extracted`() {
|
||||
doTest(
|
||||
url = "${VALID_CALL_URL_WITH_PARAM}&appPrompt=true",
|
||||
url = "$VALID_CALL_URL_WITH_PARAM&appPrompt=true",
|
||||
expectedResult = "$VALID_CALL_URL_WITH_PARAM#?$EXTRA_PARAMS"
|
||||
)
|
||||
}
|
||||
|
|
@ -125,7 +124,7 @@ class CallIntentDataParserTest {
|
|||
@Test
|
||||
fun `Element Call url with url extra param in fragment appPrompt gets url extracted`() {
|
||||
doTest(
|
||||
url = "${VALID_CALL_URL_WITH_PARAM}#?appPrompt=true",
|
||||
url = "$VALID_CALL_URL_WITH_PARAM#?appPrompt=true",
|
||||
expectedResult = "$VALID_CALL_URL_WITH_PARAM#?appPrompt=false&confineToRoom=true"
|
||||
)
|
||||
}
|
||||
|
|
@ -133,7 +132,7 @@ class CallIntentDataParserTest {
|
|||
@Test
|
||||
fun `Element Call url with url extra param in fragment appPrompt and other gets url extracted`() {
|
||||
doTest(
|
||||
url = "${VALID_CALL_URL_WITH_PARAM}#?appPrompt=true&otherParam=maybe",
|
||||
url = "$VALID_CALL_URL_WITH_PARAM#?appPrompt=true&otherParam=maybe",
|
||||
expectedResult = "$VALID_CALL_URL_WITH_PARAM#?appPrompt=false&otherParam=maybe&confineToRoom=true"
|
||||
)
|
||||
}
|
||||
|
|
@ -141,7 +140,7 @@ class CallIntentDataParserTest {
|
|||
@Test
|
||||
fun `Element Call url with url extra param confineToRoom gets url extracted`() {
|
||||
doTest(
|
||||
url = "${VALID_CALL_URL_WITH_PARAM}&confineToRoom=false",
|
||||
url = "$VALID_CALL_URL_WITH_PARAM&confineToRoom=false",
|
||||
expectedResult = "$VALID_CALL_URL_WITH_PARAM#?$EXTRA_PARAMS"
|
||||
)
|
||||
}
|
||||
|
|
@ -149,7 +148,7 @@ class CallIntentDataParserTest {
|
|||
@Test
|
||||
fun `Element Call url with url extra param in fragment confineToRoom gets url extracted`() {
|
||||
doTest(
|
||||
url = "${VALID_CALL_URL_WITH_PARAM}#?confineToRoom=false",
|
||||
url = "$VALID_CALL_URL_WITH_PARAM#?confineToRoom=false",
|
||||
expectedResult = "$VALID_CALL_URL_WITH_PARAM#?confineToRoom=true&appPrompt=false"
|
||||
)
|
||||
}
|
||||
|
|
@ -157,7 +156,7 @@ class CallIntentDataParserTest {
|
|||
@Test
|
||||
fun `Element Call url with url extra param in fragment confineToRoom and more gets url extracted`() {
|
||||
doTest(
|
||||
url = "${VALID_CALL_URL_WITH_PARAM}#?confineToRoom=false&otherParam=maybe",
|
||||
url = "$VALID_CALL_URL_WITH_PARAM#?confineToRoom=false&otherParam=maybe",
|
||||
expectedResult = "$VALID_CALL_URL_WITH_PARAM#?confineToRoom=true&otherParam=maybe&appPrompt=false"
|
||||
)
|
||||
}
|
||||
|
|
@ -165,7 +164,7 @@ class CallIntentDataParserTest {
|
|||
@Test
|
||||
fun `Element Call url with url fragment gets url extracted`() {
|
||||
doTest(
|
||||
url = "${VALID_CALL_URL_WITH_PARAM}#fragment",
|
||||
url = "$VALID_CALL_URL_WITH_PARAM#fragment",
|
||||
expectedResult = "$VALID_CALL_URL_WITH_PARAM#fragment?$EXTRA_PARAMS"
|
||||
)
|
||||
}
|
||||
|
|
@ -173,7 +172,7 @@ class CallIntentDataParserTest {
|
|||
@Test
|
||||
fun `Element Call url with url fragment with params gets url extracted`() {
|
||||
doTest(
|
||||
url = "${VALID_CALL_URL_WITH_PARAM}#fragment?otherParam=maybe",
|
||||
url = "$VALID_CALL_URL_WITH_PARAM#fragment?otherParam=maybe",
|
||||
expectedResult = "$VALID_CALL_URL_WITH_PARAM#fragment?otherParam=maybe&$EXTRA_PARAMS"
|
||||
)
|
||||
}
|
||||
|
|
@ -181,7 +180,7 @@ class CallIntentDataParserTest {
|
|||
@Test
|
||||
fun `Element Call url with url fragment with other params gets url extracted`() {
|
||||
doTest(
|
||||
url = "${VALID_CALL_URL_WITH_PARAM}#?otherParam=maybe",
|
||||
url = "$VALID_CALL_URL_WITH_PARAM#?otherParam=maybe",
|
||||
expectedResult = "$VALID_CALL_URL_WITH_PARAM#?otherParam=maybe&$EXTRA_PARAMS"
|
||||
)
|
||||
}
|
||||
|
|
@ -189,7 +188,7 @@ class CallIntentDataParserTest {
|
|||
@Test
|
||||
fun `Element Call url with empty fragment`() {
|
||||
doTest(
|
||||
url = "${VALID_CALL_URL_WITH_PARAM}#",
|
||||
url = "$VALID_CALL_URL_WITH_PARAM#",
|
||||
expectedResult = "$VALID_CALL_URL_WITH_PARAM#?$EXTRA_PARAMS"
|
||||
)
|
||||
}
|
||||
|
|
@ -197,7 +196,7 @@ class CallIntentDataParserTest {
|
|||
@Test
|
||||
fun `Element Call url with empty fragment query`() {
|
||||
doTest(
|
||||
url = "${VALID_CALL_URL_WITH_PARAM}#?",
|
||||
url = "$VALID_CALL_URL_WITH_PARAM#?",
|
||||
expectedResult = "$VALID_CALL_URL_WITH_PARAM#?$EXTRA_PARAMS"
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ import kotlinx.coroutines.test.runTest
|
|||
import org.junit.Test
|
||||
|
||||
class DefaultCallWidgetProviderTest {
|
||||
|
||||
@Test
|
||||
fun `getWidget - fails if the session does not exist`() = runTest {
|
||||
val provider = createProvider(matrixClientProvider = FakeMatrixClientProvider { Result.failure(Exception("Session not found")) })
|
||||
|
|
|
|||
|
|
@ -24,19 +24,18 @@ import io.element.android.libraries.matrix.test.widget.FakeWidgetDriver
|
|||
class FakeCallWidgetProvider(
|
||||
private val widgetDriver: FakeWidgetDriver = FakeWidgetDriver(),
|
||||
private val url: String = "https://call.element.io",
|
||||
) : CallWidgetProvider {
|
||||
) : CallWidgetProvider {
|
||||
var getWidgetCalled = false
|
||||
private set
|
||||
|
||||
var getWidgetCalled = false
|
||||
private set
|
||||
|
||||
override suspend fun getWidget(
|
||||
sessionId: SessionId,
|
||||
roomId: RoomId,
|
||||
clientId: String,
|
||||
languageTag: String?,
|
||||
theme: String?
|
||||
): Result<Pair<MatrixWidgetDriver, String>> {
|
||||
getWidgetCalled = true
|
||||
return Result.success(widgetDriver to url)
|
||||
}
|
||||
override suspend fun getWidget(
|
||||
sessionId: SessionId,
|
||||
roomId: RoomId,
|
||||
clientId: String,
|
||||
languageTag: String?,
|
||||
theme: String?
|
||||
): Result<Pair<MatrixWidgetDriver, String>> {
|
||||
getWidgetCalled = true
|
||||
return Result.success(widgetDriver to url)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,15 +19,15 @@ package io.element.android.features.call.utils
|
|||
import kotlinx.coroutines.flow.MutableSharedFlow
|
||||
|
||||
class FakeWidgetMessageInterceptor : WidgetMessageInterceptor {
|
||||
val sentMessages = mutableListOf<String>()
|
||||
val sentMessages = mutableListOf<String>()
|
||||
|
||||
override val interceptedMessages = MutableSharedFlow<String>(extraBufferCapacity = 1)
|
||||
override val interceptedMessages = MutableSharedFlow<String>(extraBufferCapacity = 1)
|
||||
|
||||
override fun sendMessage(message: String) {
|
||||
sentMessages += message
|
||||
}
|
||||
|
||||
fun givenInterceptedMessage(message: String) {
|
||||
interceptedMessages.tryEmit(message)
|
||||
}
|
||||
override fun sendMessage(message: String) {
|
||||
sentMessages += message
|
||||
}
|
||||
|
||||
fun givenInterceptedMessage(message: String) {
|
||||
interceptedMessages.tryEmit(message)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ import io.element.android.libraries.architecture.FeatureEntryPoint
|
|||
import io.element.android.libraries.matrix.api.core.RoomId
|
||||
|
||||
interface CreateRoomEntryPoint : FeatureEntryPoint {
|
||||
|
||||
fun nodeBuilder(parentNode: Node, buildContext: BuildContext): NodeBuilder
|
||||
interface NodeBuilder {
|
||||
fun callback(callback: Callback): NodeBuilder
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ class ConfigureRoomFlowNode @AssistedInject constructor(
|
|||
buildContext = buildContext,
|
||||
plugins = plugins
|
||||
) {
|
||||
|
||||
private val component by lazy {
|
||||
parent!!.bindings<CreateRoomComponent.ParentBindings>().createRoomComponentBuilder().build()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ import javax.inject.Inject
|
|||
class CreateRoomDataStore @Inject constructor(
|
||||
val selectedUserListDataStore: UserListDataStore,
|
||||
) {
|
||||
|
||||
private val createRoomConfigFlow: MutableStateFlow<CreateRoomConfig> = MutableStateFlow(CreateRoomConfig())
|
||||
private var cachedAvatarUri: Uri? = null
|
||||
set(value) {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ class CreateRoomFlowNode @AssistedInject constructor(
|
|||
buildContext = buildContext,
|
||||
plugins = plugins
|
||||
) {
|
||||
|
||||
sealed interface NavTarget : Parcelable {
|
||||
@Parcelize
|
||||
data object Root : NavTarget
|
||||
|
|
|
|||
|
|
@ -27,13 +27,10 @@ import javax.inject.Inject
|
|||
|
||||
@ContributesBinding(AppScope::class)
|
||||
class DefaultCreateRoomEntryPoint @Inject constructor() : CreateRoomEntryPoint {
|
||||
|
||||
override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): CreateRoomEntryPoint.NodeBuilder {
|
||||
|
||||
val plugins = ArrayList<Plugin>()
|
||||
|
||||
return object : CreateRoomEntryPoint.NodeBuilder {
|
||||
|
||||
override fun callback(callback: CreateRoomEntryPoint.Callback): CreateRoomEntryPoint.NodeBuilder {
|
||||
plugins += callback
|
||||
return this
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ class DefaultStartDMAction @Inject constructor(
|
|||
private val matrixClient: MatrixClient,
|
||||
private val analyticsService: AnalyticsService,
|
||||
) : StartDMAction {
|
||||
|
||||
override suspend fun execute(userId: UserId, actionState: MutableState<AsyncAction<RoomId>>) {
|
||||
actionState.value = AsyncAction.Loading
|
||||
when (val result = matrixClient.startDM(userId)) {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ class AddPeopleNode @AssistedInject constructor(
|
|||
@Assisted plugins: List<Plugin>,
|
||||
private val presenter: AddPeoplePresenter,
|
||||
) : Node(buildContext, plugins = plugins) {
|
||||
|
||||
interface Callback : Plugin {
|
||||
fun onContinue()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ class AddPeoplePresenter @Inject constructor(
|
|||
userRepository: UserRepository,
|
||||
dataStore: CreateRoomDataStore,
|
||||
) : Presenter<UserListState> {
|
||||
|
||||
private val userListPresenter = userListPresenterFactory.create(
|
||||
UserListPresenterArgs(
|
||||
selectionMode = SelectionMode.Multiple,
|
||||
|
|
@ -45,4 +44,3 @@ class AddPeoplePresenter @Inject constructor(
|
|||
return userListPresenter.present()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,11 +37,13 @@ open class AddPeopleUserListStateProvider : PreviewParameterProvider<UserListSta
|
|||
selectionMode = SelectionMode.Multiple,
|
||||
),
|
||||
aUserListState().copy(
|
||||
searchResults = SearchBarResultState.Results(aMatrixUserList()
|
||||
.mapIndexed { index, matrixUser ->
|
||||
UserSearchResult(matrixUser, index % 2 == 0)
|
||||
}
|
||||
.toImmutableList()),
|
||||
searchResults = SearchBarResultState.Results(
|
||||
aMatrixUserList()
|
||||
.mapIndexed { index, matrixUser ->
|
||||
UserSearchResult(matrixUser, index % 2 == 0)
|
||||
}
|
||||
.toImmutableList()
|
||||
),
|
||||
selectedUsers = aListOfSelectedUsers(),
|
||||
isSearchActive = true,
|
||||
selectionMode = SelectionMode.Multiple,
|
||||
|
|
|
|||
|
|
@ -29,14 +29,14 @@ import androidx.compose.ui.Alignment
|
|||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.semantics.Role
|
||||
import androidx.compose.ui.unit.dp
|
||||
import io.element.android.compound.theme.ElementTheme
|
||||
import io.element.android.features.createroom.impl.configureroom.RoomPrivacyItem
|
||||
import io.element.android.features.createroom.impl.configureroom.roomPrivacyItems
|
||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||
import io.element.android.libraries.designsystem.theme.components.RadioButton
|
||||
import io.element.android.libraries.designsystem.theme.components.Text
|
||||
import io.element.android.compound.theme.ElementTheme
|
||||
|
||||
@Composable
|
||||
fun RoomPrivacyOption(
|
||||
|
|
@ -85,7 +85,8 @@ fun RoomPrivacyOption(
|
|||
.align(Alignment.CenterVertically)
|
||||
.size(48.dp),
|
||||
selected = isSelected,
|
||||
onClick = null // null recommended for accessibility with screenreaders
|
||||
// null recommended for accessibility with screenreaders
|
||||
onClick = null
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ class ConfigureRoomNode @AssistedInject constructor(
|
|||
private val presenter: ConfigureRoomPresenter,
|
||||
private val analyticsService: AnalyticsService,
|
||||
) : Node(buildContext, plugins = plugins) {
|
||||
|
||||
init {
|
||||
lifecycle.subscribe(
|
||||
onResume = {
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ class ConfigureRoomPresenter @Inject constructor(
|
|||
private val analyticsService: AnalyticsService,
|
||||
permissionsPresenterFactory: PermissionsPresenter.Factory,
|
||||
) : Presenter<ConfigureRoomState> {
|
||||
|
||||
private val cameraPermissionPresenter: PermissionsPresenter = permissionsPresenterFactory.create(android.Manifest.permission.CAMERA)
|
||||
private var pendingPermissionRequest = false
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ package io.element.android.features.createroom.impl.configureroom
|
|||
import androidx.annotation.DrawableRes
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import io.element.android.libraries.designsystem.icons.CompoundDrawables
|
||||
import io.element.android.features.createroom.impl.R
|
||||
import io.element.android.libraries.designsystem.icons.CompoundDrawables
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
import kotlinx.collections.immutable.toImmutableList
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ import io.element.android.libraries.di.SingleIn
|
|||
@SingleIn(CreateRoomScope::class)
|
||||
@MergeSubcomponent(CreateRoomScope::class)
|
||||
interface CreateRoomComponent : NodeFactoriesBindings {
|
||||
|
||||
@Subcomponent.Builder
|
||||
interface Builder {
|
||||
fun build(): CreateRoomComponent
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ class CreateRoomRootNode @AssistedInject constructor(
|
|||
private val analyticsService: AnalyticsService,
|
||||
private val inviteFriendsUseCase: InviteFriendsUseCase,
|
||||
) : Node(buildContext, plugins = plugins) {
|
||||
|
||||
interface Callback : Plugin {
|
||||
fun onCreateNewRoom()
|
||||
fun onStartChatSuccess(roomId: RoomId)
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ class CreateRoomRootPresenter @Inject constructor(
|
|||
private val startDMAction: StartDMAction,
|
||||
private val buildMeta: BuildMeta,
|
||||
) : Presenter<CreateRoomRootState> {
|
||||
|
||||
private val presenter = presenterFactory.create(
|
||||
UserListPresenterArgs(
|
||||
selectionMode = SelectionMode.Single,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ package io.element.android.features.createroom.impl.root
|
|||
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
|
||||
import io.element.android.features.createroom.impl.userlist.aUserListState
|
||||
import io.element.android.libraries.architecture.AsyncAction
|
||||
|
||||
import io.element.android.libraries.designsystem.theme.components.SearchBarResultState
|
||||
import io.element.android.libraries.matrix.ui.components.aMatrixUser
|
||||
import io.element.android.libraries.usersearch.api.UserSearchResult
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ fun CreateRoomRootView(
|
|||
onRetry = {
|
||||
state.userListState.selectedUsers.firstOrNull()
|
||||
?.let { state.eventSink(CreateRoomRootEvents.StartDM(it)) }
|
||||
// Cancel start DM if there is no more selected user (should not happen)
|
||||
// Cancel start DM if there is no more selected user (should not happen)
|
||||
?: state.eventSink(CreateRoomRootEvents.CancelStartDM)
|
||||
},
|
||||
onErrorDismiss = { state.eventSink(CreateRoomRootEvents.CancelStartDM) },
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ class DefaultUserListPresenter @AssistedInject constructor(
|
|||
@Assisted val userRepository: UserRepository,
|
||||
@Assisted val userListDataStore: UserListDataStore,
|
||||
) : UserListPresenter {
|
||||
|
||||
@AssistedFactory
|
||||
@ContributesBinding(SessionScope::class)
|
||||
interface DefaultUserListFactory : UserListPresenter.Factory {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ import kotlinx.coroutines.flow.MutableStateFlow
|
|||
import javax.inject.Inject
|
||||
|
||||
class UserListDataStore @Inject constructor() {
|
||||
|
||||
private val selectedUsers: MutableStateFlow<List<MatrixUser>> = MutableStateFlow(emptyList())
|
||||
|
||||
fun selectUser(user: MatrixUser) {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import io.element.android.libraries.architecture.Presenter
|
|||
import io.element.android.libraries.usersearch.api.UserRepository
|
||||
|
||||
interface UserListPresenter : Presenter<UserListState> {
|
||||
|
||||
interface Factory {
|
||||
fun create(
|
||||
args: UserListPresenterArgs,
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ import kotlinx.coroutines.test.runTest
|
|||
import org.junit.Test
|
||||
|
||||
class DefaultStartDMActionTests {
|
||||
|
||||
@Test
|
||||
fun `when dm is found, assert state is updated with given room id`() = runTest {
|
||||
val matrixClient = FakeMatrixClient().apply {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ import org.junit.Rule
|
|||
import org.junit.Test
|
||||
|
||||
class AddPeoplePresenterTests {
|
||||
|
||||
@get:Rule
|
||||
val warmUpRule = WarmUpRule()
|
||||
|
||||
|
|
@ -57,4 +56,3 @@ class AddPeoplePresenterTests {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ private const val AN_URI_FROM_GALLERY = "content://uri_from_gallery"
|
|||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
class ConfigureRoomPresenterTests {
|
||||
|
||||
@get:Rule
|
||||
val warmUpRule = WarmUpRule()
|
||||
|
||||
|
|
@ -316,4 +315,3 @@ class ConfigureRoomPresenterTests {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ import org.junit.Rule
|
|||
import org.junit.Test
|
||||
|
||||
class CreateRoomRootPresenterTests {
|
||||
|
||||
@get:Rule
|
||||
val warmUpRule = WarmUpRule()
|
||||
|
||||
|
|
@ -80,7 +79,6 @@ class CreateRoomRootPresenterTests {
|
|||
awaitItem().also { state ->
|
||||
assertThat(state.startDmAction).isEqualTo(startDMSuccessResult)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ import org.junit.Rule
|
|||
import org.junit.Test
|
||||
|
||||
class DefaultUserListPresenterTests {
|
||||
|
||||
@get:Rule
|
||||
val warmUpRule = WarmUpRule()
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ package io.element.android.features.createroom.impl.userlist
|
|||
import androidx.compose.runtime.Composable
|
||||
|
||||
class FakeUserListPresenter : UserListPresenter {
|
||||
|
||||
private var state = aUserListState()
|
||||
|
||||
fun givenState(state: UserListState) {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import io.element.android.libraries.usersearch.api.UserRepository
|
|||
class FakeUserListPresenterFactory(
|
||||
private val fakeUserListPresenter: FakeUserListPresenter = FakeUserListPresenter()
|
||||
) : UserListPresenter.Factory {
|
||||
|
||||
override fun create(
|
||||
args: UserListPresenterArgs,
|
||||
userRepository: UserRepository,
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ import io.element.android.libraries.matrix.test.A_ROOM_ID
|
|||
import kotlinx.coroutines.delay
|
||||
|
||||
class FakeStartDMAction : StartDMAction {
|
||||
|
||||
private var executeResult: AsyncAction<RoomId> = AsyncAction.Success(A_ROOM_ID)
|
||||
|
||||
fun givenExecuteResult(result: AsyncAction<RoomId>) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ import com.bumble.appyx.core.plugin.Plugin
|
|||
import io.element.android.libraries.architecture.FeatureEntryPoint
|
||||
|
||||
interface FtueEntryPoint : FeatureEntryPoint {
|
||||
|
||||
fun nodeBuilder(parentNode: Node, buildContext: BuildContext): NodeBuilder
|
||||
|
||||
interface NodeBuilder {
|
||||
|
|
|
|||
|
|
@ -27,12 +27,10 @@ import javax.inject.Inject
|
|||
|
||||
@ContributesBinding(AppScope::class)
|
||||
class DefaultFtueEntryPoint @Inject constructor() : FtueEntryPoint {
|
||||
|
||||
override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): FtueEntryPoint.NodeBuilder {
|
||||
val plugins = ArrayList<Plugin>()
|
||||
|
||||
return object : FtueEntryPoint.NodeBuilder {
|
||||
|
||||
override fun callback(callback: FtueEntryPoint.Callback): FtueEntryPoint.NodeBuilder {
|
||||
plugins += callback
|
||||
return this
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@ class FtueFlowNode @AssistedInject constructor(
|
|||
buildContext = buildContext,
|
||||
plugins = plugins,
|
||||
) {
|
||||
|
||||
sealed interface NavTarget : Parcelable {
|
||||
@Parcelize
|
||||
data object Placeholder : NavTarget
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ class MigrationScreenNode @AssistedInject constructor(
|
|||
@Assisted plugins: List<Plugin>,
|
||||
private val presenter: MigrationScreenPresenter,
|
||||
) : Node(buildContext, plugins = plugins) {
|
||||
|
||||
interface Callback : Plugin {
|
||||
fun onMigrationFinished()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,5 +50,6 @@ fun MigrationScreenView(
|
|||
internal fun MigrationViewPreview() = ElementPreview {
|
||||
MigrationScreenView(
|
||||
migrationState = MigrationScreenState(isMigrating = true),
|
||||
onMigrationFinished = {})
|
||||
onMigrationFinished = {}
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import javax.inject.Inject
|
|||
class SharedPrefsMigrationScreenStore @Inject constructor(
|
||||
@DefaultPreferences private val sharedPreferences: SharedPreferences,
|
||||
) : MigrationScreenStore {
|
||||
|
||||
override fun isMigrationScreenNeeded(sessionId: SessionId): Boolean {
|
||||
return sharedPreferences.getBoolean(sessionId.toKey(), false).not()
|
||||
}
|
||||
|
|
@ -58,4 +57,3 @@ class SharedPrefsMigrationScreenStore @Inject constructor(
|
|||
private const val IS_MIGRATION_SCREEN_SHOWN_PREFIX = "is_migration_screen_shown_"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ class NotificationsOptInNode @AssistedInject constructor(
|
|||
@Assisted plugins: List<Plugin>,
|
||||
presenterFactory: NotificationsOptInPresenter.Factory,
|
||||
) : Node(buildContext, plugins = plugins) {
|
||||
|
||||
interface Callback : NodeInputs {
|
||||
fun onNotificationsOptInFinished()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ class NotificationsOptInPresenter @AssistedInject constructor(
|
|||
private val permissionStateProvider: PermissionStateProvider,
|
||||
private val buildVersionSdkIntProvider: BuildVersionSdkIntProvider,
|
||||
) : Presenter<NotificationsOptInState> {
|
||||
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(callback: NotificationsOptInNode.Callback): NotificationsOptInPresenter
|
||||
|
|
@ -77,8 +76,8 @@ class NotificationsOptInPresenter @AssistedInject constructor(
|
|||
}
|
||||
|
||||
LaunchedEffect(notificationsPermissionsState) {
|
||||
if (notificationsPermissionsState.permissionGranted
|
||||
|| notificationsPermissionsState.permissionAlreadyDenied) {
|
||||
if (notificationsPermissionsState.permissionGranted ||
|
||||
notificationsPermissionsState.permissionAlreadyDenied) {
|
||||
callback.onNotificationsOptInFinished()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import javax.inject.Inject
|
|||
@ContributesBinding(SessionScope::class)
|
||||
class DefaultFtueState @Inject constructor(
|
||||
private val sdkVersionProvider: BuildVersionSdkIntProvider,
|
||||
private val coroutineScope: CoroutineScope,
|
||||
coroutineScope: CoroutineScope,
|
||||
private val analyticsService: AnalyticsService,
|
||||
private val welcomeScreenState: WelcomeScreenState,
|
||||
private val migrationScreenStore: MigrationScreenStore,
|
||||
|
|
@ -48,7 +48,6 @@ class DefaultFtueState @Inject constructor(
|
|||
private val lockScreenService: LockScreenService,
|
||||
private val matrixClient: MatrixClient,
|
||||
) : FtueState {
|
||||
|
||||
override val shouldDisplayFlow = MutableStateFlow(isAnyStepIncomplete())
|
||||
|
||||
override suspend fun reset() {
|
||||
|
|
@ -68,21 +67,31 @@ class DefaultFtueState @Inject constructor(
|
|||
|
||||
fun getNextStep(currentStep: FtueStep? = null): FtueStep? =
|
||||
when (currentStep) {
|
||||
null -> if (shouldDisplayMigrationScreen()) FtueStep.MigrationScreen else getNextStep(
|
||||
null -> if (shouldDisplayMigrationScreen()) {
|
||||
FtueStep.MigrationScreen
|
||||
)
|
||||
FtueStep.MigrationScreen -> if (shouldDisplayWelcomeScreen()) FtueStep.WelcomeScreen else getNextStep(
|
||||
} else {
|
||||
getNextStep(FtueStep.MigrationScreen)
|
||||
}
|
||||
FtueStep.MigrationScreen -> if (shouldDisplayWelcomeScreen()) {
|
||||
FtueStep.WelcomeScreen
|
||||
)
|
||||
FtueStep.WelcomeScreen -> if (shouldAskNotificationPermissions()) FtueStep.NotificationsOptIn else getNextStep(
|
||||
} else {
|
||||
getNextStep(FtueStep.WelcomeScreen)
|
||||
}
|
||||
FtueStep.WelcomeScreen -> if (shouldAskNotificationPermissions()) {
|
||||
FtueStep.NotificationsOptIn
|
||||
)
|
||||
FtueStep.NotificationsOptIn -> if (shouldDisplayLockscreenSetup()) FtueStep.LockscreenSetup else getNextStep(
|
||||
} else {
|
||||
getNextStep(FtueStep.NotificationsOptIn)
|
||||
}
|
||||
FtueStep.NotificationsOptIn -> if (shouldDisplayLockscreenSetup()) {
|
||||
FtueStep.LockscreenSetup
|
||||
)
|
||||
FtueStep.LockscreenSetup -> if (needsAnalyticsOptIn()) FtueStep.AnalyticsOptIn else getNextStep(
|
||||
} else {
|
||||
getNextStep(FtueStep.LockscreenSetup)
|
||||
}
|
||||
FtueStep.LockscreenSetup -> if (needsAnalyticsOptIn()) {
|
||||
FtueStep.AnalyticsOptIn
|
||||
)
|
||||
} else {
|
||||
getNextStep(FtueStep.AnalyticsOptIn)
|
||||
}
|
||||
FtueStep.AnalyticsOptIn -> null
|
||||
}
|
||||
|
||||
|
|
@ -115,7 +124,9 @@ class DefaultFtueState @Inject constructor(
|
|||
val isPermissionDenied = runBlocking { permissionStateProvider.isPermissionDenied(permission).first() }
|
||||
val isPermissionGranted = permissionStateProvider.isPermissionGranted(permission)
|
||||
!isPermissionGranted && !isPermissionDenied
|
||||
} else false
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
private fun shouldDisplayLockscreenSetup(): Boolean {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ class WelcomeNode @AssistedInject constructor(
|
|||
@Assisted plugins: List<Plugin>,
|
||||
private val buildMeta: BuildMeta,
|
||||
) : Node(buildContext, plugins = plugins) {
|
||||
|
||||
interface Callback : Plugin {
|
||||
fun onContinueClicked()
|
||||
}
|
||||
|
|
@ -50,5 +49,4 @@ class WelcomeNode @AssistedInject constructor(
|
|||
modifier = modifier
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue