Skip to content

Commit

Permalink
Update project
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbel committed May 30, 2023
1 parent 5f5df6a commit 0474ce5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
2 changes: 0 additions & 2 deletions app/src/main/kotlin/org/michaelbel/movies/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import androidx.activity.compose.setContent
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.runtime.getValue
import androidx.compose.ui.unit.LayoutDirection
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.core.view.WindowCompat
import androidx.lifecycle.compose.collectAsStateWithLifecycle
Expand Down Expand Up @@ -36,7 +35,6 @@ internal class MainActivity: AppCompatActivity() {
setContent {
val currentTheme: AppTheme by viewModel.currentTheme.collectAsStateWithLifecycle()
val dynamicColors: Boolean by viewModel.dynamicColors.collectAsStateWithLifecycle()
val layoutDirection: LayoutDirection by viewModel.layoutDirection.collectAsStateWithLifecycle()

val navHostController: NavHostController = rememberNavController().apply {
addOnDestinationChangedListener(viewModel::analyticsTrackDestination)
Expand Down
10 changes: 1 addition & 9 deletions app/src/main/kotlin/org/michaelbel/movies/MainViewModel.kt
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package org.michaelbel.movies

import android.os.Bundle
import androidx.compose.ui.unit.LayoutDirection
import androidx.navigation.NavDestination
import androidx.work.OneTimeWorkRequestBuilder
import androidx.work.WorkManager
import androidx.work.workDataOf
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.stateIn
Expand All @@ -18,6 +16,7 @@ import org.michaelbel.movies.common.viewmodel.BaseViewModel
import org.michaelbel.movies.domain.interactor.settings.SettingsInteractor
import org.michaelbel.movies.domain.workers.AccountUpdateWorker
import org.michaelbel.movies.domain.workers.MoviesDatabaseWorker
import javax.inject.Inject

@HiltViewModel
internal class MainViewModel @Inject constructor(
Expand All @@ -40,13 +39,6 @@ internal class MainViewModel @Inject constructor(
initialValue = false
)

val layoutDirection: StateFlow<LayoutDirection> = settingsInteractor.layoutDirection
.stateIn(
scope = this,
started = SharingStarted.Lazily,
initialValue = LayoutDirection.Ltr
)

init {
fetchRemoteConfig()
prepopulateDatabase()
Expand Down
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
min-sdk = "21"
compile-sdk = "33"
target-sdk = "33"
gradle = "8.0.1"
gradle = "8.0.2"
kotlin = "1.8.21"
kotlin-ksp = "1.8.21-1.0.11"
kotlin-coroutines = "1.7.1"
Expand All @@ -15,7 +15,7 @@ spotless = "6.18.0"
google-services = "4.3.15"
play-services-ads = "22.1.0"
play-services-base = "18.2.0"
firebase-analytics = "21.2.2"
firebase-analytics = "21.3.0"
firebase-appdistribution = "3.2.0"
firebase-config = "21.4.0"
firebase-crashlytics-plugin = "2.9.4"
Expand All @@ -33,7 +33,7 @@ androidx-compose-compiler = "1.4.7"
androidx-compose-material = "1.4.3"
androidx-compose-material3 = "1.1.0"
androidx-appcompat = "1.7.0-alpha02"
androidx-activity = "1.7.1"
androidx-activity = "1.7.2"
androidx-browser = "1.5.0"
androidx-core = "1.10.1"
androidx-core-splashscreen = "1.0.1"
Expand All @@ -42,7 +42,7 @@ androidx-lifecycle = "2.6.1"
androidx-hilt-navigation-compose = "1.0.0"
androidx-hilt-work = "1.0.0"
androidx-navigation = "2.5.3"
androidx-paging = "1.0.0-alpha19"
androidx-paging = "1.0.0-alpha20"
androidx-datastore = "1.0.0"
androidx-startup = "1.1.1"
androidx-room = "2.5.1"
Expand Down

0 comments on commit 0474ce5

Please sign in to comment.