@@ -92,6 +92,8 @@ import me.bmax.apatch.ui.component.ConfirmResult
9292import me.bmax.apatch.ui.component.KPModuleRemoveButton
9393import me.bmax.apatch.ui.component.LoadingDialogHandle
9494import me.bmax.apatch.ui.component.ProvideMenuShape
95+ import me.bmax.apatch.ui.component.WallpaperAwareDropdownMenu
96+ import me.bmax.apatch.ui.component.WallpaperAwareDropdownMenuItem
9597import me.bmax.apatch.ui.component.rememberConfirmDialog
9698import me.bmax.apatch.ui.component.rememberLoadingDialog
9799import me.bmax.apatch.ui.viewmodel.KPModel
@@ -205,39 +207,37 @@ fun KPModuleScreen(navigator: DestinationsNavigator) {
205207 )
206208 }
207209
208- ProvideMenuShape (RoundedCornerShape (10 .dp)) {
209- DropdownMenu (
210- expanded = expanded,
211- onDismissRequest = { expanded = false },
212- properties = PopupProperties (focusable = true )
213- ) {
214- options.forEach { label ->
215- DropdownMenuItem (text = { Text (label) }, onClick = {
216- expanded = false
217- when (label) {
218- moduleEmbed -> {
219- navigator.navigate(PatchesDestination (PatchesViewModel .PatchMode .PATCH_AND_INSTALL ))
220- }
221-
222- moduleInstall -> {
210+ WallpaperAwareDropdownMenu (
211+ expanded = expanded,
212+ onDismissRequest = { expanded = false },
213+ shape = RoundedCornerShape (10 .dp)
214+ ) {
215+ options.forEach { label ->
216+ WallpaperAwareDropdownMenuItem (text = { Text (label) }, onClick = {
217+ expanded = false
218+ when (label) {
219+ moduleEmbed -> {
220+ navigator.navigate(PatchesDestination (PatchesViewModel .PatchMode .PATCH_AND_INSTALL ))
221+ }
222+
223+ moduleInstall -> {
223224// val intent = Intent(Intent.ACTION_GET_CONTENT)
224225// intent.type = "application/zip"
225226// selectZipLauncher.launch(intent)
226- Toast .makeText(
227- context,
228- " Under development" ,
229- Toast .LENGTH_SHORT
230- ).show()
231- }
232-
233- moduleLoad -> {
234- val intent = Intent (Intent .ACTION_GET_CONTENT )
235- intent.type = " */*"
236- selectKpmLauncher.launch(intent)
237- }
227+ Toast .makeText(
228+ context,
229+ " Under development" ,
230+ Toast .LENGTH_SHORT
231+ ).show()
238232 }
239- })
240- }
233+
234+ moduleLoad -> {
235+ val intent = Intent (Intent .ACTION_GET_CONTENT )
236+ intent.type = " */*"
237+ selectKpmLauncher.launch(intent)
238+ }
239+ }
240+ })
241241 }
242242 }
243243 }
0 commit comments