Bump androidx.compose:compose-bom from 2024.08.00 to 2024.09.02 (#55)
This commit is contained in:
+15
-31
@@ -8,7 +8,6 @@ import androidx.compose.animation.core.animateFloatAsState
|
|||||||
import androidx.compose.animation.core.tween
|
import androidx.compose.animation.core.tween
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Box
|
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.calculateEndPadding
|
import androidx.compose.foundation.layout.calculateEndPadding
|
||||||
@@ -41,7 +40,8 @@ import androidx.compose.material3.Scaffold
|
|||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.material3.TopAppBar
|
import androidx.compose.material3.TopAppBar
|
||||||
import androidx.compose.material3.TopAppBarDefaults
|
import androidx.compose.material3.TopAppBarDefaults
|
||||||
import androidx.compose.material3.pulltorefresh.PullToRefreshContainer
|
import androidx.compose.material3.pulltorefresh.PullToRefreshBox
|
||||||
|
import androidx.compose.material3.pulltorefresh.PullToRefreshDefaults
|
||||||
import androidx.compose.material3.pulltorefresh.rememberPullToRefreshState
|
import androidx.compose.material3.pulltorefresh.rememberPullToRefreshState
|
||||||
import androidx.compose.material3.surfaceColorAtElevation
|
import androidx.compose.material3.surfaceColorAtElevation
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
@@ -55,7 +55,6 @@ import androidx.compose.runtime.setValue
|
|||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.unit.DpOffset
|
import androidx.compose.ui.unit.DpOffset
|
||||||
import androidx.compose.ui.unit.LayoutDirection
|
import androidx.compose.ui.unit.LayoutDirection
|
||||||
@@ -286,16 +285,23 @@ fun ChatMaterialsScreen(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
) { padding ->
|
) { padding ->
|
||||||
Box(
|
PullToRefreshBox(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(start = padding.calculateStartPadding(LayoutDirection.Ltr))
|
.padding(start = padding.calculateStartPadding(LayoutDirection.Ltr))
|
||||||
.padding(end = padding.calculateEndPadding(LayoutDirection.Ltr))
|
.padding(end = padding.calculateEndPadding(LayoutDirection.Ltr)),
|
||||||
.then(
|
state = pullToRefreshState,
|
||||||
if (enablePullToRefresh) {
|
isRefreshing = screenState.isLoading,
|
||||||
Modifier.nestedScroll(pullToRefreshState.nestedScrollConnection)
|
onRefresh = onRefresh,
|
||||||
} else Modifier
|
indicator = {
|
||||||
|
PullToRefreshDefaults.Indicator(
|
||||||
|
state = pullToRefreshState,
|
||||||
|
isRefreshing = screenState.isLoading,
|
||||||
|
modifier = Modifier
|
||||||
|
.align(Alignment.TopCenter)
|
||||||
|
.padding(top = padding.calculateTopPadding()),
|
||||||
)
|
)
|
||||||
|
}
|
||||||
) {
|
) {
|
||||||
if (checkedTypeIndex in listOf(0, 1)) {
|
if (checkedTypeIndex in listOf(0, 1)) {
|
||||||
LazyVerticalGrid(
|
LazyVerticalGrid(
|
||||||
@@ -368,28 +374,6 @@ fun ChatMaterialsScreen(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enablePullToRefresh) {
|
|
||||||
if (pullToRefreshState.isRefreshing) {
|
|
||||||
LaunchedEffect(true) {
|
|
||||||
onRefresh()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LaunchedEffect(screenState.isLoading) {
|
|
||||||
if (!screenState.isLoading) {
|
|
||||||
pullToRefreshState.endRefresh()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
PullToRefreshContainer(
|
|
||||||
state = pullToRefreshState,
|
|
||||||
modifier = Modifier
|
|
||||||
.align(Alignment.TopCenter)
|
|
||||||
.padding(top = padding.calculateTopPadding()),
|
|
||||||
contentColor = MaterialTheme.colorScheme.primary
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-31
@@ -9,7 +9,6 @@ import androidx.compose.animation.fadeIn
|
|||||||
import androidx.compose.animation.fadeOut
|
import androidx.compose.animation.fadeOut
|
||||||
import androidx.compose.animation.slideIn
|
import androidx.compose.animation.slideIn
|
||||||
import androidx.compose.animation.slideOut
|
import androidx.compose.animation.slideOut
|
||||||
import androidx.compose.foundation.layout.Box
|
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.WindowInsets
|
import androidx.compose.foundation.layout.WindowInsets
|
||||||
@@ -37,7 +36,8 @@ import androidx.compose.material3.Scaffold
|
|||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.material3.TopAppBar
|
import androidx.compose.material3.TopAppBar
|
||||||
import androidx.compose.material3.TopAppBarDefaults
|
import androidx.compose.material3.TopAppBarDefaults
|
||||||
import androidx.compose.material3.pulltorefresh.PullToRefreshContainer
|
import androidx.compose.material3.pulltorefresh.PullToRefreshBox
|
||||||
|
import androidx.compose.material3.pulltorefresh.PullToRefreshDefaults
|
||||||
import androidx.compose.material3.pulltorefresh.rememberPullToRefreshState
|
import androidx.compose.material3.pulltorefresh.rememberPullToRefreshState
|
||||||
import androidx.compose.material3.surfaceColorAtElevation
|
import androidx.compose.material3.surfaceColorAtElevation
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
@@ -52,7 +52,6 @@ import androidx.compose.runtime.setValue
|
|||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.draw.rotate
|
import androidx.compose.ui.draw.rotate
|
||||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.compose.ui.platform.LocalView
|
import androidx.compose.ui.platform.LocalView
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
@@ -338,17 +337,24 @@ fun ConversationsScreen(
|
|||||||
else -> {
|
else -> {
|
||||||
val pullToRefreshState = rememberPullToRefreshState()
|
val pullToRefreshState = rememberPullToRefreshState()
|
||||||
|
|
||||||
Box(
|
PullToRefreshBox(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(start = padding.calculateStartPadding(LayoutDirection.Ltr))
|
.padding(start = padding.calculateStartPadding(LayoutDirection.Ltr))
|
||||||
.padding(end = padding.calculateEndPadding(LayoutDirection.Ltr))
|
.padding(end = padding.calculateEndPadding(LayoutDirection.Ltr))
|
||||||
.padding(bottom = padding.calculateBottomPadding())
|
.padding(bottom = padding.calculateBottomPadding()),
|
||||||
.then(
|
state = pullToRefreshState,
|
||||||
if (enablePullToRefresh) {
|
isRefreshing = screenState.isLoading,
|
||||||
Modifier.nestedScroll(pullToRefreshState.nestedScrollConnection)
|
onRefresh = onRefresh,
|
||||||
} else Modifier
|
indicator = {
|
||||||
|
PullToRefreshDefaults.Indicator(
|
||||||
|
state = pullToRefreshState,
|
||||||
|
isRefreshing = screenState.isLoading,
|
||||||
|
modifier = Modifier
|
||||||
|
.align(Alignment.TopCenter)
|
||||||
|
.padding(top = padding.calculateTopPadding()),
|
||||||
)
|
)
|
||||||
|
}
|
||||||
) {
|
) {
|
||||||
ConversationsList(
|
ConversationsList(
|
||||||
onConversationsClick = onConversationItemClicked,
|
onConversationsClick = onConversationItemClicked,
|
||||||
@@ -368,28 +374,6 @@ fun ConversationsScreen(
|
|||||||
padding = padding,
|
padding = padding,
|
||||||
onPhotoClicked = onPhotoClicked
|
onPhotoClicked = onPhotoClicked
|
||||||
)
|
)
|
||||||
|
|
||||||
if (enablePullToRefresh) {
|
|
||||||
if (pullToRefreshState.isRefreshing) {
|
|
||||||
LaunchedEffect(true) {
|
|
||||||
onRefresh()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LaunchedEffect(screenState.isLoading) {
|
|
||||||
if (!screenState.isLoading) {
|
|
||||||
pullToRefreshState.endRefresh()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
PullToRefreshContainer(
|
|
||||||
state = pullToRefreshState,
|
|
||||||
modifier = Modifier
|
|
||||||
.align(Alignment.TopCenter)
|
|
||||||
.padding(top = padding.calculateTopPadding()),
|
|
||||||
contentColor = MaterialTheme.colorScheme.primary
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-32
@@ -25,7 +25,8 @@ import androidx.compose.material3.Tab
|
|||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.material3.TopAppBar
|
import androidx.compose.material3.TopAppBar
|
||||||
import androidx.compose.material3.TopAppBarDefaults
|
import androidx.compose.material3.TopAppBarDefaults
|
||||||
import androidx.compose.material3.pulltorefresh.PullToRefreshContainer
|
import androidx.compose.material3.pulltorefresh.PullToRefreshBox
|
||||||
|
import androidx.compose.material3.pulltorefresh.PullToRefreshDefaults
|
||||||
import androidx.compose.material3.pulltorefresh.rememberPullToRefreshState
|
import androidx.compose.material3.pulltorefresh.rememberPullToRefreshState
|
||||||
import androidx.compose.material3.surfaceColorAtElevation
|
import androidx.compose.material3.surfaceColorAtElevation
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
@@ -40,7 +41,6 @@ import androidx.compose.runtime.snapshotFlow
|
|||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
@@ -281,19 +281,24 @@ fun FriendsScreen(
|
|||||||
state = pagerState,
|
state = pagerState,
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
) { index ->
|
) { index ->
|
||||||
Box(
|
PullToRefreshBox(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(start = padding.calculateStartPadding(LayoutDirection.Ltr))
|
.padding(start = padding.calculateStartPadding(LayoutDirection.Ltr))
|
||||||
.padding(end = padding.calculateEndPadding(LayoutDirection.Ltr))
|
.padding(end = padding.calculateEndPadding(LayoutDirection.Ltr))
|
||||||
.padding(bottom = padding.calculateBottomPadding())
|
.padding(bottom = padding.calculateBottomPadding()),
|
||||||
.then(
|
state = pullToRefreshState,
|
||||||
if (enablePullToRefresh) {
|
isRefreshing = screenState.isLoading,
|
||||||
Modifier.nestedScroll(
|
onRefresh = onRefresh,
|
||||||
pullToRefreshState.nestedScrollConnection
|
indicator = {
|
||||||
)
|
PullToRefreshDefaults.Indicator(
|
||||||
} else Modifier
|
state = pullToRefreshState,
|
||||||
|
isRefreshing = screenState.isLoading,
|
||||||
|
modifier = Modifier
|
||||||
|
.align(Alignment.TopCenter)
|
||||||
|
.padding(top = padding.calculateTopPadding()),
|
||||||
)
|
)
|
||||||
|
}
|
||||||
) {
|
) {
|
||||||
val friendsToDisplay = screenState.friends
|
val friendsToDisplay = screenState.friends
|
||||||
|
|
||||||
@@ -322,28 +327,6 @@ fun FriendsScreen(
|
|||||||
customText = "No${if (index == 1) " online" else ""} friends :("
|
customText = "No${if (index == 1) " online" else ""} friends :("
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enablePullToRefresh) {
|
|
||||||
if (pullToRefreshState.isRefreshing) {
|
|
||||||
LaunchedEffect(true) {
|
|
||||||
onRefresh()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LaunchedEffect(screenState.isLoading) {
|
|
||||||
if (!screenState.isLoading) {
|
|
||||||
pullToRefreshState.endRefresh()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
PullToRefreshContainer(
|
|
||||||
state = pullToRefreshState,
|
|
||||||
modifier = Modifier
|
|
||||||
.padding(top = padding.calculateTopPadding())
|
|
||||||
.align(Alignment.TopCenter),
|
|
||||||
contentColor = MaterialTheme.colorScheme.primary
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ haze = "0.7.3"
|
|||||||
kotlin = "2.0.20"
|
kotlin = "2.0.20"
|
||||||
ksp = "2.0.20-1.0.24"
|
ksp = "2.0.20-1.0.24"
|
||||||
|
|
||||||
compose-bom = "2024.08.00"
|
compose-bom = "2024.09.02"
|
||||||
koin = "3.5.6"
|
koin = "3.5.6"
|
||||||
|
|
||||||
accompanist = "0.36.0"
|
accompanist = "0.36.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user