|
@@ -25,8 +25,11 @@ import androidx.compose.foundation.layout.Column
|
|
|
import androidx.compose.foundation.layout.PaddingValues
|
|
import androidx.compose.foundation.layout.PaddingValues
|
|
|
import androidx.compose.foundation.layout.Row
|
|
import androidx.compose.foundation.layout.Row
|
|
|
import androidx.compose.foundation.layout.Spacer
|
|
import androidx.compose.foundation.layout.Spacer
|
|
|
|
|
+import androidx.compose.foundation.layout.WindowInsets
|
|
|
|
|
+import androidx.compose.foundation.layout.asPaddingValues
|
|
|
import androidx.compose.foundation.layout.fillMaxSize
|
|
import androidx.compose.foundation.layout.fillMaxSize
|
|
|
import androidx.compose.foundation.layout.fillMaxWidth
|
|
import androidx.compose.foundation.layout.fillMaxWidth
|
|
|
|
|
+import androidx.compose.foundation.layout.navigationBars
|
|
|
import androidx.compose.foundation.layout.padding
|
|
import androidx.compose.foundation.layout.padding
|
|
|
import androidx.compose.foundation.layout.size
|
|
import androidx.compose.foundation.layout.size
|
|
|
import androidx.compose.foundation.layout.width
|
|
import androidx.compose.foundation.layout.width
|
|
@@ -212,11 +215,17 @@ fun BookshelfScreen(
|
|
|
val scrollBehavior = GlassTopAppBarDefaults.defaultScrollBehavior()
|
|
val scrollBehavior = GlassTopAppBarDefaults.defaultScrollBehavior()
|
|
|
AppScaffold(
|
|
AppScaffold(
|
|
|
modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection),
|
|
modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection),
|
|
|
|
|
+ contentWindowInsets = WindowInsets(0),
|
|
|
snackbarHost = {
|
|
snackbarHost = {
|
|
|
SnackbarHost(
|
|
SnackbarHost(
|
|
|
hostState = snackbarHostState,
|
|
hostState = snackbarHostState,
|
|
|
modifier = Modifier
|
|
modifier = Modifier
|
|
|
- .padding(bottom = 72.dp)
|
|
|
|
|
|
|
+ .padding(
|
|
|
|
|
+
|
|
|
|
|
+ bottom = 72.dp + WindowInsets.navigationBars
|
|
|
|
|
+ .asPaddingValues()
|
|
|
|
|
+ .calculateBottomPadding()
|
|
|
|
|
+ )
|
|
|
)
|
|
)
|
|
|
},
|
|
},
|
|
|
topBar = {
|
|
topBar = {
|
|
@@ -238,7 +247,7 @@ fun BookshelfScreen(
|
|
|
.fillMaxSize()
|
|
.fillMaxSize()
|
|
|
.padding(
|
|
.padding(
|
|
|
top = paddingValues.calculateTopPadding(),
|
|
top = paddingValues.calculateTopPadding(),
|
|
|
- bottom = paddingValues.calculateBottomPadding()
|
|
|
|
|
|
|
+ bottom = 120.dp
|
|
|
),
|
|
),
|
|
|
messageResId = R.string.bookshelf_empty
|
|
messageResId = R.string.bookshelf_empty
|
|
|
)
|
|
)
|
|
@@ -384,11 +393,16 @@ fun BookshelfScreen(
|
|
|
|
|
|
|
|
AppScaffold(
|
|
AppScaffold(
|
|
|
modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection),
|
|
modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection),
|
|
|
|
|
+ contentWindowInsets = WindowInsets(0),
|
|
|
snackbarHost = {
|
|
snackbarHost = {
|
|
|
SnackbarHost(
|
|
SnackbarHost(
|
|
|
hostState = snackbarHostState,
|
|
hostState = snackbarHostState,
|
|
|
modifier = Modifier
|
|
modifier = Modifier
|
|
|
- .padding(bottom = 72.dp)
|
|
|
|
|
|
|
+ .padding(
|
|
|
|
|
+ bottom = 72.dp + WindowInsets.navigationBars
|
|
|
|
|
+ .asPaddingValues()
|
|
|
|
|
+ .calculateBottomPadding()
|
|
|
|
|
+ )
|
|
|
)
|
|
)
|
|
|
},
|
|
},
|
|
|
topBar = {
|
|
topBar = {
|
|
@@ -989,7 +1003,11 @@ fun BookshelfScreen(
|
|
|
visible = isEditMode && selectedBookUrls.isNotEmpty(),
|
|
visible = isEditMode && selectedBookUrls.isNotEmpty(),
|
|
|
modifier = Modifier
|
|
modifier = Modifier
|
|
|
.align(Alignment.BottomCenter)
|
|
.align(Alignment.BottomCenter)
|
|
|
- .padding(bottom = 16.dp + ScreenOffset)
|
|
|
|
|
|
|
+ .padding(
|
|
|
|
|
+ bottom = 16.dp + ScreenOffset + WindowInsets.navigationBars
|
|
|
|
|
+ .asPaddingValues()
|
|
|
|
|
+ .calculateBottomPadding()
|
|
|
|
|
+ )
|
|
|
.zIndex(1f),
|
|
.zIndex(1f),
|
|
|
enter = slideInVertically { it } + fadeIn(),
|
|
enter = slideInVertically { it } + fadeIn(),
|
|
|
exit = slideOutVertically { it } + fadeOut()
|
|
exit = slideOutVertically { it } + fadeOut()
|
|
@@ -1195,7 +1213,7 @@ fun BookshelfPage(
|
|
|
.fillMaxSize()
|
|
.fillMaxSize()
|
|
|
.padding(
|
|
.padding(
|
|
|
top = paddingValues.calculateTopPadding(),
|
|
top = paddingValues.calculateTopPadding(),
|
|
|
- bottom = paddingValues.calculateBottomPadding()
|
|
|
|
|
|
|
+ bottom = 120.dp
|
|
|
),
|
|
),
|
|
|
message = stringResource(R.string.bookshelf_empty_global_search),
|
|
message = stringResource(R.string.bookshelf_empty_global_search),
|
|
|
buttonText = stringResource(R.string.global_search),
|
|
buttonText = stringResource(R.string.global_search),
|
|
@@ -1207,7 +1225,7 @@ fun BookshelfPage(
|
|
|
.fillMaxSize()
|
|
.fillMaxSize()
|
|
|
.padding(
|
|
.padding(
|
|
|
top = paddingValues.calculateTopPadding(),
|
|
top = paddingValues.calculateTopPadding(),
|
|
|
- bottom = paddingValues.calculateBottomPadding()
|
|
|
|
|
|
|
+ bottom = 120.dp
|
|
|
),
|
|
),
|
|
|
messageResId = R.string.bookshelf_empty
|
|
messageResId = R.string.bookshelf_empty
|
|
|
)
|
|
)
|