Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ private fun GameContent(

Box {
LoginBackground()
AnimatedVisibility(state.isNotEnoughPointsDialogVisible) {
AnimatedVisibility(
state.isNotEnoughPointsDialogVisible,
exit = fadeOut(animationSpec = tween(0))
) {
NotEnoughPointsDialog(
onConfirm = interactionListener::dismissNotEnoughPointsDialog,
onDismiss = interactionListener::dismissNotEnoughPointsDialog,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ private fun GuessByPosterContent(

Box {
LoginBackground()
AnimatedVisibility(state.isNotEnoughPointsDialogVisible) {
AnimatedVisibility(
state.isNotEnoughPointsDialogVisible,
exit = fadeOut(animationSpec = tween(0))
) {
NotEnoughPointsDialog(
onConfirm = interactionListener::dismissNotEnoughPointsDialog,
onDismiss = interactionListener::dismissNotEnoughPointsDialog,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ private fun GameScreenContent(

Box {
LoginBackground()
AnimatedVisibility(state.isNotEnoughPointsDialogVisible) {
AnimatedVisibility(
state.isNotEnoughPointsDialogVisible,
exit = fadeOut(animationSpec = tween(0))
) {
NotEnoughPointsDialog(
onConfirm = interactionListener::dismissNotEnoughPointsDialog,
onDismiss = interactionListener::dismissNotEnoughPointsDialog,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ private fun GameContent(

Box {
LoginBackground()
AnimatedVisibility(state.isNotEnoughPointsDialogVisible) {
AnimatedVisibility(
state.isNotEnoughPointsDialogVisible,
exit = fadeOut(animationSpec = tween(0))
) {
NotEnoughPointsDialog(
onConfirm = interactionListener::dismissNotEnoughPointsDialog,
onDismiss = interactionListener::dismissNotEnoughPointsDialog,
Expand Down
7 changes: 6 additions & 1 deletion ui/src/main/java/com/amsterdam/ui/screens/home/HomeScreen.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package com.amsterdam.ui.screens.home

import android.annotation.SuppressLint
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.animateColorAsState
import androidx.compose.animation.animateContentSize
import androidx.compose.animation.core.tween
import androidx.compose.animation.fadeOut
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
Expand Down Expand Up @@ -240,7 +242,10 @@ private fun HomeScreenContent(
}
}
}
AnimatedSectionVisibility(visible = state.moodPickerUiState.openMovieDialog) {
AnimatedVisibility(
visible = state.moodPickerUiState.openMovieDialog,
exit = fadeOut(animationSpec = tween(0))
) {
MovieMoodPickerDialog(
movie = state.moodPickerUiState.selectedMovie,
onClickViewDetails = interactionListener::onClickViewDetails,
Expand Down
11 changes: 6 additions & 5 deletions ui/src/main/java/com/amsterdam/ui/screens/lists/ListsScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ private fun ListsScreenContent(
AnimatedVisibility(
modifier = Modifier,
visible = state.isCreateNewListDialogVisible,
exit = fadeOut(animationSpec = tween(0))
) {
CreateNewListDialog(
isCreateListLoading = state.isCreateListLoading,
Expand All @@ -144,7 +145,7 @@ private fun ListsScreenContent(
exit = fadeOut(tween(animationDuration)),
) {
NotLoggedInContent(
stringResource(com.amsterdam.ui.R.string.lists),
stringResource(R.string.lists),
interactionListener::onNavigateToLoginClicked,
)
}
Expand All @@ -164,7 +165,7 @@ private fun ListsScreenContent(
DefaultAppBar(
modifier = Modifier.padding(horizontal = 16.dp),
showNavigateBackButton = false,
title = stringResource(com.amsterdam.ui.R.string.lists),
title = stringResource(R.string.lists),
lastOption = painterResource(com.amsterdam.designsystem.R.drawable.ic_add),
onLastOptionClicked = interactionListener::onClickAddList,
)
Expand Down Expand Up @@ -195,9 +196,9 @@ private fun ListsScreenContent(
lists.isEmpty() -> {
NoDataContainer(
modifier = Modifier.fillMaxSize(),
title = stringResource(com.amsterdam.ui.R.string.no_list_yet),
description = stringResource(com.amsterdam.ui.R.string.no_list_description),
imageRes = painterResource(id = com.amsterdam.ui.R.drawable.placeholder_no_saved_items),
title = stringResource(R.string.no_list_yet),
description = stringResource(R.string.no_list_description),
imageRes = painterResource(id = R.drawable.placeholder_no_saved_items),
imageAlpha = 0.64f,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ fun MovieContent(
AnimatedVisibility(
modifier = Modifier,
visible = state.isCreateNewListDialogVisible,
exit = fadeOut(animationSpec = tween(0))
) {
CreateNewListDialog(
isCreateListLoading = state.isCreateListLoading,
Expand All @@ -332,6 +333,7 @@ fun MovieContent(
AnimatedVisibility(
modifier = Modifier,
visible = state.isAddToListDialogVisible,
exit = fadeOut(animationSpec = tween(0))
) {
AddToListDialog(
userLists = state.userLists,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import com.amsterdam.designsystem.components.TopAppBar
import com.amsterdam.designsystem.components.Text
import com.amsterdam.designsystem.components.TopAppBar
import com.amsterdam.designsystem.components.divider.HorizontalDivider
import com.amsterdam.designsystem.theme.AflamiTheme
import com.amsterdam.designsystem.theme.AppTheme
Expand Down Expand Up @@ -129,7 +129,8 @@ private fun ScreenDialogs(
interactionListener: ProfileInteractionListener
) {
AnimatedVisibility(
state.settingsState.isSettingsDialogVisible
state.settingsState.isSettingsDialogVisible,
exit = fadeOut(animationSpec = tween(0))
) {
SettingsDialog(
onChangePasswordClick = interactionListener::onClickForgotPassword,
Expand All @@ -140,7 +141,8 @@ private fun ScreenDialogs(
}

AnimatedVisibility(
state.settingsState.isLogoutDialogVisible
state.settingsState.isLogoutDialogVisible,
exit = fadeOut(animationSpec = tween(0))
) {
LogoutDialog(
isLogoutButtonLoading = state.settingsState.isLogoutButtonLoading,
Expand All @@ -150,7 +152,8 @@ private fun ScreenDialogs(
}

AnimatedVisibility(
state.settingsState.isContentRestrictionDialogVisible
state.settingsState.isContentRestrictionDialogVisible,
exit = fadeOut(animationSpec = tween(0))
) {
ContentRestrictionDialog(
isSaveButtonLoading = state.settingsState.isContentRestrictionSaveButtonLoading,
Expand All @@ -163,8 +166,7 @@ private fun ScreenDialogs(

AnimatedVisibility(
state.showLanguageDialog,
enter = fadeIn(tween(2000)),
exit = fadeOut(tween(2000)),
exit = fadeOut(tween(0)),
) {
Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
LanguageDialog(
Expand All @@ -178,8 +180,7 @@ private fun ScreenDialogs(

AnimatedVisibility(
state.showThemeDialog,
enter = fadeIn(tween(2000)),
exit = fadeOut(tween(2000)),
exit = fadeOut(tween(0)),
) {
Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
ThemeDialog(
Expand Down