diff --git a/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/folders/SuggestedFoldersPaywall.kt b/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/folders/SuggestedFoldersPaywall.kt index a1785851c99..16fb8e324f9 100644 --- a/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/folders/SuggestedFoldersPaywall.kt +++ b/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/folders/SuggestedFoldersPaywall.kt @@ -42,7 +42,11 @@ import au.com.shiftyjelly.pocketcasts.images.R as IR import au.com.shiftyjelly.pocketcasts.localization.R as LR @Composable -fun SuggestedFoldersPaywall(modifier: Modifier = Modifier) { +fun SuggestedFoldersPaywall( + onUseTheseFolders: () -> Unit, + onMaybeLater: () -> Unit, + modifier: Modifier = Modifier, +) { Column( modifier = modifier .wrapContentSize() @@ -97,13 +101,13 @@ fun SuggestedFoldersPaywall(modifier: Modifier = Modifier) { backgroundColor = MaterialTheme.theme.colors.primaryInteractive01, ), includePadding = false, - onClick = { }, + onClick = onUseTheseFolders, ) RowOutlinedButton( text = stringResource(id = LR.string.maybe_later), modifier = Modifier.padding(bottom = 16.dp), - onClick = {}, + onClick = onMaybeLater, includePadding = false, colors = ButtonDefaults.outlinedButtonColors(contentColor = MaterialTheme.theme.colors.primaryIcon01, backgroundColor = Color.Transparent), fontSize = 18.sp, @@ -149,7 +153,10 @@ private fun FolderItem(folderName: String, folderColor: Color, podcastUuids: Lis @Composable private fun SuggestedFoldersPagePreview(@PreviewParameter(ThemePreviewParameterProvider::class) themeType: Theme.ThemeType) { AppTheme(themeType) { - SuggestedFoldersPaywall() + SuggestedFoldersPaywall( + onUseTheseFolders = {}, + onMaybeLater = {}, + ) } } diff --git a/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/folders/SuggestedFoldersPaywallBottomSheet.kt b/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/folders/SuggestedFoldersPaywallBottomSheet.kt index 8e4ef03208b..805e94209d3 100644 --- a/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/folders/SuggestedFoldersPaywallBottomSheet.kt +++ b/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/folders/SuggestedFoldersPaywallBottomSheet.kt @@ -8,6 +8,9 @@ import android.widget.FrameLayout import androidx.core.view.doOnLayout import au.com.shiftyjelly.pocketcasts.compose.AppTheme import au.com.shiftyjelly.pocketcasts.compose.extensions.contentWithoutConsumedInsets +import au.com.shiftyjelly.pocketcasts.settings.onboarding.OnboardingFlow +import au.com.shiftyjelly.pocketcasts.settings.onboarding.OnboardingLauncher +import au.com.shiftyjelly.pocketcasts.settings.onboarding.OnboardingUpgradeSource import au.com.shiftyjelly.pocketcasts.ui.theme.Theme import com.google.android.material.bottomsheet.BottomSheetBehavior import com.google.android.material.bottomsheet.BottomSheetDialog @@ -27,7 +30,17 @@ class SuggestedFoldersPaywallBottomSheet : BottomSheetDialogFragment() { savedInstanceState: Bundle?, ) = contentWithoutConsumedInsets { AppTheme(theme.activeTheme) { - SuggestedFoldersPaywall() + SuggestedFoldersPaywall( + onUseTheseFolders = { + dismiss() + val source = OnboardingUpgradeSource.PROFILE + val onboardingFlow = OnboardingFlow.PlusAccountUpgrade(source) + OnboardingLauncher.openOnboardingFlow(activity, onboardingFlow) + }, + onMaybeLater = { + dismiss() + }, + ) } }