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

Migrate to Google Accompanist #770

Merged
merged 1 commit into from
Mar 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 app/src/main/java/app/tivi/home/Home.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import app.tivi.R
import dev.chrisbanes.accompanist.insets.navigationBarsPadding
import com.google.accompanist.insets.navigationBarsPadding

internal enum class HomeNavigation {
Discover,
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/app/tivi/home/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import app.tivi.databinding.ActivityMainBinding
import app.tivi.extensions.MultipleBackStackNavigation
import app.tivi.extensions.hideSoftInput
import app.tivi.settings.TiviPreferences
import com.google.accompanist.insets.ProvideWindowInsets
import dagger.hilt.android.AndroidEntryPoint
import dev.chrisbanes.accompanist.insets.ProvideWindowInsets
import javax.inject.Inject

@AndroidEntryPoint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import app.tivi.data.entities.TiviShow
import app.tivi.data.entities.TmdbImageEntity
import dev.chrisbanes.accompanist.coil.CoilImage
import com.google.accompanist.coil.CoilImage

@Composable
fun PosterCard(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import app.tivi.data.entities.TraktUser
import dev.chrisbanes.accompanist.coil.CoilImage
import com.google.accompanist.coil.CoilImage

@Composable
fun UserProfileButton(
Expand Down
2 changes: 1 addition & 1 deletion ui-account/src/main/java/app/tivi/account/AccountUi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import app.tivi.common.compose.SimpleFlowRow
import app.tivi.common.compose.foregroundColor
import app.tivi.data.entities.TraktUser
import app.tivi.trakt.TraktAuthState
import dev.chrisbanes.accompanist.coil.CoilImage
import com.google.accompanist.coil.CoilImage
import org.threeten.bp.OffsetDateTime
import org.threeten.bp.ZoneOffset

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ import app.tivi.settings.TiviPreferences
import app.tivi.trakt.LoginTrakt
import app.tivi.trakt.TraktAuthManager
import app.tivi.util.TiviDateFormatter
import com.google.accompanist.insets.LocalWindowInsets
import com.google.accompanist.insets.ViewWindowInsetObserver
import dagger.hilt.android.AndroidEntryPoint
import dev.chrisbanes.accompanist.insets.LocalWindowInsets
import dev.chrisbanes.accompanist.insets.ViewWindowInsetObserver
import javax.inject.Inject

@AndroidEntryPoint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ import app.tivi.data.entities.TmdbImageEntity
import app.tivi.data.entities.TraktUser
import app.tivi.data.resultentities.EntryWithShow
import app.tivi.trakt.TraktAuthState
import dev.chrisbanes.accompanist.insets.statusBarsPadding
import com.google.accompanist.insets.statusBarsPadding

@Composable
fun Discover(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ import app.tivi.common.compose.theme.TiviTheme
import app.tivi.extensions.DefaultNavOptions
import app.tivi.settings.TiviPreferences
import app.tivi.util.TiviDateFormatter
import com.google.accompanist.insets.LocalWindowInsets
import com.google.accompanist.insets.ViewWindowInsetObserver
import dagger.hilt.android.AndroidEntryPoint
import dev.chrisbanes.accompanist.insets.LocalWindowInsets
import dev.chrisbanes.accompanist.insets.ViewWindowInsetObserver
import javax.inject.Inject

@AndroidEntryPoint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ import app.tivi.data.entities.EpisodeWatchEntry
import app.tivi.data.entities.PendingAction
import app.tivi.data.entities.Season
import app.tivi.ui.animations.lerp
import dev.chrisbanes.accompanist.coil.CoilImage
import dev.chrisbanes.accompanist.insets.navigationBarsHeight
import dev.chrisbanes.accompanist.insets.navigationBarsPadding
import dev.chrisbanes.accompanist.insets.statusBarsPadding
import com.google.accompanist.coil.CoilImage
import com.google.accompanist.insets.navigationBarsHeight
import com.google.accompanist.insets.navigationBarsPadding
import com.google.accompanist.insets.statusBarsPadding
import org.threeten.bp.OffsetDateTime
import kotlin.math.absoluteValue
import kotlin.math.hypot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ import app.tivi.common.compose.theme.TiviTheme
import app.tivi.extensions.viewModelProviderFactoryOf
import app.tivi.settings.TiviPreferences
import app.tivi.util.TiviDateFormatter
import com.google.accompanist.insets.LocalWindowInsets
import com.google.accompanist.insets.ViewWindowInsetObserver
import dagger.hilt.android.AndroidEntryPoint
import dev.chrisbanes.accompanist.insets.LocalWindowInsets
import dev.chrisbanes.accompanist.insets.ViewWindowInsetObserver
import javax.inject.Inject

@AndroidEntryPoint
Expand Down
4 changes: 2 additions & 2 deletions ui-followed/src/main/java/app/tivi/home/followed/Followed.kt
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ import app.tivi.data.entities.TiviShow
import app.tivi.data.entities.TraktUser
import app.tivi.data.resultentities.FollowedShowEntryWithShow
import app.tivi.trakt.TraktAuthState
import dev.chrisbanes.accompanist.coil.CoilImage
import dev.chrisbanes.accompanist.insets.statusBarsPadding
import com.google.accompanist.coil.CoilImage
import com.google.accompanist.insets.statusBarsPadding

@Composable
fun Followed(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ import app.tivi.extensions.DefaultNavOptions
import app.tivi.home.HomeTextCreator
import app.tivi.settings.TiviPreferences
import app.tivi.util.TiviDateFormatter
import com.google.accompanist.insets.LocalWindowInsets
import com.google.accompanist.insets.ViewWindowInsetObserver
import dagger.hilt.android.AndroidEntryPoint
import dev.chrisbanes.accompanist.insets.LocalWindowInsets
import dev.chrisbanes.accompanist.insets.ViewWindowInsetObserver
import javax.inject.Inject

@AndroidEntryPoint
Expand Down
2 changes: 1 addition & 1 deletion ui-popular/src/main/java/app/tivi/home/popular/Popular.kt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import app.tivi.common.compose.itemSpacer
import app.tivi.common.compose.itemsInGrid
import app.tivi.common.compose.paging.LazyPagingItems
import app.tivi.data.resultentities.PopularEntryWithShow
import dev.chrisbanes.accompanist.insets.statusBarsPadding
import com.google.accompanist.insets.statusBarsPadding

@Composable
fun Popular(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ import app.tivi.extensions.DefaultNavOptions
import app.tivi.home.HomeTextCreator
import app.tivi.settings.TiviPreferences
import app.tivi.util.TiviDateFormatter
import com.google.accompanist.insets.LocalWindowInsets
import com.google.accompanist.insets.ViewWindowInsetObserver
import dagger.hilt.android.AndroidEntryPoint
import dev.chrisbanes.accompanist.insets.LocalWindowInsets
import dev.chrisbanes.accompanist.insets.ViewWindowInsetObserver
import javax.inject.Inject

@AndroidEntryPoint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import app.tivi.common.compose.itemSpacer
import app.tivi.common.compose.itemsInGrid
import app.tivi.common.compose.paging.LazyPagingItems
import app.tivi.data.resultentities.RecommendedEntryWithShow
import dev.chrisbanes.accompanist.insets.statusBarsPadding
import com.google.accompanist.insets.statusBarsPadding

@Composable
fun Recommended(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ import app.tivi.extensions.DefaultNavOptions
import app.tivi.home.HomeTextCreator
import app.tivi.settings.TiviPreferences
import app.tivi.util.TiviDateFormatter
import com.google.accompanist.insets.LocalWindowInsets
import com.google.accompanist.insets.ViewWindowInsetObserver
import dagger.hilt.android.AndroidEntryPoint
import dev.chrisbanes.accompanist.insets.LocalWindowInsets
import dev.chrisbanes.accompanist.insets.ViewWindowInsetObserver
import javax.inject.Inject

@AndroidEntryPoint
Expand Down
2 changes: 1 addition & 1 deletion ui-search/src/main/java/app/tivi/home/search/Search.kt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import app.tivi.common.compose.SearchTextField
import app.tivi.data.entities.ShowTmdbImage
import app.tivi.data.entities.TiviShow
import app.tivi.data.resultentities.ShowDetailed
import dev.chrisbanes.accompanist.insets.statusBarsPadding
import com.google.accompanist.insets.statusBarsPadding

@OptIn(ExperimentalFoundationApi::class, ExperimentalAnimationApi::class)
@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import app.tivi.common.compose.shouldUseDarkColors
import app.tivi.common.compose.theme.TiviTheme
import app.tivi.extensions.DefaultNavOptions
import app.tivi.settings.TiviPreferences
import com.google.accompanist.insets.LocalWindowInsets
import com.google.accompanist.insets.ViewWindowInsetObserver
import dagger.hilt.android.AndroidEntryPoint
import dev.chrisbanes.accompanist.insets.LocalWindowInsets
import dev.chrisbanes.accompanist.insets.ViewWindowInsetObserver
import javax.inject.Inject

@AndroidEntryPoint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ import app.tivi.data.resultentities.numberAiredToWatch
import app.tivi.data.resultentities.numberToAir
import app.tivi.data.resultentities.numberWatched
import app.tivi.data.views.FollowedShowsWatchStats
import dev.chrisbanes.accompanist.coil.CoilImage
import dev.chrisbanes.accompanist.insets.LocalWindowInsets
import dev.chrisbanes.accompanist.insets.navigationBarsPadding
import dev.chrisbanes.accompanist.insets.statusBarsHeight
import com.google.accompanist.coil.CoilImage
import com.google.accompanist.insets.LocalWindowInsets
import com.google.accompanist.insets.navigationBarsPadding
import com.google.accompanist.insets.statusBarsHeight
import org.threeten.bp.OffsetDateTime

val LocalShowDetailsTextCreator = staticCompositionLocalOf<ShowDetailsTextCreator> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ import app.tivi.extensions.DefaultNavOptions
import app.tivi.extensions.viewModelProviderFactoryOf
import app.tivi.settings.TiviPreferences
import app.tivi.util.TiviDateFormatter
import com.google.accompanist.insets.LocalWindowInsets
import com.google.accompanist.insets.ViewWindowInsetObserver
import dagger.hilt.android.AndroidEntryPoint
import dev.chrisbanes.accompanist.insets.LocalWindowInsets
import dev.chrisbanes.accompanist.insets.ViewWindowInsetObserver
import kotlinx.coroutines.flow.collect
import javax.inject.Inject

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import app.tivi.common.compose.itemSpacer
import app.tivi.common.compose.itemsInGrid
import app.tivi.common.compose.paging.LazyPagingItems
import app.tivi.data.resultentities.TrendingEntryWithShow
import dev.chrisbanes.accompanist.insets.statusBarsPadding
import com.google.accompanist.insets.statusBarsPadding

@Composable
fun Trending(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ import app.tivi.extensions.DefaultNavOptions
import app.tivi.home.HomeTextCreator
import app.tivi.settings.TiviPreferences
import app.tivi.util.TiviDateFormatter
import com.google.accompanist.insets.LocalWindowInsets
import com.google.accompanist.insets.ViewWindowInsetObserver
import dagger.hilt.android.AndroidEntryPoint
import dev.chrisbanes.accompanist.insets.LocalWindowInsets
import dev.chrisbanes.accompanist.insets.ViewWindowInsetObserver
import javax.inject.Inject

@AndroidEntryPoint
Expand Down
4 changes: 2 additions & 2 deletions ui-watched/src/main/java/app/tivi/home/watched/Watched.kt
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ import app.tivi.data.entities.TiviShow
import app.tivi.data.entities.TraktUser
import app.tivi.data.resultentities.WatchedShowEntryWithShow
import app.tivi.trakt.TraktAuthState
import dev.chrisbanes.accompanist.coil.CoilImage
import dev.chrisbanes.accompanist.insets.statusBarsPadding
import com.google.accompanist.coil.CoilImage
import com.google.accompanist.insets.statusBarsPadding
import org.threeten.bp.OffsetDateTime

@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ import app.tivi.extensions.DefaultNavOptions
import app.tivi.home.HomeTextCreator
import app.tivi.settings.TiviPreferences
import app.tivi.util.TiviDateFormatter
import com.google.accompanist.insets.LocalWindowInsets
import com.google.accompanist.insets.ViewWindowInsetObserver
import dagger.hilt.android.AndroidEntryPoint
import dev.chrisbanes.accompanist.insets.LocalWindowInsets
import dev.chrisbanes.accompanist.insets.ViewWindowInsetObserver
import javax.inject.Inject

@AndroidEntryPoint
Expand Down
4 changes: 2 additions & 2 deletions versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ libs.threeTenAbp = "com.jakewharton.threetenabp:threetenabp:1.3.0"

versions.accompanist = "0.6.2"
libs.Accompanist = [
coil: "dev.chrisbanes.accompanist:accompanist-coil:$versions.accompanist",
insets: "dev.chrisbanes.accompanist:accompanist-insets:$versions.accompanist",
coil: "com.google.accompanist:accompanist-coil:$versions.accompanist",
insets: "com.google.accompanist:accompanist-insets:$versions.accompanist",
]

libs.Google = [
Expand Down