Change gradle version.
This commit is contained in:
parent
82aa5ec62a
commit
9074b78046
4 changed files with 25 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package com.pixelized.biblib.ui.composable.pages
|
||||
|
||||
import android.widget.Toast
|
||||
import androidx.compose.animation.ExperimentalAnimationApi
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
|
|
@ -60,6 +61,11 @@ fun DetailPage(
|
|||
.fillMaxHeight(),
|
||||
elevation = 4.dp
|
||||
) {
|
||||
val toast = Toast.makeText(
|
||||
LocalContext.current,
|
||||
stringResource(id = R.string.not_implemented_yet),
|
||||
Toast.LENGTH_SHORT,
|
||||
)
|
||||
val coroutineScope = rememberCoroutineScope()
|
||||
val sheetState = rememberModalBottomSheetState(ModalBottomSheetValue.Hidden)
|
||||
|
||||
|
|
@ -80,6 +86,8 @@ fun DetailPage(
|
|||
book?.let {
|
||||
DetailPage(
|
||||
book = it,
|
||||
onEpubClick = { toast.show() },
|
||||
onMobiClick = { toast.show() },
|
||||
onSendClick = {
|
||||
val emailCount = user?.amazonEmails?.size ?: 0
|
||||
when {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,17 @@
|
|||
package com.pixelized.biblib.ui.composable.screen
|
||||
|
||||
import android.widget.Toast
|
||||
import androidx.compose.animation.*
|
||||
import androidx.compose.animation.core.tween
|
||||
import androidx.compose.material.Scaffold
|
||||
import androidx.compose.material.rememberScaffoldState
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.runtime.livedata.observeAsState
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import com.pixelized.biblib.R
|
||||
import com.pixelized.biblib.ui.composable.common.BibLibDrawer
|
||||
import com.pixelized.biblib.ui.composable.common.BibLibToolbar
|
||||
import com.pixelized.biblib.ui.composable.pages.DetailPage
|
||||
|
|
@ -31,6 +35,11 @@ fun HomeScreen(
|
|||
booksViewModel: IBooksViewModel = viewModel<BooksViewModel>(),
|
||||
userViewModel: IUserViewModel = viewModel<UserViewModel>()
|
||||
) {
|
||||
val toast = Toast.makeText(
|
||||
LocalContext.current,
|
||||
stringResource(id = R.string.not_implemented_yet),
|
||||
Toast.LENGTH_SHORT,
|
||||
)
|
||||
// navigation
|
||||
val page by navigationViewModel.page.observeAsState()
|
||||
// coroutine
|
||||
|
|
@ -61,18 +70,23 @@ fun HomeScreen(
|
|||
BibLibDrawer(
|
||||
userViewModel = userViewModel,
|
||||
onNewClick = {
|
||||
toast.show()
|
||||
coroutineScope.launch { scaffoldState.drawerState.close() }
|
||||
},
|
||||
onBookClick = {
|
||||
toast.show()
|
||||
coroutineScope.launch { scaffoldState.drawerState.close() }
|
||||
},
|
||||
onSeriesClick = {
|
||||
toast.show()
|
||||
coroutineScope.launch { scaffoldState.drawerState.close() }
|
||||
},
|
||||
onAuthorClick = {
|
||||
toast.show()
|
||||
coroutineScope.launch { scaffoldState.drawerState.close() }
|
||||
},
|
||||
onTagClick = {
|
||||
toast.show()
|
||||
coroutineScope.launch { scaffoldState.drawerState.close() }
|
||||
},
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue