Skip to content

Commit

Permalink
Navigation Update (#220)
Browse files Browse the repository at this point in the history
* feat: update app navigation

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* feat: remove BakaHome

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

* feat: update navbar

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>

---------

Signed-off-by: Aditya Wasan <adityawasan55@gmail.com>
  • Loading branch information
Skrilltrax committed Apr 22, 2024
1 parent 6e082cf commit 878ffa1
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 25 deletions.
7 changes: 1 addition & 6 deletions app/src/main/kotlin/dev/skrilltrax/baka/MainActivity.kt
Expand Up @@ -27,13 +27,8 @@ class MainActivity : ComponentActivity() {
setContent { BakaApp(isDarkTheme = isSystemInDarkTheme()) }
}

override fun onNewIntent(intent: Intent?) {
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
if (intent == null) {
setResult(RESULT_CANCELED)
finish()
return
}

val uri = intent.data ?: return
val stringUri = uri.toString()
Expand Down
22 changes: 11 additions & 11 deletions gradle/libs.versions.toml
@@ -1,14 +1,14 @@
[versions]
anvil = "2.4.8"
compose = "1.5.4"
compiler = "1.5.8"
compose = "1.6.6"
compiler = "1.5.12"
apollo = "3.8.2"
kotlin = "1.9.22"
kotlin = "1.9.23"
coroutines = "1.7.3"
dagger = "2.50"

[libraries]
build-agp = "com.android.tools.build:gradle:8.4.0-alpha04"
build-agp = "com.android.tools.build:gradle:8.5.0-alpha06"
build-anvil = { module = "com.squareup.anvil:gradle-plugin", version.ref = "anvil" }
build-binarycompat = "org.jetbrains.kotlinx:binary-compatibility-validator:0.10.0"
build-cachefix = "org.gradle.android.cache-fix:org.gradle.android.cache-fix.gradle.plugin:3.0"
Expand All @@ -23,27 +23,27 @@ build-mavenpublish = "com.vanniktech:gradle-maven-publish-plugin:0.26.0"
build-okhttp = "com.squareup.okhttp3:okhttp:4.12.0"
build-r8 = "com.android.tools:r8:c765114c30df8ed3e5d1a84868d3ed1037549e85"
build-semver = "com.vdurmont:semver4j:3.1.0"
build-spotless = "com.diffplug.spotless:spotless-plugin-gradle:6.22.0"
build-spotless = "com.diffplug.spotless:spotless-plugin-gradle:6.25.0"
build-dependencyanalysis = "com.autonomousapps:dependency-analysis-gradle-plugin:1.20.0"

accompanist-insets = "com.google.accompanist:accompanist-insets:0.23.1"
accompanist-systemui = "com.google.accompanist:accompanist-systemuicontroller:0.23.1"

androidx-core = "androidx.core:core-ktx:1.12.0"
androidx-datastore-prefs-core = "androidx.datastore:datastore-preferences-core:1.0.0"
androidx-core = "androidx.core:core-ktx:1.13.0"
androidx-datastore-prefs-core = "androidx.datastore:datastore-preferences-core:1.1.0"
androidx-lifecycle-ktx = "androidx.lifecycle:lifecycle-runtime-ktx:2.7.0"
androidx-navigation-compose = "androidx.navigation:navigation-compose:2.7.6"
androidx-navigation-compose = "androidx.navigation:navigation-compose:2.7.7"

apollo-runtime = { module = "com.apollographql.apollo3:apollo-runtime", version.ref = "apollo" }
apollo-cache-memory = { module = "com.apollographql.apollo3:apollo-normalized-cache", version.ref = "apollo" }
apollo-cache-sqlite = { module = "com.apollographql.apollo3:apollo-normalized-cache-sqlite", version.ref = "apollo" }

compose-activity = "androidx.activity:activity-compose:1.8.2"
compose-activity = "androidx.activity:activity-compose:1.9.0"
compose-compiler = { module = "androidx.compose.compiler:compiler", version.ref = "compiler" }
compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" }
compose-foundation-layout = { module = "androidx.compose.foundation:foundation-layout", version.ref = "compose" }
compose-material = { module = "androidx.compose.material:material", version.ref = "compose" }
compose-material3 = "androidx.compose.material3:material3:1.1.2"
compose-material3 = "androidx.compose.material3:material3:1.2.1"
compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
Expand All @@ -64,7 +64,7 @@ thirdparty-leakcanary = "com.squareup.leakcanary:leakcanary-android:2.12"
testing-espresso-core = "androidx.test.espresso:espresso-core:3.5.1"
testing-junit = "junit:junit:4.13.2"
testing-junit-ext = "androidx.test.ext:junit:1.1.5"
testing-junit-ui = "androidx.compose.ui:ui-test-junit4:1.5.4"
testing-junit-ui = "androidx.compose.ui:ui-test-junit4:1.6.6"
testing-kotlin = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
testing-kotlin-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
testing-kotlin-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Expand Up @@ -8,7 +8,6 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun BakaAuthScreen(onClick: () -> Unit, modifier: Modifier = Modifier) {
Column(
Expand Down
1 change: 1 addition & 0 deletions ui/home/build.gradle.kts
Expand Up @@ -10,6 +10,7 @@ android {
}

dependencies {
implementation(projects.data.model)
implementation(projects.ui.auth)
implementation(projects.ui.common)

Expand Down
Expand Up @@ -9,7 +9,6 @@ import androidx.compose.material3.Scaffold
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.navigation.NavGraph.Companion.findStartDestination
Expand All @@ -35,8 +34,7 @@ fun BakaHomeScreen(
val navController = rememberNavController()
val navBackStackEntry by navController.currentBackStackEntryAsState()
val navDestination = navBackStackEntry?.destination
val currentDestination =
remember(navDestination) { BakaDestination.fromDisplayName(navDestination?.route) }
val currentDestination = BakaDestination.fromDisplayName(navDestination?.route)

val navigateToDestination = { _: BakaDestination, newDestination: BakaDestination ->
navController.navigate(newDestination.displayName) {
Expand Down
Expand Up @@ -7,13 +7,15 @@ import androidx.compose.foundation.lazy.LazyRow
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import dev.skrilltrax.baka.data.model.media.Media
import dev.skrilltrax.baka.ui.common.BakaThumbItem

@Preview()
@Composable
fun BakaTitleRow(title: String = "CURRENTLY TRENDING") {
fun BakaTitleRow(
title: String,
itemList: List<Media>,
) {
Column(modifier = Modifier.padding(start = 16.dp)) {
Text(text = title)
LazyRow(
Expand Down

0 comments on commit 878ffa1

Please sign in to comment.