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

Commit a5e703a4 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Reset bundle header switch state on reattach

Because if we have a bundle then the feature must have been
reenabled in settings

Test: manual
Turn off organizer type from the shade (notif bundle disappears)
Turn the type back on in Settings
Post a notif to that bundle
Long press on the bundle header
Flag: com.android.systemui.notification_bundle_ui
Fixes: 434597483

Change-Id: I35275be1bd0464e09075ca3ab5076b0a0e8e5ba3
parent 5fa5c737
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -56,6 +56,9 @@ class BundleHeaderGutsContent(context: Context) : GutsContent {

        composeView.repeatWhenAttached {
            repeatOnLifecycle(Lifecycle.State.CREATED) {
                // if we have an attached (visible) bundle, the BE setting and thus the switch must
                // be 'enabled'
                viewModel.switchState = true
                composeView.setContent {
                    // TODO(b/399588047): Check if we can init PlatformTheme once instead of once
                    //  per ComposeView