mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 09:25:49 +03:00
Rename widget action.
This commit is contained in:
parent
242c14a156
commit
23a25cf240
3 changed files with 4 additions and 4 deletions
|
@ -26,5 +26,5 @@ sealed class WidgetAction : VectorViewModelAction {
|
|||
object DeleteWidget : WidgetAction()
|
||||
object RevokeWidget : WidgetAction()
|
||||
object OnTermsReviewed : WidgetAction()
|
||||
object HangupElementCall : WidgetAction()
|
||||
object CloseWidget : WidgetAction()
|
||||
}
|
||||
|
|
|
@ -189,7 +189,7 @@ class WidgetActivity : VectorBaseActivity<ActivityWidgetBinding>() {
|
|||
if (intent?.action == ACTION_MEDIA_CONTROL) {
|
||||
val controlType = intent.getIntExtra(EXTRA_CONTROL_TYPE, 0)
|
||||
if (controlType == CONTROL_TYPE_HANGUP) {
|
||||
viewModel.handle(WidgetAction.HangupElementCall)
|
||||
viewModel.handle(WidgetAction.CloseWidget)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -147,11 +147,11 @@ class WidgetViewModel @AssistedInject constructor(
|
|||
WidgetAction.DeleteWidget -> handleDeleteWidget()
|
||||
WidgetAction.RevokeWidget -> handleRevokeWidget()
|
||||
WidgetAction.OnTermsReviewed -> loadFormattedUrl(forceFetchToken = false)
|
||||
WidgetAction.HangupElementCall -> handleHangupElementCall()
|
||||
WidgetAction.CloseWidget -> handleCloseWidget()
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleHangupElementCall() {
|
||||
private fun handleCloseWidget() {
|
||||
_viewEvents.post(WidgetViewEvents.Close())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue