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

Commit 0f96a7e5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[SB] Make OngoingActivityChipModel.Shown a sealed class." into main

parents 69259929 a216de29
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -418,6 +418,7 @@ object OngoingActivityChipBinder {
            }
            is OngoingActivityChipModel.Shown.Timer,
            is OngoingActivityChipModel.Shown.Text,
            is OngoingActivityChipModel.Shown.ShortTimeDelta,
            is OngoingActivityChipModel.Shown.IconOnly -> {
                chipView.accessibilityLiveRegion = View.ACCESSIBILITY_LIVE_REGION_NONE
            }
+4 −0
Original line number Diff line number Diff line
@@ -95,6 +95,10 @@ fun ChipContent(viewModel: OngoingActivityChipModel.Shown, modifier: Modifier =
        is OngoingActivityChipModel.Shown.ShortTimeDelta -> {
            // TODO(b/372657935): Implement ShortTimeDelta content in compose.
        }

        is OngoingActivityChipModel.Shown.IconOnly -> {
            throw IllegalStateException("ChipContent should only be used if the chip shows text")
        }
    }
}

+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ sealed class OngoingActivityChipModel {
    }

    /** This chip should be shown with the given information. */
    abstract class Shown(
    sealed class Shown(
        /** The icon to show on the chip. If null, no icon will be shown. */
        open val icon: ChipIcon?,
        /** What colors to use for the chip. */