Skip to content

Commit cac6d9f

Browse files
GarzasMohamadJaara
authored andcommitted
fix: disable bubbles feature flag (#4307)
(cherry picked from commit 34c4f5e)
1 parent b12267e commit cac6d9f

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

app/src/main/kotlin/com/wire/android/ui/home/conversations/info/ConversationInfoViewModel.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import com.wire.kalium.logic.data.id.QualifiedID
3939
import com.wire.kalium.logic.data.id.QualifiedIdMapper
4040
import com.wire.kalium.logic.data.user.ConnectionState
4141
import com.wire.kalium.logic.data.user.UserId
42-
import com.wire.kalium.logic.feature.client.IsChatBubblesEnabledUseCase
4342
import com.wire.kalium.logic.feature.client.IsWireCellsEnabledUseCase
4443
import com.wire.kalium.logic.feature.conversation.ObserveConversationDetailsUseCase
4544
import com.wire.kalium.logic.feature.e2ei.usecase.FetchConversationMLSVerificationStatusUseCase
@@ -57,7 +56,7 @@ class ConversationInfoViewModel @Inject constructor(
5756
private val globalDataStore: GlobalDataStore,
5857
private val fetchConversationMLSVerificationStatus: FetchConversationMLSVerificationStatusUseCase,
5958
private val isWireCellFeatureEnabled: IsWireCellsEnabledUseCase,
60-
private val isChatBubblesEnabledUseCase: IsChatBubblesEnabledUseCase,
59+
// private val isChatBubblesEnabledUseCase: IsChatBubblesEnabledUseCase,
6160
@CurrentAccount private val selfUserId: UserId,
6261
) : ViewModel() {
6362

@@ -130,7 +129,8 @@ class ConversationInfoViewModel @Inject constructor(
130129
)
131130
}
132131

133-
private suspend fun isBubbleUiEnabled() = (globalDataStore.observeIsBubbleUI().firstOrNull() ?: false) || isChatBubblesEnabledUseCase()
132+
private suspend fun isBubbleUiEnabled() = (globalDataStore.observeIsBubbleUI().firstOrNull() ?: false)
133+
// || isChatBubblesEnabledUseCase() // TODO uncomment when production ready
134134

135135
private fun getAccentId(conversationDetails: ConversationDetails): Int {
136136
return if (conversationDetails is ConversationDetails.OneOne) {

app/src/test/kotlin/com/wire/android/ui/home/conversations/info/ConversationInfoViewModelArrangement.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import com.wire.kalium.logic.data.id.ConversationId
3030
import com.wire.kalium.logic.data.id.QualifiedID
3131
import com.wire.kalium.logic.data.id.QualifiedIdMapper
3232
import com.wire.kalium.logic.data.user.UserId
33-
import com.wire.kalium.logic.feature.client.IsChatBubblesEnabledUseCase
3433
import com.wire.kalium.logic.feature.client.IsWireCellsEnabledUseCase
3534
import com.wire.kalium.logic.feature.conversation.ObserveConversationDetailsUseCase
3635
import com.wire.kalium.logic.feature.e2ei.usecase.FetchConversationMLSVerificationStatusUseCase
@@ -67,8 +66,8 @@ class ConversationInfoViewModelArrangement {
6766
@MockK
6867
lateinit var globalDataStore: GlobalDataStore
6968

70-
@MockK
71-
lateinit var isChatBubblesEnabled: IsChatBubblesEnabledUseCase
69+
// @MockK
70+
// lateinit var isChatBubblesEnabled: IsChatBubblesEnabledUseCase
7271

7372
private val viewModel: ConversationInfoViewModel by lazy {
7473
ConversationInfoViewModel(
@@ -79,7 +78,7 @@ class ConversationInfoViewModelArrangement {
7978
selfUserId = TestUser.SELF_USER_ID,
8079
isWireCellFeatureEnabled = isCellsEnabled,
8180
globalDataStore = globalDataStore,
82-
isChatBubblesEnabledUseCase = isChatBubblesEnabled
81+
// isChatBubblesEnabledUseCase = isChatBubblesEnabled
8382
)
8483
}
8584

@@ -97,7 +96,7 @@ class ConversationInfoViewModelArrangement {
9796
coEvery { fetchConversationMLSVerificationStatus.invoke(any()) } returns Unit
9897
coEvery { isCellsEnabled() } returns false
9998
coEvery { globalDataStore.observeIsBubbleUI() } returns flowOf(false)
100-
coEvery { isChatBubblesEnabled() } returns false
99+
// coEvery { isChatBubblesEnabled() } returns false
101100
}
102101

103102
suspend fun withConversationDetailUpdate(conversationDetails: ConversationDetails) = apply {

0 commit comments

Comments
 (0)