Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e149369d authored by Liran Binyamin's avatar Liran Binyamin
Browse files

Allow supressing user education views for bubble bar

Bug: 273994695
Test: Manual
Change-Id: Ibb76c336671bfb8231fc34981f21e90f412debb6
parent 7a85cfb8
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -40,7 +40,13 @@ class BubbleEducationController(private val context: Context) {

    /** Whether education view should show for the collapsed stack. */
    fun shouldShowStackEducation(bubble: BubbleViewProvider?): Boolean {
        val shouldShow = bubble != null &&
        if (BubbleDebugConfig.neverShowUserEducation(context)) {
            logDebug("Show stack edu: never")
            return false
        }

        val shouldShow =
            bubble != null &&
                bubble.isConversationBubble && // show education for conversation bubbles only
                (!hasSeenStackEducation || BubbleDebugConfig.forceShowUserEducation(context))
        logDebug("Show stack edu: $shouldShow")
@@ -49,7 +55,13 @@ class BubbleEducationController(private val context: Context) {

    /** Whether the educational view should show for the expanded view "manage" menu. */
    fun shouldShowManageEducation(bubble: BubbleViewProvider?): Boolean {
        val shouldShow = bubble != null &&
        if (BubbleDebugConfig.neverShowUserEducation(context)) {
            logDebug("Show manage edu: never")
            return false
        }

        val shouldShow =
            bubble != null &&
                bubble.isConversationBubble && // show education for conversation bubbles only
                (!hasSeenManageEducation || BubbleDebugConfig.forceShowUserEducation(context))
        logDebug("Show manage edu: $shouldShow")