formatting
This commit is contained in:
parent
716928d9d2
commit
b5778bd6c5
@ -43,7 +43,7 @@ class OverrideDropdownView @JvmOverloads constructor(
|
||||
optionsSpinner = findViewById(R.id.feature_options)
|
||||
}
|
||||
|
||||
fun <T: OverrideOption> bind(feature: OverrideDropdown<T>, listener: Listener<T>) {
|
||||
fun <T : OverrideOption> bind(feature: OverrideDropdown<T>, listener: Listener<T>) {
|
||||
labelView.text = feature.label
|
||||
|
||||
optionsSpinner.apply {
|
||||
@ -75,7 +75,7 @@ class OverrideDropdownView @JvmOverloads constructor(
|
||||
fun onOverrideSelected(option: T?)
|
||||
}
|
||||
|
||||
data class OverrideDropdown<T: OverrideOption>(
|
||||
data class OverrideDropdown<T : OverrideOption>(
|
||||
val label: String,
|
||||
val options: List<T>,
|
||||
val activeOption: T?,
|
||||
|
@ -768,7 +768,7 @@ class OnboardingViewModel @AssistedInject constructor(
|
||||
when (isAccountCreated) {
|
||||
true -> {
|
||||
val homeServerCapabilities = session.getHomeServerCapabilities()
|
||||
val capabilityOverrides = vectorOverrides.forceHomeserverCapabilities()?.firstOrNull()
|
||||
val capabilityOverrides = vectorOverrides.forceHomeserverCapabilities?.firstOrNull()
|
||||
val personalizationState = state.personalizationState.copy(
|
||||
supportsChangingDisplayName = capabilityOverrides?.canChangeDisplayName ?: homeServerCapabilities.canChangeDisplayName,
|
||||
supportsChangingProfilePicture = capabilityOverrides?.canChangeAvatar ?: homeServerCapabilities.canChangeAvatar
|
||||
@ -934,7 +934,9 @@ class OnboardingViewModel @AssistedInject constructor(
|
||||
when {
|
||||
it.supportsChangingDisplayName -> _viewEvents.post(OnboardingViewEvents.OnChooseDisplayName)
|
||||
it.supportsChangingProfilePicture -> _viewEvents.post(OnboardingViewEvents.OnChooseDisplayName)
|
||||
else -> throw IllegalStateException("It should not be possible to personalize without supporting display name or avatar changing")
|
||||
else -> {
|
||||
throw IllegalStateException("It should not be possible to personalize without supporting display name or avatar changing")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -424,5 +424,4 @@ class FtueAuthVariant(
|
||||
option = commonOption
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -21,7 +21,6 @@ import im.vector.app.core.platform.VectorViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.core.platform.VectorViewModelAction
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import org.hamcrest.Matcher
|
||||
|
||||
fun String.trimIndentOneLine() = trimIndent().replace("\n", "")
|
||||
|
||||
|
@ -18,7 +18,6 @@ package im.vector.app.test.fakes
|
||||
|
||||
import io.mockk.coJustRun
|
||||
import io.mockk.every
|
||||
import io.mockk.justRun
|
||||
import io.mockk.mockk
|
||||
import org.matrix.android.sdk.api.auth.AuthenticationService
|
||||
import org.matrix.android.sdk.api.auth.registration.RegistrationWizard
|
||||
|
@ -18,6 +18,5 @@ package im.vector.app.test.fakes
|
||||
|
||||
import im.vector.app.features.DefaultVectorOverrides
|
||||
import im.vector.app.features.VectorOverrides
|
||||
import io.mockk.mockk
|
||||
|
||||
class FakeVectorOverrides : VectorOverrides by DefaultVectorOverrides()
|
||||
|
Loading…
x
Reference in New Issue
Block a user