Skip to content

Commit

Permalink
🐛 Fixed not redirect to lyrics page
Browse files Browse the repository at this point in the history
  • Loading branch information
shub39 committed Sep 29, 2024
1 parent f04a665 commit 6fc8ea4
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
Binary file modified app/release/app-release.apk
Binary file not shown.
Binary file modified app/release/baselineProfiles/0/app-release.dm
Binary file not shown.
Binary file modified app/release/baselineProfiles/1/app-release.dm
Binary file not shown.
2 changes: 1 addition & 1 deletion app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"filters": [],
"attributes": [],
"versionCode": 17,
"versionName": "2.2.0",
"versionName": "2.3.0",
"outputFile": "app-release.apk"
}
],
Expand Down
9 changes: 3 additions & 6 deletions app/src/main/java/com/shub39/rush/ui/component/SearchSheet.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
Expand All @@ -46,16 +45,16 @@ import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.unit.dp
import com.shub39.rush.R
import com.shub39.rush.viewmodel.RushViewModel
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun SearchSheet(
rushViewModel: RushViewModel,
pagerState: PagerState
pagerState: PagerState,
coroutineScope: CoroutineScope
) {
val coroutineScope = rememberCoroutineScope()

val searchResults by rushViewModel.searchResults.collectAsState()
val localSearchResults by rushViewModel.localSearchResults.collectAsState()
val isSearchingLyrics by rushViewModel.isSearchingLyrics.collectAsState()
Expand Down Expand Up @@ -165,7 +164,6 @@ fun SearchSheet(
onClick = {
rushViewModel.toggleSearchSheet()
query = ""

coroutineScope.launch {
pagerState.animateScrollToPage(0)
}
Expand All @@ -181,7 +179,6 @@ fun SearchSheet(
onClick = {
rushViewModel.toggleSearchSheet()
query = ""

coroutineScope.launch {
pagerState.animateScrollToPage(0)
}
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/com/shub39/rush/ui/page/RushApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ fun RushApp(
if (searchSheetState) {
SearchSheet(
rushViewModel = rushViewModel,
pagerState = pagerState
pagerState = pagerState,
coroutineScope = coroutineScope
)
}

Expand Down

0 comments on commit 6fc8ea4

Please sign in to comment.