-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into merge/release-7.38-in…
…to-main # Conflicts: # modules/services/repositories/src/main/java/au/com/shiftyjelly/pocketcasts/repositories/sync/SyncManagerImpl.kt
- Loading branch information
Showing
35 changed files
with
1,003 additions
and
576 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,7 +96,7 @@ internal class SyncAccountTest { | |
syncManager.loginWithEmailAndPassword( | ||
email = "[email protected]", | ||
password = "password_signin", | ||
signInSource = SignInSource.Onboarding | ||
signInSource = SignInSource.UserInitiated.Onboarding | ||
) | ||
} | ||
assert(result is LoginResult.Success) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
...java/au/com/shiftyjelly/pocketcasts/account/onboarding/components/SubscriptionTierPill.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package au.com.shiftyjelly.pocketcasts.account.onboarding.components | ||
|
||
import androidx.annotation.DrawableRes | ||
import androidx.annotation.StringRes | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.size | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material.Card | ||
import androidx.compose.material.Icon | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.res.painterResource | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.semantics.semantics | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.compose.ui.unit.dp | ||
import au.com.shiftyjelly.pocketcasts.compose.components.TextH50 | ||
import au.com.shiftyjelly.pocketcasts.images.R | ||
|
||
private val iconSizeInDp = 14.dp | ||
private val pillCornerRadiusInDp = 800.dp | ||
|
||
@Composable | ||
fun SubscriptionTierPill( | ||
@DrawableRes iconRes: Int, | ||
@StringRes shortNameRes: Int, | ||
modifier: Modifier = Modifier, | ||
iconColor: Color = Color.Unspecified, | ||
backgroundColor: Color = Color.Black, | ||
) { | ||
Card( | ||
shape = RoundedCornerShape(pillCornerRadiusInDp), | ||
backgroundColor = backgroundColor, | ||
) { | ||
Row( | ||
modifier = Modifier | ||
.semantics(mergeDescendants = true) {} | ||
.padding(horizontal = 8.dp, vertical = 4.dp), | ||
verticalAlignment = Alignment.CenterVertically, | ||
) { | ||
Icon( | ||
painter = painterResource(iconRes), | ||
contentDescription = null, | ||
modifier = modifier | ||
.size(iconSizeInDp) | ||
.padding(end = 4.dp), | ||
tint = iconColor, | ||
) | ||
TextH50( | ||
text = stringResource(shortNameRes), | ||
color = Color.White, | ||
) | ||
} | ||
} | ||
} | ||
|
||
@Preview | ||
@Composable | ||
private fun SubscriptionTierPillPreview() { | ||
SubscriptionTierPill( | ||
iconRes = R.drawable.ic_patron, | ||
shortNameRes = au.com.shiftyjelly.pocketcasts.localization.R.string.pocket_casts_patron_short, | ||
backgroundColor = Color.Black, | ||
) | ||
} |
Oops, something went wrong.