Skip to content

Commit

Permalink
Make isFeatureEnabled a suspend function
Browse files Browse the repository at this point in the history
  • Loading branch information
CrisBarreiro committed Nov 7, 2024
1 parent b1c51ae commit 46d0dbb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class CtaViewModel @Inject constructor(
}

if (!canShowOnboardingDaxDialogCta()) {
return if (brokenSitePrompt.isFeatureEnabled()) {
return if (withContext(dispatchers.io()) { brokenSitePrompt.isFeatureEnabled() }) {
// TODO (cbarreiro) Add logic to decide whether or not to show the prompt
BrokenSitePromptDialogCta()
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ interface BrokenSitePrompt {

suspend fun userAcceptedPrompt()

fun isFeatureEnabled(): Boolean
suspend fun isFeatureEnabled(): Boolean
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class RealBrokenSitePrompt @Inject constructor(
brokenSiteReportRepository.setNextShownDate(null)
}

override fun isFeatureEnabled(): Boolean {
override suspend fun isFeatureEnabled(): Boolean {
return _featureEnabled
}
}

0 comments on commit 46d0dbb

Please sign in to comment.