Skip to content

Commit

Permalink
fix: repeat loop query
Browse files Browse the repository at this point in the history
  • Loading branch information
ZTFtrue committed Feb 26, 2024
1 parent 3ec0d44 commit 9a098bd
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions app/src/main/java/com/ztftrue/music/ui/play/LyricsView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -163,28 +163,34 @@ fun LyricsView(

}
}
LaunchedEffect(showMenu) {
if(showMenu){
val list = musicViewModel.dictionaryAppList
list.forEach {
if (it.autoGo) {
val intent = Intent()
intent.setAction(Intent.ACTION_PROCESS_TEXT)
intent.setClassName(
it.packageName,
it.name
)
intent.putExtra(
Intent.EXTRA_PROCESS_TEXT,
word
)
context.startActivity(intent)
return@forEach
}
}
}
}
key(showMenu) {
if (showMenu) {
val list = musicViewModel.dictionaryAppList
if (list.isEmpty()) {
showMenu = false
} else {
list.forEach {
if (it.autoGo) {
val intent = Intent()
intent.setAction(Intent.ACTION_PROCESS_TEXT)
intent.setClassName(
it.packageName,
it.name
)
intent.putExtra(
Intent.EXTRA_PROCESS_TEXT,
word
)
context.startActivity(intent)
return@forEach
}
}

Popup(
// on below line we are adding
// alignment and properties.
Expand Down

0 comments on commit 9a098bd

Please sign in to comment.