mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
feat(bundles tab): add BackHandler
This commit is contained in:
parent
50e8d1f8f4
commit
757840b76f
@ -1,5 +1,6 @@
|
|||||||
package app.revanced.manager.ui.screen
|
package app.revanced.manager.ui.screen
|
||||||
|
|
||||||
|
import androidx.activity.compose.BackHandler
|
||||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
@ -203,6 +204,13 @@ fun DashboardScreen(
|
|||||||
}
|
}
|
||||||
|
|
||||||
DashboardPage.BUNDLES -> {
|
DashboardPage.BUNDLES -> {
|
||||||
|
BackHandler {
|
||||||
|
if (bundlesSelectable) vm.cancelSourceSelection() else composableScope.launch {
|
||||||
|
pagerState.animateScrollToPage(
|
||||||
|
DashboardPage.DASHBOARD.ordinal
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val sources by vm.sources.collectAsStateWithLifecycle(initialValue = emptyList())
|
val sources by vm.sources.collectAsStateWithLifecycle(initialValue = emptyList())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user