8000 Make privacy grade clickable when grade is empty (#1088) · libandroid/Android@8f49a78 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8f49a78

Browse files
Make privacy grade clickable when grade is empty (duckduckgo#1088)
1 parent b0b6c1d commit 8f49a78

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/src/androidTest/java/com/duckduckgo/app/browser/BrowserTabViewModelTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,9 +823,9 @@ class BrowserTabViewModelTest {
823823
}
824824

825825
@Test
826-
fun whenShowEmptyGradeIsTrueThenIsEnableIsFalse() {
826+
fun whenShowEmptyGradeIsTrueThenIsEnableIsTrue() {
827827
val testee = BrowserTabViewModel.PrivacyGradeViewState(PrivacyGrade.A, shouldAnimate = false, showEmptyGrade = true)
828-
assertFalse(testee.isEnabled)
828+
assertTrue(testee.isEnabled)
829829
}
830830

831831
@Test

app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ class BrowserTabViewModel(
216216
val shouldAnimate: Boolean = false,
217217
val showEmptyGrade: Boolean = true
218218
) {
219-
val isEnabled: Boolean = !showEmptyGrade && privacyGrade != PrivacyGrade.UNKNOWN
219+
val isEnabled: Boolean = privacyGrade != PrivacyGrade.UNKNOWN
220220
}
221221

222222
data class AutoCompleteViewState(

0 commit comments

Comments
 (0)
0