diff --git a/vector/src/main/java/im/vector/app/features/widgets/WidgetAction.kt b/vector/src/main/java/im/vector/app/features/widgets/WidgetAction.kt index f525af6109..d5d8e95aa6 100644 --- a/vector/src/main/java/im/vector/app/features/widgets/WidgetAction.kt +++ b/vector/src/main/java/im/vector/app/features/widgets/WidgetAction.kt @@ -26,5 +26,5 @@ sealed class WidgetAction : VectorViewModelAction { object DeleteWidget : WidgetAction() object RevokeWidget : WidgetAction() object OnTermsReviewed : WidgetAction() - object HangupElementCall : WidgetAction() + object CloseWidget : WidgetAction() } diff --git a/vector/src/main/java/im/vector/app/features/widgets/WidgetActivity.kt b/vector/src/main/java/im/vector/app/features/widgets/WidgetActivity.kt index a068d57936..92b070c8d0 100644 --- a/vector/src/main/java/im/vector/app/features/widgets/WidgetActivity.kt +++ b/vector/src/main/java/im/vector/app/features/widgets/WidgetActivity.kt @@ -189,7 +189,7 @@ class WidgetActivity : VectorBaseActivity() { 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) } } } diff --git a/vector/src/main/java/im/vector/app/features/widgets/WidgetViewModel.kt b/vector/src/main/java/im/vector/app/features/widgets/WidgetViewModel.kt index 17dc244f4c..ecd6ca2fd6 100644 --- a/vector/src/main/java/im/vector/app/features/widgets/WidgetViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/widgets/WidgetViewModel.kt @@ -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()) }