UI: handle back navigation when user is in multi-selection mode

This commit is contained in:
Han Yin 2025-04-14 22:10:19 -07:00
parent 2d6b8856f6
commit 561fe0222f
1 changed files with 7 additions and 2 deletions

View File

@ -113,11 +113,16 @@ fun ModelsManagementScreen(
} }
BackHandler( BackHandler(
enabled = managementState is Importation.Importing enabled = managementState is Importation.Importing || isMultiSelectionMode
|| managementState is Deletion.Deleting || managementState is Deletion.Deleting
) { ) {
if (isMultiSelectionMode) {
// Exit selection mode if in selection mode
exitSelectionMode()
} else {
/* Ignore back press while processing model management requests */ /* Ignore back press while processing model management requests */
} }
}
StorageAppScaffold( StorageAppScaffold(
title = "Models Management", title = "Models Management",