mirror of
https://github.com/GrakovNe/lissen-android.git
synced 2025-12-23 22:18:09 -05:00
wip
This commit is contained in:
@@ -119,6 +119,8 @@ fun LibraryScreen(
|
||||
val library = libraryViewModel.getPager(searchRequested).collectAsLazyPagingItems()
|
||||
val libraryCount by libraryViewModel.totalCount.observeAsState()
|
||||
|
||||
val libraryListState = rememberLazyListState()
|
||||
|
||||
BackHandler {
|
||||
when (searchRequested) {
|
||||
true -> libraryViewModel.dismissSearch()
|
||||
@@ -182,8 +184,6 @@ fun LibraryScreen(
|
||||
val titleTextStyle = MaterialTheme.typography.titleLarge.copy(fontWeight = FontWeight.SemiBold)
|
||||
val titleHeightDp = with(LocalDensity.current) { titleTextStyle.lineHeight.toPx().toDp() }
|
||||
|
||||
val libraryListState = rememberLazyListState()
|
||||
|
||||
val playingBook by playerViewModel.book.observeAsState()
|
||||
val context = LocalContext.current
|
||||
|
||||
@@ -231,12 +231,6 @@ fun LibraryScreen(
|
||||
}
|
||||
}
|
||||
|
||||
LaunchedEffect(searchRequested) {
|
||||
if (!searchRequested) {
|
||||
libraryListState.scrollToItem(0)
|
||||
}
|
||||
}
|
||||
|
||||
fun provideLibraryTitle(): String {
|
||||
val type = libraryViewModel.fetchPreferredLibraryType()
|
||||
|
||||
@@ -496,7 +490,6 @@ fun LibraryScreen(
|
||||
currentLibraryId = settingsViewModel.fetchPreferredLibraryId()
|
||||
refreshContent(false)
|
||||
playerViewModel.clearPlayingBook()
|
||||
|
||||
preferredLibraryExpanded = false
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user