mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 21:48:50 +03:00
Improve code
This commit is contained in:
parent
34cf9903dc
commit
b659cb60a2
1 changed files with 31 additions and 36 deletions
|
@ -33,7 +33,6 @@ import im.vector.riotx.core.epoxy.attributes.ButtonType
|
|||
import im.vector.riotx.core.epoxy.attributes.IconMode
|
||||
import im.vector.riotx.core.epoxy.loadingItem
|
||||
import im.vector.riotx.core.error.ErrorFormatter
|
||||
import im.vector.riotx.core.extensions.exhaustive
|
||||
import im.vector.riotx.core.resources.ColorProvider
|
||||
import im.vector.riotx.core.resources.StringProvider
|
||||
import timber.log.Timber
|
||||
|
@ -244,9 +243,7 @@ class DiscoverySettingsController @Inject constructor(
|
|||
|
||||
if (pidInfo.isShared is Fail) {
|
||||
buildSharedFail(pidInfo)
|
||||
}
|
||||
when (pidInfo.isShared()) {
|
||||
SharedState.BINDING_IN_PROGRESS -> {
|
||||
} else if (pidInfo.isShared() == SharedState.BINDING_IN_PROGRESS) {
|
||||
val errorText = if (pidInfo.finalRequest is Fail) {
|
||||
val error = pidInfo.finalRequest.error
|
||||
// Deal with error 500
|
||||
|
@ -280,8 +277,6 @@ class DiscoverySettingsController @Inject constructor(
|
|||
}
|
||||
buildContinueCancel(pidInfo.threePid)
|
||||
}
|
||||
else -> Unit
|
||||
}.exhaustive
|
||||
}
|
||||
|
||||
private fun buildThreePid(pidInfo: PidInfo, title: String = pidInfo.threePid.value) {
|
||||
|
|
Loading…
Reference in a new issue