mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Use fatalError and add missing return
statement
This commit is contained in:
parent
26edf79aa2
commit
e45c79378f
@ -55,6 +55,7 @@ import im.vector.app.core.di.ActiveSessionHolder
|
||||
import im.vector.app.core.di.ActivityEntryPoint
|
||||
import im.vector.app.core.dialogs.DialogLocker
|
||||
import im.vector.app.core.dialogs.UnrecognizedCertificateDialog
|
||||
import im.vector.app.core.error.fatalError
|
||||
import im.vector.app.core.extensions.observeEvent
|
||||
import im.vector.app.core.extensions.observeNotNull
|
||||
import im.vector.app.core.extensions.registerStartForActivityResult
|
||||
@ -608,11 +609,7 @@ abstract class VectorBaseActivity<VB : ViewBinding> : AppCompatActivity(), Maver
|
||||
}
|
||||
}.show()
|
||||
} else {
|
||||
if (vectorPreferences.failFast()) {
|
||||
error("No CoordinatorLayout to display this snackbar!")
|
||||
} else {
|
||||
Timber.w("No CoordinatorLayout to display this snackbar!")
|
||||
}
|
||||
fatalError("No CoordinatorLayout to display this snackbar!", vectorPreferences.failFast())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -316,6 +316,7 @@ class DefaultNavigator @Inject constructor(
|
||||
if (context is AppCompatActivity) {
|
||||
if (context !is MatrixToBottomSheet.InteractionListener) {
|
||||
fatalError("Caller context should implement MatrixToBottomSheet.InteractionListener", vectorPreferences.failFast())
|
||||
return
|
||||
}
|
||||
// TODO check if there is already one??
|
||||
MatrixToBottomSheet.withLink(link, origin)
|
||||
|
Loading…
Reference in New Issue
Block a user