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

Commit 1c61b5e6 authored by Yuri Lin's avatar Yuri Lin Committed by Android (Google) Code Review
Browse files

Merge "Close guts when disabling a bundle" into main

parents cce1ef45 34d3768c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -73,7 +73,7 @@ class BundleHeaderGutsViewModelTest : SysuiTestCase() {


        // Assert
        // Assert
        verify(mockDisableBundle).invoke()
        verify(mockDisableBundle).invoke()
        verify(mockCloseGuts, never()).invoke()
        verify(mockCloseGuts).invoke()
    }
    }


    @Test
    @Test
+2 −3
Original line number Original line Diff line number Diff line
@@ -51,9 +51,8 @@ class BundleHeaderGutsViewModel(
    }
    }


    fun onDoneOrApplyClicked() {
    fun onDoneOrApplyClicked() {
        if (switchState) {
        closeGuts.invoke()
        closeGuts.invoke()
        } else {
        if (!switchState) {
            // The bundle always starts enabled otherwise the guts would not have been visible. Thus
            // The bundle always starts enabled otherwise the guts would not have been visible. Thus
            // we only need to update settings when the switch was toggled to false. Notifications
            // we only need to update settings when the switch was toggled to false. Notifications
            // that were previously in the bundle will be re-sorted into their original locations.
            // that were previously in the bundle will be re-sorted into their original locations.