From 935002459f65a0d4e915f50fdf563981ed5dc5a0 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 18 Dec 2022 11:51:52 -0500 Subject: [PATCH] Change sidebar to info (#245) * Upgrade to compose 1.3.2 * Change sidebar to info. Fixes #115 --- app/build.gradle | 37 +++++++++---------- .../ui/components/community/Community.kt | 2 +- .../sidebar/CommunitySidebarActivity.kt | 2 +- .../com/jerboa/ui/components/home/Home.kt | 2 +- .../home/sidebar/SiteSidebarActivity.kt | 2 +- build.gradle | 9 ++--- 6 files changed, 25 insertions(+), 29 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index d6b5abc4b..8fce0a60a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -74,10 +74,7 @@ android { } dependencies { - def room_version = "2.4.3" - def accompanist_version = '0.25.1' - def lifecycle_version = "2.5.1" - def compose_version = "1.2.1" + def accompanist_version = '0.28.0' implementation 'com.github.jeziellago:compose-markdown:0.3.1' @@ -91,43 +88,43 @@ dependencies { // LiveData implementation "androidx.compose.runtime:runtime-livedata:$compose_version" - implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version" - implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version" - implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" + implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.5.1" + implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.5.1" + implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1" // To use Kotlin annotation processing tool (kapt) - kapt("androidx.room:room-compiler:$room_version") + kapt("androidx.room:room-compiler:2.4.3") - implementation "androidx.room:room-runtime:$room_version" - annotationProcessor "androidx.room:room-compiler:$room_version" + implementation "androidx.room:room-runtime:2.4.3" + annotationProcessor "androidx.room:room-compiler:2.4.3" // optional - Kotlin Extensions and Coroutines support for Room - implementation("androidx.room:room-ktx:$room_version") + implementation("androidx.room:room-ktx:2.4.3") // optional - Test helpers - testImplementation "androidx.room:room-testing:$room_version" + testImplementation "androidx.room:room-testing:2.4.3" // optional - Paging 3 Integration - implementation "androidx.room:room-paging:$room_version" + implementation "androidx.room:room-paging:2.4.3" implementation "io.arrow-kt:arrow-core:1.0.1" - implementation "androidx.compose.material:material-icons-extended:$compose_version" + implementation "androidx.compose.material:material:1.3.1" + implementation "androidx.compose.material:material-icons-extended:1.3.1" implementation 'org.ocpsoft.prettytime:prettytime:5.0.3.Final' implementation 'io.coil-kt:coil-compose:2.2.1' - implementation "androidx.navigation:navigation-compose:2.5.2" - testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.3' + implementation "androidx.navigation:navigation-compose:2.5.3" + testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4' testImplementation "androidx.arch.core:core-testing:2.1.0" implementation "com.squareup.retrofit2:retrofit:2.9.0" implementation "com.squareup.retrofit2:retrofit:2.9.0" implementation "com.squareup.retrofit2:converter-gson:2.9.0" implementation 'androidx.core:core-ktx:1.9.0' implementation "androidx.compose.ui:ui:$compose_version" - implementation "androidx.compose.material:material:$compose_version" implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" - implementation 'androidx.activity:activity-compose:1.6.0' + implementation 'androidx.activity:activity-compose:1.6.1' testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.3' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + androidTestImplementation 'androidx.test.ext:junit:1.1.4' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0' androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version" diff --git a/app/src/main/java/com/jerboa/ui/components/community/Community.kt b/app/src/main/java/com/jerboa/ui/components/community/Community.kt index fb4d39671..be75b4183 100644 --- a/app/src/main/java/com/jerboa/ui/components/community/Community.kt +++ b/app/src/main/java/com/jerboa/ui/components/community/Community.kt @@ -233,7 +233,7 @@ fun CommunityMoreDialog( } ) IconAndTextDrawerItem( - text = "View Sidebar", + text = "Community Info", icon = Icons.Default.Info, onClick = { navController.navigate("communitySidebar") diff --git a/app/src/main/java/com/jerboa/ui/components/community/sidebar/CommunitySidebarActivity.kt b/app/src/main/java/com/jerboa/ui/components/community/sidebar/CommunitySidebarActivity.kt index e2d656376..4ccd1d07a 100644 --- a/app/src/main/java/com/jerboa/ui/components/community/sidebar/CommunitySidebarActivity.kt +++ b/app/src/main/java/com/jerboa/ui/components/community/sidebar/CommunitySidebarActivity.kt @@ -16,7 +16,7 @@ fun CommunitySidebarActivity( ) { Log.d("jerboa", "got to community sidebar activity") - val title = "${communityViewModel.communityView?.community?.name} Sidebar" + val title = "${communityViewModel.communityView?.community?.name} Info" Surface(color = MaterialTheme.colors.background) { Scaffold( diff --git a/app/src/main/java/com/jerboa/ui/components/home/Home.kt b/app/src/main/java/com/jerboa/ui/components/home/Home.kt index 70277952d..fc10ccc85 100644 --- a/app/src/main/java/com/jerboa/ui/components/home/Home.kt +++ b/app/src/main/java/com/jerboa/ui/components/home/Home.kt @@ -602,7 +602,7 @@ fun HomeMoreDialog( } ) IconAndTextDrawerItem( - text = "View Sidebar", + text = "Site Info", icon = Icons.Default.Info, onClick = { navController.navigate("siteSidebar") diff --git a/app/src/main/java/com/jerboa/ui/components/home/sidebar/SiteSidebarActivity.kt b/app/src/main/java/com/jerboa/ui/components/home/sidebar/SiteSidebarActivity.kt index 4729a0d18..98671be0b 100644 --- a/app/src/main/java/com/jerboa/ui/components/home/sidebar/SiteSidebarActivity.kt +++ b/app/src/main/java/com/jerboa/ui/components/home/sidebar/SiteSidebarActivity.kt @@ -16,7 +16,7 @@ fun SiteSidebarActivity( ) { Log.d("jerboa", "got to site sidebar activity") - val title = "${siteViewModel.siteRes?.site_view?.site?.name} Sidebar" + val title = "${siteViewModel.siteRes?.site_view?.site?.name} Info" Surface(color = MaterialTheme.colors.background) { Scaffold( diff --git a/build.gradle b/build.gradle index 484f2b515..1ebc71dba 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ buildscript { ext { - compose_version = '1.3.1' + compose_version = '1.3.2' } repositories { google() @@ -9,9 +9,9 @@ buildscript { }// Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '8.0.0-alpha02' apply false - id 'com.android.library' version '8.0.0-alpha02' apply false - id 'org.jetbrains.kotlin.android' version '1.7.10' apply false + id 'com.android.application' version '8.0.0-alpha09' apply false + id 'com.android.library' version '8.0.0-alpha09' apply false + id 'org.jetbrains.kotlin.android' version '1.7.20' apply false id "com.github.ben-manes.versions" version "0.42.0" id 'org.jmailen.kotlinter' version "3.12.0" apply false } @@ -23,7 +23,6 @@ subprojects { } } - task clean(type: Delete) { delete rootProject.buildDir }