Skip to content

Commit

Permalink
feat: migrate to compose part 1 (#898)
Browse files Browse the repository at this point in the history
* feat: convert setup screens to compose

* refactor: move all setup related strings from core to setup module

And remove some old fragments

* refactor(tv): move AddServerScreen and LoginScreen to new viewmodels

* feat(tv): add WelcomeScreen

* feat: add ServersScreen

* feat(welcome): move buttons to center

* feat(servers): replace add server button by fab

* refactor: remove DiscoverServerScreen and put discovered servers on AddServerScreen

* refactor(tv): move ServerSelectScreen to ServersViewModel

* refactor: remove ServerSelectFragment

* refactor: move set current server to repository

* refactor: remove leftover discovered server code

* fix(servers): fill remaining space when there are no servers

* refactor: replace icon with image and animate discovered servers

* feat(login): add divider between login and quick connect buttons

* feat(addserver,tv): list discovered servers

* lint: fix servers_no_servers string

* feat: animate quick connect button appearing

* feat(tv): animate quick connect button appearing

* feat(login): display current server

* feat(login): add button to change server

* fix: place top buttons above the column

* refactor: streamline themes between phone and tv

* refactor: streamline screens between phone and tv

* feat(phone): add users screen

* refactor(tv): migrate UsersScreen to new viewmodel

* refactor: remove old users fragment code

* refactor(tv): migrate to native compose navigation

* chore: move all user related strings to setup module

* chore: remove unused NavigationPlayer.kt

* chore: move remove_server_dialog strings to setup module

* refactor: remove tests for now

* refactor: run startup checks in viewmodel

* refactor: remove unused code

* fix: add back uiState to MainViewModel for MainScreen

* feat: hide password by default and add eye to toggle visibility

* fix(phone): hide back button when screen is start destination

* fix(phone): only navigate when current lifecycle state is resumed and increase navigation animation speed

* refactor: simplify when to show back button by checking the previous back stack entry

* refactor: remove extra check in showBack

* refactor: make discoverServers a normal method
  • Loading branch information
jarnedemeulemeester authored Dec 8, 2024
1 parent 1b5f3ad commit c452b6f
Show file tree
Hide file tree
Showing 189 changed files with 5,025 additions and 4,415 deletions.
24 changes: 19 additions & 5 deletions app/phone/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose.compiler)
alias(libs.plugins.kotlin.parcelize)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.ksp)
alias(libs.plugins.androidx.navigation.safeargs)
alias(libs.plugins.hilt)
Expand Down Expand Up @@ -81,6 +83,7 @@ android {
buildFeatures {
buildConfig = true
viewBinding = true
compose = true
}

dependenciesInfo {
Expand All @@ -107,10 +110,22 @@ dependencies {
implementation(projects.preferences)
implementation(projects.player.core)
implementation(projects.player.video)
implementation(projects.setup)
implementation(libs.aboutlibraries.core)
implementation(libs.aboutlibraries)
implementation(libs.androidx.activity)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.appcompat)

// Compose
implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.compose.runtime)
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.tooling.preview)
debugImplementation(libs.androidx.compose.ui.tooling)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.hilt.navigation.compose)

implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.core)
implementation(libs.androidx.hilt.work)
Expand All @@ -125,6 +140,7 @@ dependencies {
implementation(libs.androidx.swiperefreshlayout)
implementation(libs.androidx.work)
implementation(libs.coil)
implementation(libs.coil.compose)
implementation(libs.coil.svg)
implementation(libs.hilt.android)
ksp(libs.hilt.compiler)
Expand All @@ -136,9 +152,7 @@ dependencies {

coreLibraryDesugaring(libs.android.desugar.jdk)

androidTestImplementation(libs.androidx.room.runtime)
androidTestImplementation(libs.junit)
androidTestImplementation(libs.bundles.androidx.test)
androidTestImplementation(libs.hilt.android.testing)
kspTest(libs.hilt.android.compiler)
implementation(libs.kotlinx.serialization.json)
implementation(libs.androidx.hilt.navigation.compose)
implementation(libs.androidx.navigation.compose)
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion app/phone/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<activity
android:name=".MainActivity"
android:exported="true"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustPan">

<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Loading

0 comments on commit c452b6f

Please sign in to comment.