From 52cb528215c14d62ef5dea948a93c18d711e2f2f Mon Sep 17 00:00:00 2001 From: Yamil Medina Date: Tue, 27 Aug 2024 10:13:28 +0000 Subject: [PATCH 1/2] Commit with unresolved merge conflicts outside of submodules --- .../connection/ConnectionActionButtonViewModel.kt | 6 ++++-- .../ConnectionActionButtonViewModelTest.kt | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/wire/android/ui/connection/ConnectionActionButtonViewModel.kt b/app/src/main/kotlin/com/wire/android/ui/connection/ConnectionActionButtonViewModel.kt index 1c6eec7bd56..3c24862f4b1 100644 --- a/app/src/main/kotlin/com/wire/android/ui/connection/ConnectionActionButtonViewModel.kt +++ b/app/src/main/kotlin/com/wire/android/ui/connection/ConnectionActionButtonViewModel.kt @@ -202,9 +202,11 @@ class ConnectionActionButtonViewModelImpl @Inject constructor( if (result.coreFailure is CoreFailure.MissingKeyPackages) onMissingKeyPackages() } - is CreateConversationResult.Success -> onSuccess(result.conversation.id) + is CreateConversationResult.Success -> { + state = state.finishAction() + onSuccess(result.conversation.id) + } } - state.finishAction() } } diff --git a/app/src/test/kotlin/com/wire/android/ui/connection/ConnectionActionButtonViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/connection/ConnectionActionButtonViewModelTest.kt index 1ca42505d07..4b116ed3287 100644 --- a/app/src/test/kotlin/com/wire/android/ui/connection/ConnectionActionButtonViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/connection/ConnectionActionButtonViewModelTest.kt @@ -274,7 +274,12 @@ class ConnectionActionButtonViewModelTest { arrangement.getOrCreateOneToOneConversation(TestUser.USER_ID) } verify { arrangement.onOpenConversation(any()) } +<<<<<<< HEAD verify { arrangement.onMissingKeyPackages wasNot Called } +======= + verify { arrangement.onStartConversationError wasNot Called } + assertEquals(false, viewModel.actionableState().isPerformingAction) +>>>>>>> 232e7359b (fix: button keeps spinning when user starts a conversation and back (WPB-5862) (#3372)) } @Test @@ -293,7 +298,12 @@ class ConnectionActionButtonViewModelTest { arrangement.getOrCreateOneToOneConversation(TestUser.USER_ID) } verify { arrangement.onOpenConversation wasNot Called } +<<<<<<< HEAD verify { arrangement.onMissingKeyPackages wasNot Called } +======= + verify { arrangement.onStartConversationError(eq(failure)) } + assertEquals(false, viewModel.actionableState().isPerformingAction) +>>>>>>> 232e7359b (fix: button keeps spinning when user starts a conversation and back (WPB-5862) (#3372)) } @Test @@ -312,7 +322,12 @@ class ConnectionActionButtonViewModelTest { arrangement.getOrCreateOneToOneConversation(TestUser.USER_ID) } verify { arrangement.onOpenConversation wasNot Called } +<<<<<<< HEAD verify { arrangement.onMissingKeyPackages() } +======= + verify { arrangement.onStartConversationError(eq(errorResult)) } + assertEquals(false, viewModel.actionableState().isPerformingAction) +>>>>>>> 232e7359b (fix: button keeps spinning when user starts a conversation and back (WPB-5862) (#3372)) } companion object { From 3ef0fb8b18b32fbbffce5b6bf71d8f23361d7561 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Tue, 27 Aug 2024 12:18:26 +0200 Subject: [PATCH 2/2] solve conflicts --- .../ConnectionActionButtonViewModelTest.kt | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/app/src/test/kotlin/com/wire/android/ui/connection/ConnectionActionButtonViewModelTest.kt b/app/src/test/kotlin/com/wire/android/ui/connection/ConnectionActionButtonViewModelTest.kt index 4b116ed3287..58f1e3be4c8 100644 --- a/app/src/test/kotlin/com/wire/android/ui/connection/ConnectionActionButtonViewModelTest.kt +++ b/app/src/test/kotlin/com/wire/android/ui/connection/ConnectionActionButtonViewModelTest.kt @@ -274,12 +274,8 @@ class ConnectionActionButtonViewModelTest { arrangement.getOrCreateOneToOneConversation(TestUser.USER_ID) } verify { arrangement.onOpenConversation(any()) } -<<<<<<< HEAD verify { arrangement.onMissingKeyPackages wasNot Called } -======= - verify { arrangement.onStartConversationError wasNot Called } assertEquals(false, viewModel.actionableState().isPerformingAction) ->>>>>>> 232e7359b (fix: button keeps spinning when user starts a conversation and back (WPB-5862) (#3372)) } @Test @@ -298,12 +294,8 @@ class ConnectionActionButtonViewModelTest { arrangement.getOrCreateOneToOneConversation(TestUser.USER_ID) } verify { arrangement.onOpenConversation wasNot Called } -<<<<<<< HEAD verify { arrangement.onMissingKeyPackages wasNot Called } -======= - verify { arrangement.onStartConversationError(eq(failure)) } assertEquals(false, viewModel.actionableState().isPerformingAction) ->>>>>>> 232e7359b (fix: button keeps spinning when user starts a conversation and back (WPB-5862) (#3372)) } @Test @@ -322,12 +314,8 @@ class ConnectionActionButtonViewModelTest { arrangement.getOrCreateOneToOneConversation(TestUser.USER_ID) } verify { arrangement.onOpenConversation wasNot Called } -<<<<<<< HEAD verify { arrangement.onMissingKeyPackages() } -======= - verify { arrangement.onStartConversationError(eq(errorResult)) } assertEquals(false, viewModel.actionableState().isPerformingAction) ->>>>>>> 232e7359b (fix: button keeps spinning when user starts a conversation and back (WPB-5862) (#3372)) } companion object {