Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Migrate remaining screens to Compose #719

Merged
merged 31 commits into from
Nov 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
02a0cae
Start of migration to Paging3
chrisbanes Sep 29, 2020
a78dd7c
More paging3 migrations
chrisbanes Sep 29, 2020
20f6ced
Add paging-compose dependency
chrisbanes Oct 23, 2020
3869502
Disable paging for now
chrisbanes Oct 28, 2020
cf10b70
Fix Paging Compose version
chrisbanes Oct 28, 2020
e36bb23
Comment out more paging code to compile
chrisbanes Oct 28, 2020
241423b
Start migrating Followed to Compose
chrisbanes Oct 28, 2020
044e23b
Update Followed items
chrisbanes Oct 28, 2020
18100c9
[Discover] Add filter panel
chrisbanes Nov 3, 2020
9827a9f
[Discover] Add sorting menu popup
chrisbanes Nov 3, 2020
e696120
Update followed list item styling
chrisbanes Nov 3, 2020
68ef056
Merge branch 'main' into cb/paging3
chrisbanes Nov 3, 2020
100dc9d
[Watched] Migrating watched shows to Compose (#724)
chrisbanes Nov 7, 2020
6522d03
Remove most of the old entry grid code
chrisbanes Nov 7, 2020
07ad97a
Remove all of our databinding + Epoxy code
chrisbanes Nov 7, 2020
b057154
Remove loads of unused code
chrisbanes Nov 7, 2020
b5dda5a
Fix build issue
chrisbanes Nov 8, 2020
c75a43c
Merge pull request #726 from chrisbanes/cb/entrygrids-compose
chrisbanes Nov 8, 2020
2658e7a
Merge branch 'main' into cb/paging3
chrisbanes Nov 10, 2020
0d8736a
Merge branch 'main' into cb/paging3
chrisbanes Nov 11, 2020
2524ecc
Update to Compose 1.0.0-alpha07 final
chrisbanes Nov 12, 2020
cca1f8f
Merge branch 'cb/alpha07' into cb/paging3
chrisbanes Nov 12, 2020
386c7ba
Update to alpha versions of paging + paging-compose
chrisbanes Nov 12, 2020
f800984
Add fade in animation to followed/watched items
chrisbanes Nov 12, 2020
2b5e1b8
[Trending] Convert trending shows grid to Compose (#729)
chrisbanes Nov 23, 2020
8fb0063
Update to Compose SNAPSHOT 6989480
chrisbanes Nov 23, 2020
9fe820a
Remove loads of unused resources
chrisbanes Nov 23, 2020
aaf10b1
Remove unused code from ui-trending
chrisbanes Nov 23, 2020
ade3877
Convert Popular to Compose
chrisbanes Nov 23, 2020
2e7d83a
Migrate Recommended to Compose
chrisbanes Nov 23, 2020
0301c94
Remove unused dependencies
chrisbanes Nov 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@ android {
}

buildFeatures {
// We need to keep this enabled because submodules use it
dataBinding true

viewBinding true
}

Expand Down Expand Up @@ -165,10 +162,7 @@ dependencies {
implementation project(':base')
implementation project(':base-android')
implementation project(':common-ui-view')
implementation project(':common-epoxy')
implementation project(':common-imageloading')
implementation project(':common-databinding')
implementation project(':common-entrygrid')
implementation project(':data')
implementation project(':data-android')
implementation project(':trakt')
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/java/app/tivi/home/MainActivityViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import androidx.hilt.lifecycle.ViewModelInject
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import app.tivi.domain.interactors.UpdateUserDetails
import app.tivi.domain.invoke
import app.tivi.domain.observers.ObserveTraktAuthState
import app.tivi.domain.observers.ObserveUserDetails
import app.tivi.trakt.TraktAuthState
Expand All @@ -47,7 +46,7 @@ class MainActivityViewModel @ViewModelInject constructor(
if (state == TraktAuthState.LOGGED_IN) refreshMe()
}
}
observeTraktAuthState()
observeTraktAuthState(Unit)
}

private fun refreshMe() {
Expand Down
16 changes: 0 additions & 16 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,8 @@
</style>

<style name="Base.Theme.Tivi" parent="Platform.Theme.Tivi">
<item name="actionBarTheme">@style/ThemeOverlay.Tivi.ActionBar</item>

<item name="windowActionModeOverlay">true</item>

<!-- Default widget styles -->
<item name="toolbarStyle">@style/Widget.Tivi.Toolbar</item>
<item name="appBarLayoutStyle">@style/Widget.MaterialComponents.AppBarLayout.Surface</item>

<!-- Type styles -->
<item name="textAppearanceHeadline1">@style/TextAppearance.Tivi.Headline1</item>
<item name="textAppearanceHeadline2">@style/TextAppearance.Tivi.Headline2</item>
Expand Down Expand Up @@ -78,16 +72,6 @@
<item name="android:windowLightStatusBar">@bool/use_light_status_bar</item>
</style>

<style name="Theme.Tivi.ShowDetails" parent="Theme.Tivi.Immerse">
<item name="android:windowLightStatusBar">@bool/use_light_status_bar</item>
</style>

<style name="Theme.Tivi.Settings" />

<style name="ThemeOverlay.Tivi.ActionBar" parent="ThemeOverlay.MaterialComponents.Dark.ActionBar" />

<style name="ThemeOverlay.Tivi.Primary" parent="ThemeOverlay.AppCompat.DayNight.ActionBar">
<item name="android:textColorPrimary">?attr/colorOnPrimary</item>
</style>

</resources>
32 changes: 13 additions & 19 deletions buildSrc/src/main/java/app/tivi/buildsrc/dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,19 @@ object Libs {

object Insetter {
private const val version = "0.3.1"
const val dbx = "dev.chrisbanes:insetter-dbx:$version"
const val ktx = "dev.chrisbanes:insetter-ktx:$version"
}

object Accompanist {
private const val version = "0.3.3.compose-6964664-SNAPSHOT"
private const val version = "0.3.4.compose-6989480-SNAPSHOT"
const val coil = "dev.chrisbanes.accompanist:accompanist-coil:$version"
const val insets = "dev.chrisbanes.accompanist:accompanist-insets:$version"
}

object Mdc {
const val material = "com.google.android.material:material:1.1.0"
const val composeThemeAdapter = "com.github.material-components:material-components-android-compose-theme-adapter:dev_alpha07-SNAPSHOT"
// const val composeThemeAdapter = "com.google.android.material:compose-theme-adapter:1.0.0-alpha05"
// const val composeThemeAdapter = "com.google.android.material:compose-theme-adapter:1.0.0-alpha07"
const val composeThemeAdapter = "com.github.material-components:material-components-android-compose-theme-adapter:dev_alpha08-SNAPSHOT"
}

object Google {
Expand All @@ -82,14 +81,14 @@ object Libs {
}

object Kotlin {
private const val version = "1.4.10"
private const val version = "1.4.20"
const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version"
const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$version"
const val extensions = "org.jetbrains.kotlin:kotlin-android-extensions:$version"
}

object Coroutines {
private const val version = "1.4.0"
private const val version = "1.4.1"
const val core = "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version"
const val android = "org.jetbrains.kotlinx:kotlinx-coroutines-android:$version"
const val test = "org.jetbrains.kotlinx:kotlinx-coroutines-test:$version"
Expand All @@ -100,9 +99,7 @@ object Libs {
const val browser = "androidx.browser:browser:1.0.0"
const val collection = "androidx.collection:collection-ktx:1.1.0"
const val palette = "androidx.palette:palette:1.0.0"
const val recyclerview = "androidx.recyclerview:recyclerview:1.2.0-alpha06"
const val emoji = "androidx.emoji:emoji:1.1.0"
const val swiperefresh = "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"

object Navigation {
private const val version = "2.3.1"
Expand Down Expand Up @@ -133,9 +130,14 @@ object Libs {
const val archCoreTesting = "androidx.arch.core:core-testing:2.1.0"

object Paging {
private const val version = "2.1.2"
// Need to use alpha07 due to:
// - https://issuetracker.google.com/issues/173717820
// - https://issuetracker.google.com/issues/173435602
private const val version = "3.0.0-alpha07"
const val common = "androidx.paging:paging-common-ktx:$version"
const val runtime = "androidx.paging:paging-runtime-ktx:$version"

const val compose = "androidx.paging:paging-compose:1.0.0-alpha02"
}

const val preference = "androidx.preference:preference:1.1.1"
Expand Down Expand Up @@ -166,7 +168,7 @@ object Libs {
}

object Compose {
const val snapshot = "6964664"
const val snapshot = "6989480"
const val version = "1.0.0-SNAPSHOT"

@get:JvmStatic
Expand All @@ -186,7 +188,7 @@ object Libs {

const val animation = "androidx.compose.animation:animation:$version"

const val tooling = "androidx.ui:ui-tooling:$version"
const val tooling = "androidx.compose.ui:ui-tooling:$version"
const val test = "androidx.compose.ui:ui-test-junit4:${version}"
}

Expand Down Expand Up @@ -224,14 +226,6 @@ object Libs {
const val loggingInterceptor = "com.squareup.okhttp3:logging-interceptor:$version"
}

object Epoxy {
private const val version = "4.1.0"
const val epoxy = "com.airbnb.android:epoxy:$version"
const val paging = "com.airbnb.android:epoxy-paging:$version"
const val dataBinding = "com.airbnb.android:epoxy-databinding:$version"
const val processor = "com.airbnb.android:epoxy-processor:$version"
}

object Coil {
private const val version = "1.0.0"
const val coil = "io.coil-kt:coil:$version"
Expand Down
59 changes: 0 additions & 59 deletions common-databinding/build.gradle

This file was deleted.

19 changes: 0 additions & 19 deletions common-databinding/src/main/AndroidManifest.xml

This file was deleted.

57 changes: 0 additions & 57 deletions common-databinding/src/main/java/app/tivi/FragmentWithBinding.kt

This file was deleted.

Loading