mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-18 00:57:02 +05:30
build: update to Compose 1.0.0-beta01
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
c8052be29a
commit
6e77a5e94b
4 changed files with 13 additions and 13 deletions
|
@ -49,7 +49,7 @@ fun LobstersApp() {
|
||||||
}
|
}
|
||||||
val jumpToIndex: (Int) -> Unit = {
|
val jumpToIndex: (Int) -> Unit = {
|
||||||
coroutineScope.launch {
|
coroutineScope.launch {
|
||||||
hottestPostsListState.snapToItemIndex(it)
|
hottestPostsListState.animateScrollToItem(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ fun LobstersBottomNav(
|
||||||
},
|
},
|
||||||
label = { Text(stringResource(id = screen.labelRes)) },
|
label = { Text(stringResource(id = screen.labelRes)) },
|
||||||
selected = currentDestination == screen,
|
selected = currentDestination == screen,
|
||||||
alwaysShowLabels = false,
|
alwaysShowLabel = false,
|
||||||
onClick = {
|
onClick = {
|
||||||
if (screen != currentDestination) {
|
if (screen != currentDestination) {
|
||||||
navigateToDestination(screen)
|
navigateToDestination(screen)
|
||||||
|
|
|
@ -3,7 +3,7 @@ package dev.msfjarvis.lobsters.ui.main
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.activity.compose.setContent
|
import androidx.activity.compose.setContent
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.compose.runtime.Providers
|
import androidx.compose.runtime.CompositionLocalProvider
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import dev.msfjarvis.lobsters.ui.theme.LobstersTheme
|
import dev.msfjarvis.lobsters.ui.theme.LobstersTheme
|
||||||
import dev.msfjarvis.lobsters.ui.urllauncher.LocalUrlLauncher
|
import dev.msfjarvis.lobsters.ui.urllauncher.LocalUrlLauncher
|
||||||
|
@ -17,7 +17,7 @@ class MainActivity : AppCompatActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContent {
|
setContent {
|
||||||
Providers(LocalUrlLauncher provides urlLauncher) {
|
CompositionLocalProvider(LocalUrlLauncher provides urlLauncher) {
|
||||||
LobstersTheme {
|
LobstersTheme {
|
||||||
LobstersApp()
|
LobstersApp()
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.requiredWidth
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.items
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
|
@ -111,7 +111,7 @@ fun LobstersItem(
|
||||||
transformations(CircleCropTransformation())
|
transformations(CircleCropTransformation())
|
||||||
},
|
},
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.width(30.dp)
|
.requiredWidth(30.dp)
|
||||||
.padding(4.dp)
|
.padding(4.dp)
|
||||||
.constrainAs(avatar) {
|
.constrainAs(avatar) {
|
||||||
top.linkTo(tags.bottom)
|
top.linkTo(tags.bottom)
|
||||||
|
|
|
@ -15,7 +15,7 @@ object Plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
object Dependencies {
|
object Dependencies {
|
||||||
const val COMPOSE_VERSION = "1.0.0-alpha12"
|
const val COMPOSE_VERSION = "1.0.0-beta01"
|
||||||
|
|
||||||
object Kotlin {
|
object Kotlin {
|
||||||
|
|
||||||
|
@ -35,16 +35,16 @@ object Dependencies {
|
||||||
|
|
||||||
object Compose {
|
object Compose {
|
||||||
|
|
||||||
const val activity = "androidx.activity:activity-compose:1.3.0-alpha02"
|
const val activity = "androidx.activity:activity-compose:1.3.0-alpha03"
|
||||||
const val compiler = "androidx.compose.compiler:compiler:$COMPOSE_VERSION"
|
const val compiler = "androidx.compose.compiler:compiler:$COMPOSE_VERSION"
|
||||||
const val constraintLayout =
|
const val constraintLayout =
|
||||||
"androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha02"
|
"androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha03"
|
||||||
const val foundation = "androidx.compose.foundation:foundation:$COMPOSE_VERSION"
|
const val foundation = "androidx.compose.foundation:foundation:$COMPOSE_VERSION"
|
||||||
const val foundationLayout = "androidx.compose.foundation:foundation-layout:$COMPOSE_VERSION"
|
const val foundationLayout = "androidx.compose.foundation:foundation-layout:$COMPOSE_VERSION"
|
||||||
const val lifecycleViewModel = "androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha01"
|
const val lifecycleViewModel = "androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha02"
|
||||||
const val material = "androidx.compose.material:material:$COMPOSE_VERSION"
|
const val material = "androidx.compose.material:material:$COMPOSE_VERSION"
|
||||||
const val navigation = "androidx.navigation:navigation-compose:1.0.0-alpha07"
|
const val navigation = "androidx.navigation:navigation-compose:1.0.0-alpha08"
|
||||||
const val paging = "androidx.paging:paging-compose:1.0.0-alpha07"
|
const val paging = "androidx.paging:paging-compose:1.0.0-alpha08"
|
||||||
const val runtime = "androidx.compose.runtime:runtime:$COMPOSE_VERSION"
|
const val runtime = "androidx.compose.runtime:runtime:$COMPOSE_VERSION"
|
||||||
const val ui = "androidx.compose.ui:ui:$COMPOSE_VERSION"
|
const val ui = "androidx.compose.ui:ui:$COMPOSE_VERSION"
|
||||||
const val uiUnit = "androidx.compose.ui:ui-unit:$COMPOSE_VERSION"
|
const val uiUnit = "androidx.compose.ui:ui-unit:$COMPOSE_VERSION"
|
||||||
|
@ -66,7 +66,7 @@ object Dependencies {
|
||||||
|
|
||||||
object ThirdParty {
|
object ThirdParty {
|
||||||
|
|
||||||
const val accompanist = "dev.chrisbanes.accompanist:accompanist-coil:0.5.1"
|
const val accompanist = "dev.chrisbanes.accompanist:accompanist-coil:0.6.0"
|
||||||
|
|
||||||
object Moshi {
|
object Moshi {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue