From 23a25cf24023c99a6e64a0049f3a13cc3629cdab Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Fri, 22 Jul 2022 14:36:02 +0300 Subject: [PATCH] Rename widget action. --- .../main/java/im/vector/app/features/widgets/WidgetAction.kt | 2 +- .../java/im/vector/app/features/widgets/WidgetActivity.kt | 2 +- .../java/im/vector/app/features/widgets/WidgetViewModel.kt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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()) }