before_code stringlengths 14 465k | reviewer_comment stringlengths 16 64.5k | after_code stringlengths 9 467k | diff_context stringlengths 0 97k | file_path stringlengths 5 226 | comment_line int32 0 26 | language stringclasses 37
values | quality_score float32 0.07 1 | comment_type stringclasses 9
values | comment_length int32 16 64.5k | before_lines int32 1 17.2k | after_lines int32 1 12.1k | is_negative bool 2
classes | pr_title stringlengths 1 308 | pr_number int32 1 299k | repo_name stringclasses 533
values | repo_stars int64 321 419k | repo_language stringclasses 27
values | reviewer_username stringlengths 0 39 | author_username stringlengths 2 39 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
val episode1 = insertPodcastEpisode(index = 0, podcastIndex = 0)
assertEquals(listOf(episode1), awaitItem())
val episode2 = insertPodcastEpisode(index = 1, podcastIndex = 0)
assertEquals(listOf(episode1, episode2), awaitItem())
insertPodcastEpisode(index = ... | No issues found. |
val episode1 = insertPodcastEpisode(index = 0, podcastIndex = 0)
assertEquals(listOf(episode1), awaitItem())
val episode2 = insertPodcastEpisode(index = 1, podcastIndex = 0)
assertEquals(listOf(episode1, episode2), awaitItem())
insertPodcastEpisode(index = ... | @@ -5,6 +5,7 @@ import au.com.shiftyjelly.pocketcasts.models.entity.PlaylistEntity.Companion.SYN
import au.com.shiftyjelly.pocketcasts.models.entity.PodcastEpisode
import au.com.shiftyjelly.pocketcasts.models.type.PlaylistEpisodeSortType
import kotlin.time.Duration
+import kotlin.time.Duration.Companion.seconds
imp... | app/src/androidTest/java/au/com/shiftyjelly/pocketcasts/repositories/playlist/PlaylistManagerManualTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Improve playlist's time left calculation | 4,559 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
lineHeight = 33.5.sp,
color = MaterialTheme.theme.colors.primaryText01,
textAlign = TextAlign.Center,
)
TextP40(
text = stringResource(LR.string.winback_cancel_subscription_header_description),
fontSize = 15.sp,
lineHeight = 21.sp,
... | No issues found. | lineHeight = 33.5.sp,
color = MaterialTheme.theme.colors.primaryText01,
textAlign = TextAlign.Center,
)
TextP40(
text = stringResource(LR.string.winback_cancel_subscription_header_description),
fontSize = 15.sp,
lineHeight = 21.sp,
... | @@ -1,8 +1,7 @@
package au.com.shiftyjelly.pocketcasts.profile.winback
-import androidx.compose.foundation.clickable
+import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.layout.Arrangement
-import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column... | modules/features/profile/src/main/java/au/com/shiftyjelly/pocketcasts/profile/winback/CancelConfirmationPage.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Update Winback UI | 4,561 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
package au.com.shiftyjelly.pocketcasts.repositories.subscription
import au.com.shiftyjelly.pocketcasts.models.type.Membership
import au.com.shiftyjelly.pocketcasts.models.type.Subscription
import au.com.shiftyjelly.pocketcasts.models.type.SubscriptionPlatform
import au.com.shiftyjelly.pocketcasts.preferences.Settings
... | No issues found. | package au.com.shiftyjelly.pocketcasts.repositories.subscription
import au.com.shiftyjelly.pocketcasts.models.type.Membership
import au.com.shiftyjelly.pocketcasts.models.type.Subscription
import au.com.shiftyjelly.pocketcasts.models.type.SubscriptionPlatform
import au.com.shiftyjelly.pocketcasts.preferences.Settings
... | @@ -4,29 +4,37 @@ import au.com.shiftyjelly.pocketcasts.models.type.Membership
import au.com.shiftyjelly.pocketcasts.models.type.Subscription
import au.com.shiftyjelly.pocketcasts.models.type.SubscriptionPlatform
import au.com.shiftyjelly.pocketcasts.preferences.Settings
+import au.com.shiftyjelly.pocketcasts.reposi... | modules/services/repositories/src/main/java/au/com/shiftyjelly/pocketcasts/repositories/subscription/SubscriptionManagerImpl.kt | 0 | Kotlin | 1 | none | 16 | 42 | 42 | true | Minimize fetch subscription status call count | 4,568 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
provideRegion = { region },
),
)
.build()
@Test
fun `add i18n headers`() {
val request = Request.Builder().url(url).build()
server.enqueue(MockResponse())
client.newCall(request).execute()
var serverRequest = server.takeRequest()
... | No issues found. | provideRegion = { region },
),
)
.build()
@Test
fun `add i18n headers`() {
val request = Request.Builder().url(url).build()
server.enqueue(MockResponse())
client.newCall(request).execute()
var serverRequest = server.takeRequest()
... | @@ -0,0 +1,99 @@
+package au.com.shiftyjelly.pocketcasts.servers.interceptors
+
+import au.com.shiftyjelly.pocketcasts.servers.interceptors.InternationalizationInterceptor.Companion.APP_LANGUAGE_HEADER
+import au.com.shiftyjelly.pocketcasts.servers.interceptors.InternationalizationInterceptor.Companion.USER_REGION_HEAD... | modules/services/servers/src/test/kotlin/au/com/shiftyjelly/pocketcasts/servers/interceptors/InternationalizationInterceptorTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Add i18n headers | 4,580 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
@Test
fun `when star button clicked, then episode star state is toggled`() = runTest {
val episode = PodcastEpisode("uuid", publishedDate = Date())
whenever(upNextQueue.currentEpisode).thenReturn(episode)
initViewModel()
shelfSharedViewModel.onStarClick(ShelfItemSource.Shelf)
... | No issues found. |
@Test
fun `when star button clicked, then episode star state is toggled`() = runTest {
val episode = PodcastEpisode("uuid", publishedDate = Date())
whenever(upNextQueue.currentEpisode).thenReturn(episode)
initViewModel()
shelfSharedViewModel.onStarClick(ShelfItemSource.Shelf)
... | @@ -7,6 +7,8 @@ import au.com.shiftyjelly.pocketcasts.analytics.SourceView
import au.com.shiftyjelly.pocketcasts.models.entity.Podcast
import au.com.shiftyjelly.pocketcasts.models.entity.PodcastEpisode
import au.com.shiftyjelly.pocketcasts.models.entity.UserEpisode
+import au.com.shiftyjelly.pocketcasts.models.to.Ch... | modules/features/player/src/test/java/au/com/shiftyjelly/pocketcasts/player/viewmodel/ShelfSharedViewModelTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | fix(sleep): bring terminology in line with iOS app | 4,584 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
isMultiSelectEnabled: Boolean,
isSelected: Boolean,
useEpisodeArtwork: Boolean,
streamByDefault: Boolean,
animateMultiSelection: Boolean,
) {
val wasMultiSelecting = this.isMultiSelectEnabled
val previousUuid = boundEpisode?.uuid
setupInitialState(epis... | No issues found. | isMultiSelectEnabled: Boolean,
isSelected: Boolean,
useEpisodeArtwork: Boolean,
streamByDefault: Boolean,
animateMultiSelection: Boolean,
) {
val wasMultiSelecting = this.isMultiSelectEnabled
val previousUuid = boundEpisode?.uuid
setupInitialState(epis... | @@ -59,6 +59,7 @@ class UserEpisodeViewHolder(
private val episode get() = requireNotNull(boundEpisode)
private var isMultiSelectEnabled = false
private var streamByDefault = false
+ private var isObservingRowData = false
init {
binding.episodeRow.setOnClickListener {
@@ -93,7 +94,7 @@... | modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/podcast/UserEpisodeViewHolder.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Bind observing row data after disposing it | 4,585 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
package au.com.shiftyjelly.pocketcasts.models.type
import androidx.annotation.StringRes
import au.com.shiftyjelly.pocketcasts.models.entity.BaseEpisode
import au.com.shiftyjelly.pocketcasts.localization.R as LR
enum class UpNextSortType(
val analyticsValue: String,
@StringRes val descriptionId: Int,
) : Compa... | No issues found. | package au.com.shiftyjelly.pocketcasts.models.type
import androidx.annotation.StringRes
import au.com.shiftyjelly.pocketcasts.models.entity.BaseEpisode
import au.com.shiftyjelly.pocketcasts.localization.R as LR
enum class UpNextSortType(
val analyticsValue: String,
@StringRes val descriptionId: Int,
) : Compa... | @@ -0,0 +1,33 @@
+package au.com.shiftyjelly.pocketcasts.models.type
+
+import androidx.annotation.StringRes
+import au.com.shiftyjelly.pocketcasts.models.entity.BaseEpisode
+import au.com.shiftyjelly.pocketcasts.localization.R as LR
+
+enum class UpNextSortType(
+ val analyticsValue: String,
+ @StringRes val des... | modules/services/model/src/main/java/au/com/shiftyjelly/pocketcasts/models/type/UpNextSortType.kt | 0 | Kotlin | 1 | none | 16 | 34 | 34 | true | Add Up Next Sorting | 4,586 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
val playlist = playlistDao.getAllPlaylistsIn(listOf(playlistId)).singleOrNull()
assertEquals(limit, playlist?.autodownloadLimit)
}
suspend fun expectName(playlistIndex: Int, name: String) {
val playlistId = "playlist-id-$playlistIndex"
val playlist = playlistDao.getAllPlaylistsI... | No issues found. | val playlist = playlistDao.getAllPlaylistsIn(listOf(playlistId)).singleOrNull()
assertEquals(limit, playlist?.autodownloadLimit)
}
suspend fun expectName(playlistIndex: Int, name: String) {
val playlistId = "playlist-id-$playlistIndex"
val playlist = playlistDao.getAllPlaylistsI... | @@ -267,6 +267,18 @@ class PlaylistManagerDsl : TestWatcher() {
assertEquals(count, actual.size)
}
+ suspend fun expectSynced(playlistIndex: Int) {
+ val playlistId = "playlist-id-$playlistIndex"
+ val playlist = playlistDao.getAllPlaylistsIn(listOf(playlistId)).singleOrNull()
+ ... | app/src/androidTest/java/au/com/shiftyjelly/pocketcasts/repositories/playlist/PlaylistManagerDsl.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Sync playlist show archived setting | 4,589 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
CallOnce {
onReportSuggestionsRender()
}
Box(
modifier = modifier,
) {
AnimatedVisibility(
visible = isLoading,
modifier = Modifier
.padding(vertical = 32.dp)
.align(Alignment.Center),
) {
CircularProgr... | No issues found. |
CallOnce {
onReportSuggestionsRender()
}
Box(
modifier = modifier,
) {
AnimatedVisibility(
visible = isLoading,
modifier = Modifier
.padding(vertical = 32.dp)
.align(Alignment.Center),
) {
CircularProgr... | @@ -22,6 +22,7 @@ import androidx.compose.ui.unit.Velocity
import androidx.compose.ui.unit.dp
import au.com.shiftyjelly.pocketcasts.analytics.SourceView
import au.com.shiftyjelly.pocketcasts.compose.AppThemeWithBackground
+import au.com.shiftyjelly.pocketcasts.compose.CallOnce
import au.com.shiftyjelly.pocketcasts.... | modules/features/search/src/main/java/au/com/shiftyjelly/pocketcasts/search/SearchAutoCompleteResultsPage.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Improved Search] Analytics | 4,593 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
@Test
fun `name A to Z sorts accented characters correctly`() {
val podcasts = listOf(
Podcast(uuid = "1", title = "Álbum"),
Podcast(uuid = "2", title = "Beta"),
Podcast(uuid = "3", title = "Alpha"),
)
val sorted = podcasts.sortedWith(PodcastsSortType... | No issues found. | @Test
fun `name A to Z sorts accented characters correctly`() {
val podcasts = listOf(
Podcast(uuid = "1", title = "Álbum"),
Podcast(uuid = "2", title = "Beta"),
Podcast(uuid = "3", title = "Alpha"),
)
val sorted = podcasts.sortedWith(PodcastsSortType... | @@ -0,0 +1,66 @@
+package au.com.shiftyjelly.pocketcasts.models.type
+
+import au.com.shiftyjelly.pocketcasts.models.entity.Podcast
+import java.util.Date
+import org.junit.Assert.assertEquals
+import org.junit.Test
+
+class PodcastsSortTypeTest {
+ @Test
+ fun `name A to Z sorts accented characters correctly`() ... | modules/services/model/src/test/java/au/com/shiftyjelly/pocketcasts/models/type/PodcastsSortTypeTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Fix podcast title sort with accents | 4,594 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
.orEmpty()
},
folder = folders.find { it.uuid == folderUuid }?.folder,
isSignedInAsPlusOrPatron = signInState.isSignedInAsPlusOrPatron,
)
private fun buildHomeFolderItems(podcasts: List<Podcast>, folders: List<FolderItem>, podcastSortType: PodcastsSortType) = when (podca... | No issues found. | .orEmpty()
},
folder = folders.find { it.uuid == folderUuid }?.folder,
isSignedInAsPlusOrPatron = signInState.isSignedInAsPlusOrPatron,
)
private fun buildHomeFolderItems(podcasts: List<Podcast>, folders: List<FolderItem>, podcastSortType: PodcastsSortType) = when (podca... | @@ -25,25 +25,24 @@ import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject
import dagger.hilt.android.lifecycle.HiltViewModel
-import java.util.Collections
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx... | modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/viewmodel/PodcastsViewModel.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Fix podcasts page drag & drop issues | 4,596 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
package au.com.shiftyjelly.pocketcasts.compose.layout
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.WindowInsetsSides
import androidx.compose.foundation.layout.navigationBars
import androidx.compose.foundation.layout.only
import androidx.compose.runtime.Composable
@g... | No issues found. | package au.com.shiftyjelly.pocketcasts.compose.layout
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.WindowInsetsSides
import androidx.compose.foundation.layout.navigationBars
import androidx.compose.foundation.layout.only
import androidx.compose.runtime.Composable
@g... | @@ -0,0 +1,10 @@
+package au.com.shiftyjelly.pocketcasts.compose.layout
+
+import androidx.compose.foundation.layout.WindowInsets
+import androidx.compose.foundation.layout.WindowInsetsSides
+import androidx.compose.foundation.layout.navigationBars
+import androidx.compose.foundation.layout.only
+import androidx.compos... | modules/services/compose/src/main/java/au/com/shiftyjelly/pocketcasts/compose/layout/WindowInsets.kt | 0 | Kotlin | 1 | none | 16 | 11 | 11 | true | Fix navigation bar padding in folders flow | 4,597 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
private val subscriptionManager: SubscriptionManager,
) : ViewModel() {
private val credentialManager: CredentialManager by lazy { CredentialManager.create(context) }
companion object {
fun showContinueWithGoogleButton(context: Context) = Settings.GOOGLE_SIGN_IN_SERVER_CLIENT_ID.isNotEmpty() &&
... | No issues found. | private val subscriptionManager: SubscriptionManager,
) : ViewModel() {
private val credentialManager: CredentialManager by lazy { CredentialManager.create(context) }
companion object {
fun showContinueWithGoogleButton(context: Context) = Settings.GOOGLE_SIGN_IN_SERVER_CLIENT_ID.isNotEmpty() &&
... | @@ -4,6 +4,7 @@ import android.content.Context
import androidx.credentials.CredentialManager
import androidx.credentials.CustomCredential
import androidx.credentials.GetCredentialRequest
+import androidx.credentials.exceptions.GetCredentialCancellationException
import androidx.lifecycle.ViewModel
import androidx.l... | modules/features/account/src/main/java/au/com/shiftyjelly/pocketcasts/account/viewmodel/GoogleSignInButtonViewModel.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Google login tweaks | 4,598 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
.background(Color(0xFFFF4539))
.fillMaxHeight()
.clickable(
role = Role.Button,
onClick = onDelete,
enabled = draggableState.currentValue != SwipeToDeleteAnchor.Delete,
... | No issues found. | .background(Color(0xFFFF4539))
.fillMaxHeight()
.clickable(
role = Role.Button,
onClick = onDelete,
enabled = draggableState.currentValue != SwipeToDeleteAnchor.Delete,
... | @@ -78,8 +78,10 @@ import au.com.shiftyjelly.pocketcasts.localization.R as LR
@Composable
internal fun PlaylistPreviewRow(
playlist: PlaylistPreview,
- getPreviewMetadataFlow: (String) -> StateFlow<PlaylistPreview.Metadata?>,
- refreshPreviewMetadata: (String) -> Unit,
+ getArtworkUuidsFlow: (String) ->... | modules/features/filters/src/main/java/au/com/shiftyjelly/pocketcasts/playlists/component/PlaylistPreviewRow.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Split artwork and episode count caching | 4,615 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
}
}
}
}
}
@Composable
private fun EpisodeSourceRow(
source: ManualPlaylistEpisodeSource,
modifier: Modifier = Modifier,
) {
when (source) {
is ManualPlaylistFolderSource -> FolderSourceRow(
source = source,
modifier = modifier,
... | No issues found. | }
}
}
}
}
@Composable
private fun EpisodeSourceRow(
source: ManualPlaylistEpisodeSource,
modifier: Modifier = Modifier,
) {
when (source) {
is ManualPlaylistFolderSource -> FolderSourceRow(
source = source,
modifier = modifier,
... | @@ -44,6 +44,7 @@ import au.com.shiftyjelly.pocketcasts.localization.R as LR
@Composable
internal fun AddEpisodeSourcesColumn(
+ title: String,
sources: List<ManualPlaylistEpisodeSource>?,
noContentData: NoContentData,
onClickSource: (ManualPlaylistEpisodeSource) -> Unit,
@@ -62,7 +63,7 @@ interna... | modules/features/filters/src/main/java/au/com/shiftyjelly/pocketcasts/playlists/manual/AddEpisodeSourcesColumn.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Display folder title in the playlist flow | 4,626 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
}
private val credentialManager: CredentialManager by lazy { CredentialManager.create(context) }
private val _state = MutableStateFlow<State>(State.Idle)
val state = _state.asStateFlow()
fun tryCredentialsManager(
activity: Activity,
) {
val isGoogleSignInAvailable = Settings.... | No issues found. | }
private val credentialManager: CredentialManager by lazy { CredentialManager.create(context) }
private val _state = MutableStateFlow<State>(State.Idle)
val state = _state.asStateFlow()
fun tryCredentialsManager(
activity: Activity,
) {
val isGoogleSignInAvailable = Settings.... | @@ -7,6 +7,9 @@ import androidx.credentials.CustomCredential
import androidx.credentials.GetCredentialRequest
import androidx.credentials.GetPasswordOption
import androidx.credentials.PasswordCredential
+import androidx.credentials.exceptions.GetCredentialCancellationException
+import androidx.credentials.exceptions... | wear/src/main/kotlin/au/com/shiftyjelly/pocketcasts/wear/ui/authentication/LoginWithGoogleViewModel.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | WearOS login improvements | 4,631 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.hilt.navigation.compose.hiltViewModel
import au.com.shiftyjelly.pocketcasts.compose.C... | No issues found. | import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.hilt.navigation.compose.hiltViewModel
import au.com.shiftyjelly.pocketcasts.compose.C... | @@ -0,0 +1,59 @@
+@file:Suppress("DEPRECATION")
+
+package au.com.shiftyjelly.pocketcasts.wear.ui.authentication
+
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.collectAsState
+import androidx.compose.runtime.getValue
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.platfo... | wear/src/main/kotlin/au/com/shiftyjelly/pocketcasts/wear/ui/authentication/LegacyLoginWithGoogleScreen.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Fallback to legacy Google signIn on WearOS 34 and below | 4,633 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
fun searchNotAddedEpisodes() = dsl.test {
insertManualPlaylist(index = 0)
manager.notAddedManualEpisodesFlow("playlist-id-0", "podcast-id-0", searchTerm = "abc").test {
skipItems(1)
val episode1 = insertPodcastEpisode(index = 0, podcastIndex = 0) { it.copy(title = "episode a... | No issues found. | fun searchNotAddedEpisodes() = dsl.test {
insertManualPlaylist(index = 0)
manager.notAddedManualEpisodesFlow("playlist-id-0", "podcast-id-0", searchTerm = "abc").test {
skipItems(1)
val episode1 = insertPodcastEpisode(index = 0, podcastIndex = 0) { it.copy(title = "episode a... | @@ -175,26 +175,17 @@ class PlaylistManagerManualTest {
insertPodcast(index = 1) { it.copy(title = "Podcast def") }
insertPodcastEpisode(index = 0, podcastIndex = 0) { it.copy(title = "Episode ABC") }
insertPodcastEpisode(index = 1, podcastIndex = 0) { it.copy(title = "Episode def") }
- ... | app/src/androidTest/java/au/com/shiftyjelly/pocketcasts/repositories/playlist/PlaylistManagerManualTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Add search field to podcasts Smart Rule | 4,634 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
windowInsets = WindowInsets.statusBars,
)
Spacer(
modifier = Modifier.height(16.dp),
)
PlaylistNameInputField(
state = state,
onClickImeAction = {
focusManager.clearFocus()
},
modifier = Modifier.padd... | No issues found. | windowInsets = WindowInsets.statusBars,
)
Spacer(
modifier = Modifier.height(16.dp),
)
PlaylistNameInputField(
state = state,
onClickImeAction = {
focusManager.clearFocus()
},
modifier = Modifier.padd... | @@ -6,7 +6,6 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxSize
-import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.la... | modules/features/filters/src/main/java/au/com/shiftyjelly/pocketcasts/playlists/SettingsPage.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Add delete playlist option | 4,635 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
autoCompleteItem.copy(isSubscribed = subscribedUuids.contains(autoCompleteItem.uuid))
}
else -> autoCompleteItem
}
}
val localResults = if (onlyRemote) {
emptyList()
... | No issues found. | autoCompleteItem.copy(isSubscribed = subscribedUuids.contains(autoCompleteItem.uuid))
}
else -> autoCompleteItem
}
}
val localResults = if (onlyRemote) {
emptyList()
... | @@ -31,8 +31,8 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.combine
+import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.emptyFlow
-import kotlinx.coroutines.flow.first
i... | modules/features/search/src/main/java/au/com/shiftyjelly/pocketcasts/search/SearchHandler.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Improved Search] Search results improvements | 4,637 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
import androidx.room.Query
import androidx.room.Transaction
import au.com.shiftyjelly.pocketcasts.models.entity.BaseEpisode
import au.com.shiftyjelly.pocketcasts.models.entity.UpNextChange
@Dao
abstract class UpNextChangeDao {
@Query("SELECT * FROM up_next_changes")
abstract fun findAllBlocking(): List<UpNext... | No issues found. | import androidx.room.Query
import androidx.room.Transaction
import au.com.shiftyjelly.pocketcasts.models.entity.BaseEpisode
import au.com.shiftyjelly.pocketcasts.models.entity.UpNextChange
@Dao
abstract class UpNextChangeDao {
@Query("SELECT * FROM up_next_changes")
abstract fun findAllBlocking(): List<UpNext... | @@ -4,6 +4,7 @@ import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
+import androidx.room.Transaction
import au.com.shiftyjelly.pocketcasts.models.entity.BaseEpisode
import au.com.shiftyjelly.pocketcasts.models.entity.UpNextChange
@@ -48,7 +49,8... | modules/services/model/src/main/java/au/com/shiftyjelly/pocketcasts/models/db/dao/UpNextChangeDao.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Improve performance of bulk Up Next operations | 4,641 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
package au.com.shiftyjelly.pocketcasts.repositories.endofyear
import java.time.Year
interface EndOfYearManager {
suspend fun isEligibleForEndOfYear(year: Year = YEAR_TO_SYNC): Boolean
suspend fun getStats(year: Year = YEAR_TO_SYNC): EndOfYearStats
suspend fun getPlayedEpisodeCount(year: Year = YEAR_TO_SYN... | No issues found. | package au.com.shiftyjelly.pocketcasts.repositories.endofyear
import java.time.Year
interface EndOfYearManager {
suspend fun isEligibleForEndOfYear(year: Year = YEAR_TO_SYNC): Boolean
suspend fun getStats(year: Year = YEAR_TO_SYNC): EndOfYearStats
suspend fun getPlayedEpisodeCount(year: Year = YEAR_TO_SYN... | @@ -8,6 +8,6 @@ interface EndOfYearManager {
suspend fun getPlayedEpisodeCount(year: Year = YEAR_TO_SYNC): Int
companion object {
- val YEAR_TO_SYNC = Year.of(2024)
+ val YEAR_TO_SYNC = Year.of(2025)
}
} | modules/services/repositories/src/main/java/au/com/shiftyjelly/pocketcasts/repositories/endofyear/EndOfYearManager.kt | 0 | Kotlin | 1 | none | 16 | 14 | 14 | true | Playback feature flag | 4,650 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
package au.com.shiftyjelly.pocketcasts.servers.search
import retrofit2.http.GET
import retrofit2.http.Query
interface AutoCompleteSearchService {
@GET("/autocomplete/search")
suspend fun autoCompleteSearch(
@Query("q") query: String,
@Query("termsLimit") termsLimit: Int?,
@Query("podca... | No issues found. | package au.com.shiftyjelly.pocketcasts.servers.search
import retrofit2.http.GET
import retrofit2.http.Query
interface AutoCompleteSearchService {
@GET("/autocomplete/search")
suspend fun autoCompleteSearch(
@Query("q") query: String,
@Query("termsLimit") termsLimit: Int?,
@Query("podca... | @@ -7,7 +7,7 @@ interface AutoCompleteSearchService {
@GET("/autocomplete/search")
suspend fun autoCompleteSearch(
@Query("q") query: String,
- @Query("termsLimit") termsLimit: Int,
- @Query("podcastsLimit") podcastsLimit: Int,
+ @Query("termsLimit") termsLimit: Int?,
+ @Q... | modules/services/servers/src/main/java/au/com/shiftyjelly/pocketcasts/servers/search/AutoCompleteSearchService.kt | 0 | Kotlin | 1 | none | 16 | 14 | 14 | true | [Improved Search] Remove limits from autocomplete query | 4,665 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import au.com.shiftyjelly.pocketcasts.compose.bottomsheet.BottomSheetContentState
... | No issues found. | import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import au.com.shiftyjelly.pocketcasts.compose.bottomsheet.BottomSheetContentState
... | @@ -1,30 +1,25 @@
package au.com.shiftyjelly.pocketcasts.endofyear.ui
import android.view.ViewGroup
-import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.Image
-import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
-import androidx.co... | modules/features/endofyear/src/main/java/au/com/shiftyjelly/pocketcasts/endofyear/ui/EndOfYearLaunchBottomSheet.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Update Playback modal for 2025 | 4,668 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
import au.com.shiftyjelly.pocketcasts.models.type.Subscription
import au.com.shiftyjelly.pocketcasts.settings.onboarding.OnboardingFlow
import au.com.shiftyjelly.pocketcasts.utils.Network
import au.com.shiftyjelly.pocketcasts.images.R as IR
import au.com.shiftyjelly.pocketcasts.localization.R as LR
/**
* Let the user... | No issues found. | import au.com.shiftyjelly.pocketcasts.models.type.Subscription
import au.com.shiftyjelly.pocketcasts.settings.onboarding.OnboardingFlow
import au.com.shiftyjelly.pocketcasts.utils.Network
import au.com.shiftyjelly.pocketcasts.images.R as IR
import au.com.shiftyjelly.pocketcasts.localization.R as LR
/**
* Let the user... | @@ -1,6 +1,9 @@
package au.com.shiftyjelly.pocketcasts.account.onboarding.components
import android.widget.Toast
+import androidx.activity.compose.LocalActivity
+import androidx.activity.compose.rememberLauncherForActivityResult
+import androidx.activity.result.contract.ActivityResultContracts
import androidx.comp... | modules/features/account/src/main/java/au/com/shiftyjelly/pocketcasts/account/onboarding/components/ContinueWithGoogleButton.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Bring back legacy Google login | 4,669 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
)
}
else -> Unit
}
if (loading) {
Box(
contentAlignment = Alignment.Center,
modifier = Modifier
.padding(top = 16.dp)
.fillMaxWidth(),
) {
CircularProg... | No issues found. | )
}
else -> Unit
}
if (loading) {
Box(
contentAlignment = Alignment.Center,
modifier = Modifier
.padding(top = 16.dp)
.fillMaxWidth(),
) {
CircularProg... | @@ -15,8 +15,6 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
-import androidx.compose.ui.graphics.Brush
-import androidx.compose.ui.graphics.Color
import androidx.compose.ui.input.nestedscroll.NestedScr... | modules/features/search/src/main/java/au/com/shiftyjelly/pocketcasts/search/ImprovedSearchResultsPage.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Improved Search] Cherry pick changes from master to be included in beta | 4,673 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
pagerState: PagerState,
controller: StoryCaptureController,
onChangeStory: (Boolean) -> Unit,
onShareStory: (Story, File) -> Unit,
onHoldStory: () -> Unit,
onReleaseStory: () -> Unit,
onLearnAboutRatings: () -> Unit,
onClickUpsell: () -> Unit,
onRestartPlayback: () -> Unit,
) {
v... | No issues found. | pagerState: PagerState,
controller: StoryCaptureController,
onChangeStory: (Boolean) -> Unit,
onShareStory: (Story, File) -> Unit,
onHoldStory: () -> Unit,
onReleaseStory: () -> Unit,
onLearnAboutRatings: () -> Unit,
onClickUpsell: () -> Unit,
onRestartPlayback: () -> Unit,
) {
v... | @@ -39,6 +39,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.input.pointer.pointerInput
+import androidx.compose.ui.layout.onGloballyPositioned
import androidx.compose.ui.platform.LocalContext
import andro... | modules/features/endofyear/src/main/java/au/com/shiftyjelly/pocketcasts/endofyear/ui/StoriesPage.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Playback Completion Rate Story | 4,674 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
?.toPodcastEpisodes()
.orEmpty()
if (episodes.isNotEmpty()) {
episodeManager.unarchiveAllInListBlocking(episodes)
}
}
}
fun deletePlaylist() {
viewModelScope.launch(NonCancellable) {
delay(300) // Some small de... | No issues found. | ?.toPodcastEpisodes()
.orEmpty()
if (episodes.isNotEmpty()) {
episodeManager.unarchiveAllInListBlocking(episodes)
}
}
}
fun deletePlaylist() {
viewModelScope.launch(NonCancellable) {
delay(300) // Some small de... | @@ -257,7 +257,10 @@ class PlaylistViewModel @AssistedInject constructor(
}
fun trackFilterShown() {
- analyticsTracker.track(AnalyticsEvent.FILTER_SHOWN)
+ analyticsTracker.track(
+ AnalyticsEvent.FILTER_SHOWN,
+ mapOf("filter_type" to playlistType.analyticsValue),
+ ... | modules/features/filters/src/main/java/au/com/shiftyjelly/pocketcasts/playlists/PlaylistViewModel.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Add playlist "Play all" analytics | 4,679 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
getCanScrollBackward = { listState.canScrollBackward }
AppThemeWithBackground(theme.activeTheme) {
PlaylistsPage(
uiState = uiState,
listState = listState,
getArtworkUuidsFlow = viewModel::getArtworkUuidsFlow,
getEpisodeCountF... | No issues found. |
getCanScrollBackward = { listState.canScrollBackward }
AppThemeWithBackground(theme.activeTheme) {
PlaylistsPage(
uiState = uiState,
listState = listState,
getArtworkUuidsFlow = viewModel::getArtworkUuidsFlow,
getEpisodeCountF... | @@ -3,6 +3,8 @@ package au.com.shiftyjelly.pocketcasts.playlists
import android.os.Bundle
import android.view.LayoutInflater
import android.view.ViewGroup
+import androidx.compose.foundation.gestures.AnchoredDraggableState
+import androidx.compose.foundation.gestures.animateTo
import androidx.compose.foundation.laz... | modules/features/filters/src/main/java/au/com/shiftyjelly/pocketcasts/playlists/PlaylistsFragment.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Update playlist deletion logic | 4,681 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
}
}
}
@Composable
private fun EpisodeSourceRow(
source: ManualPlaylistEpisodeSource,
modifier: Modifier = Modifier,
) {
when (source) {
is ManualPlaylistFolderSource -> FolderSourceRow(
source = source,
modifier = modifier,
)
is ManualPlaylistPod... | No issues found. | }
}
}
@Composable
private fun EpisodeSourceRow(
source: ManualPlaylistEpisodeSource,
modifier: Modifier = Modifier,
) {
when (source) {
is ManualPlaylistFolderSource -> FolderSourceRow(
source = source,
modifier = modifier,
)
is ManualPlaylistPod... | @@ -11,6 +11,7 @@ import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
+import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.foundation... | modules/features/filters/src/main/java/au/com/shiftyjelly/pocketcasts/playlists/manual/AddEpisodeSourcesColumn.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Keep episode selection scroll position | 4,682 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
)
}
@Composable
internal fun OutlinedEoyButton(
text: String,
onClick: () -> Unit,
modifier: Modifier = Modifier,
) {
RowOutlinedButton(
text = text,
fontSize = 18.nonScaledSp,
colors = ButtonDefaults.outlinedButtonColors(
backgroundColor = Color.Transparent,
... | No issues found. | )
}
@Composable
internal fun OutlinedEoyButton(
text: String,
onClick: () -> Unit,
modifier: Modifier = Modifier,
) {
RowOutlinedButton(
text = text,
fontSize = 18.nonScaledSp,
colors = ButtonDefaults.outlinedButtonColors(
backgroundColor = Color.Transparent,
... | @@ -54,13 +54,13 @@ internal val Story.backgroundColor
is Story.NumberOfShows -> Color(0xFFEFECAD)
is Story.TopShow -> Color(0xFFEDB0F3)
is Story.TopShows -> Color(0xFFE0EFAD)
- is Story.Ratings -> Color(0xFFEFECAD)
+ is Story.Ratings -> Color(0xFFA22828)
is Story.Total... | modules/features/endofyear/src/main/java/au/com/shiftyjelly/pocketcasts/endofyear/ui/Common.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Playback] Thank you stroy | 4,684 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
contentDescription = stringResource(LR.string.end_of_year_share_story),
backgroundColor = Color.Black.copy(alpha = 0.44f),
iconColor = Color.White,
onClick = {
scope.launch {
val file = controller.capture(story)
if (file != null) {
... | No issues found. | contentDescription = stringResource(LR.string.end_of_year_share_story),
backgroundColor = Color.Black.copy(alpha = 0.44f),
iconColor = Color.White,
onClick = {
scope.launch {
val file = controller.capture(story)
if (file != null) {
... | @@ -52,7 +52,7 @@ internal val Story.backgroundColor
get() = when (this) {
is Story.Cover -> Color(0xFF27486A)
is Story.NumberOfShows -> Color(0xFFEFECAD)
- is Story.TopShow -> Color(0xFFEDB0F3)
+ is Story.TopShow -> Color(0xFF17423B)
is Story.TopShows -> Color(0xFFE0EFAD)
... | modules/features/endofyear/src/main/java/au/com/shiftyjelly/pocketcasts/endofyear/ui/Common.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Playback] Top show story | 4,686 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
.then(modifier),
) {
ThemedTopAppBar(
title = {
Crossfade(toolbarTitle) { title ->
Text(
text = title,
color = colors.toolbarColors.titleComposeColor,
overflow = TextOverflow.E... | No issues found. | .then(modifier),
) {
ThemedTopAppBar(
title = {
Crossfade(toolbarTitle) { title ->
Text(
text = title,
color = colors.toolbarColors.titleComposeColor,
overflow = TextOverflow.E... | @@ -14,6 +14,7 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.input.Keybo... | modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/podcast/PodcastSettingsPage.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Fix podcast settings colors | 4,687 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
modifier = Modifier
.padding(top = 8.dp)
.background(MaterialTheme.theme.colors.primaryUi05, CircleShape)
.size(56.dp, 4.dp),
)
TextH30(
text = stringResource(LR.string.app_rating_title),
... | No issues found. | modifier = Modifier
.padding(top = 8.dp)
.background(MaterialTheme.theme.colors.primaryUi05, CircleShape)
.size(56.dp, 4.dp),
)
TextH30(
text = stringResource(LR.string.app_rating_title),
... | @@ -0,0 +1,161 @@
+package au.com.shiftyjelly.pocketcasts.appreview
+
+import androidx.compose.foundation.background
+import androidx.compose.foundation.clickable
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Column
+impo... | modules/features/appreview/src/main/kotlin/au/com/shiftyjelly/pocketcasts/appreview/AppReviewPage.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Add app review prompt UI | 4,688 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.ksp)
alias(libs.plugins.hilt)
}
android {
namespace = "au.com.shiftyjelly.pocketcasts.appreview"
buildFeatures {
buildConfig = true
viewBi... | No issues found. | plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.ksp)
alias(libs.plugins.hilt)
}
android {
namespace = "au.com.shiftyjelly.pocketcasts.appreview"
buildFeatures {
buildConfig = true
viewBi... | @@ -21,6 +21,7 @@ dependencies {
api(libs.dagger.hilt.android)
+ api(projects.modules.features.settings)
api(projects.modules.services.model)
api(projects.modules.services.compose)
api(projects.modules.services.views) | modules/features/appreview/build.gradle.kts | 0 | Kotlin | 1 | none | 16 | 38 | 38 | true | Navigate to help pages from the review prompt | 4,689 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
}
}
@Test
fun `winback offer with blank redeem code`() = runTest {
wheneverBlocking { referralManager.getWinbackResponse() } doReturn createSuccessReferralResult(code = "")
viewModel.loadWinbackData()
viewModel.uiState.test {
assertNull(awaitItem().winbackOffer... | No issues found. | }
}
@Test
fun `winback offer with blank redeem code`() = runTest {
wheneverBlocking { referralManager.getWinbackResponse() } doReturn createSuccessReferralResult(code = "")
viewModel.loadWinbackData()
viewModel.uiState.test {
assertNull(awaitItem().winbackOffer... | @@ -6,7 +6,6 @@ import app.cash.turbine.test
import au.com.shiftyjelly.pocketcasts.analytics.AnalyticsEvent
import au.com.shiftyjelly.pocketcasts.analytics.AnalyticsTracker
import au.com.shiftyjelly.pocketcasts.analytics.Tracker
-import au.com.shiftyjelly.pocketcasts.analytics.TrackerType
import au.com.shiftyjelly.... | modules/features/profile/src/test/kotlin/au/com/shiftyjelly/pocketcasts/profile/winback/WinbackViewModelTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Add analytics listener | 4,693 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
manager.showPromptSignal.test {
episodesCompletedSetting.set(List(1) { clock.instant() })
expectNoEvents()
episodesCompletedSetting.set(List(2) { clock.instant() })
expectNoEvents()
episodesCompletedSetting.set(List(3) { clock.instant() })
... | No issues found. | manager.showPromptSignal.test {
episodesCompletedSetting.set(List(1) { clock.instant() })
expectNoEvents()
episodesCompletedSetting.set(List(2) { clock.instant() })
expectNoEvents()
episodesCompletedSetting.set(List(3) { clock.instant() })
... | @@ -0,0 +1,135 @@
+package au.com.shiftyjelly.pocketcasts.repositories.appreview
+
+import app.cash.turbine.test
+import au.com.shiftyjelly.pocketcasts.preferences.ReadWriteSetting
+import au.com.shiftyjelly.pocketcasts.preferences.Settings
+import au.com.shiftyjelly.pocketcasts.preferences.model.AppReviewReason
+impor... | modules/services/repositories/src/test/java/au/com/shiftyjelly/pocketcasts/repositories/appreview/AppReviewManagerTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Add initial logic for app reviews | 4,694 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
fun `dispatch plus upgraded reason`() = runTest {
testInLoop {
plusUpgradedSetting.set(clock.instant())
expectNoSignal()
clock += 2.days
expectNoSignal()
clock += 1.seconds
val signal = awaitSignalAndConsume()
assertEquals... | No issues found. | fun `dispatch plus upgraded reason`() = runTest {
testInLoop {
plusUpgradedSetting.set(clock.instant())
expectNoSignal()
clock += 2.days
expectNoSignal()
clock += 1.seconds
val signal = awaitSignalAndConsume()
assertEquals... | @@ -1,17 +1,24 @@
package au.com.shiftyjelly.pocketcasts.repositories.appreview
+import app.cash.turbine.TurbineTestContext
import app.cash.turbine.test
import au.com.shiftyjelly.pocketcasts.preferences.ReadWriteSetting
import au.com.shiftyjelly.pocketcasts.preferences.Settings
import au.com.shiftyjelly.pocketca... | modules/services/repositories/src/test/java/au/com/shiftyjelly/pocketcasts/repositories/appreview/AppReviewManagerTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Add all app review triggers | 4,696 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
}
updatePlaybackState(state)
viewModel.lastPlaybackState = state
}
}
}
val upNextQueueChanges = playbackManager.upNextQueue.getChangesFlowWithLiveCurrentEpisode(episodeManager, podcastManager)
val artworkC... | No issues found. | }
updatePlaybackState(state)
viewModel.lastPlaybackState = state
}
}
}
val upNextQueueChanges = playbackManager.upNextQueue.getChangesFlowWithLiveCurrentEpisode(episodeManager, podcastManager)
val artworkC... | @@ -32,6 +32,7 @@ import androidx.core.view.isVisible
import androidx.core.view.updateLayoutParams
import androidx.core.view.updatePadding
import androidx.dynamicanimation.animation.DynamicAnimation.TRANSLATION_Y
+import androidx.fragment.app.DialogFragment
import androidx.fragment.app.Fragment
import androidx.fra... | app/src/main/java/au/com/shiftyjelly/pocketcasts/ui/MainActivity.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Display review prompt only when a root page is shown | 4,703 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.ksp)
alias(libs.plugins.hilt)
}
android {
namespace = "au.com.shiftyjelly.pocketcasts.appreview"
buildFeatures {
buildConfig = true
viewBi... | No issues found. | plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.ksp)
alias(libs.plugins.hilt)
}
android {
namespace = "au.com.shiftyjelly.pocketcasts.appreview"
buildFeatures {
buildConfig = true
viewBi... | @@ -33,5 +33,6 @@ dependencies {
implementation(libs.compose.ui.tooling.preview)
implementation(libs.fragment.compose)
implementation(libs.fragment.ktx)
+ implementation(libs.lottie.compose)
implementation(libs.timber)
} | modules/features/appreview/build.gradle.kts | 0 | Kotlin | 1 | none | 16 | 39 | 39 | true | Add animation to the review prompt | 4,704 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
}
@Test
fun `dispatch custom theme set reason`() = runTest {
testInLoop {
themeChangedSetting.set(clock.instant())
val signal = awaitSignalAndConsume()
assertEquals(AppReviewReason.CustomThemeSet, signal.reason)
}
}
@Test
fun `dispatch referr... | No issues found. | }
@Test
fun `dispatch custom theme set reason`() = runTest {
testInLoop {
themeChangedSetting.set(clock.instant())
val signal = awaitSignalAndConsume()
assertEquals(AppReviewReason.CustomThemeSet, signal.reason)
}
}
@Test
fun `dispatch referr... | @@ -41,13 +41,18 @@ class AppReviewManagerTest {
private val submittedReasonsSetting = TestSetting(emptyList<AppReviewReason>())
private val lastPromptSetting = TestSetting<Instant?>(null)
+ private val lastDeclineTimestampsSetting = TestSetting(emptyList<Instant>())
+ private val errorSessionsSetting... | modules/services/repositories/src/test/java/au/com/shiftyjelly/pocketcasts/repositories/appreview/AppReviewManagerTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Add app review policies | 4,706 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
add(
FolderLocation(
label = context.getString(LR.string.settings_storage_custom_folder),
filePath = Settings.STORAGE_ON_CUSTOM_FOLDER,
analyticsLabel = "custom",
),
)
... | No issues found. | add(
FolderLocation(
label = context.getString(LR.string.settings_storage_custom_folder),
filePath = Settings.STORAGE_ON_CUSTOM_FOLDER,
analyticsLabel = "custom",
),
)
... | @@ -9,12 +9,15 @@ import androidx.lifecycle.viewModelScope
import au.com.shiftyjelly.pocketcasts.analytics.AnalyticsEvent
import au.com.shiftyjelly.pocketcasts.analytics.AnalyticsTracker
import au.com.shiftyjelly.pocketcasts.compose.components.DialogButtonProperties
+import au.com.shiftyjelly.pocketcasts.models.db.d... | modules/features/settings/src/main/java/au/com/shiftyjelly/pocketcasts/settings/viewmodel/StorageSettingsViewModel.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Add episode titles normalization setting | 4,710 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
}
@Test
fun `dispatch custom theme set reason`() = runTest {
testInLoop {
themeChangedSetting.set(clock.instant())
val signal = awaitSignalAndConsume()
assertEquals(AppReviewReason.CustomThemeSet, signal.reason)
}
}
@Test
fun `dispatch referr... | No issues found. | }
@Test
fun `dispatch custom theme set reason`() = runTest {
testInLoop {
themeChangedSetting.set(clock.instant())
val signal = awaitSignalAndConsume()
assertEquals(AppReviewReason.CustomThemeSet, signal.reason)
}
}
@Test
fun `dispatch referr... | @@ -6,6 +6,8 @@ import au.com.shiftyjelly.pocketcasts.preferences.ReadWriteSetting
import au.com.shiftyjelly.pocketcasts.preferences.Settings
import au.com.shiftyjelly.pocketcasts.preferences.model.AppReviewReason
import au.com.shiftyjelly.pocketcasts.sharedtest.MutableClock
+import com.google.android.play.core.ktx.... | modules/services/repositories/src/test/java/au/com/shiftyjelly/pocketcasts/repositories/appreview/AppReviewManagerTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Add Google review integration | 4,722 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
@Test
fun `dispatch playback shared reason`() = runTest {
testInLoop {
playbackSharedSetting.set(clock.instant())
val signal = awaitSignalAndConsume()
assertEquals(AppReviewReason.PlaybackShared, signal.reason)
}
}
@Test
fun `do not dispatch the s... | No issues found. | @Test
fun `dispatch playback shared reason`() = runTest {
testInLoop {
playbackSharedSetting.set(clock.instant())
val signal = awaitSignalAndConsume()
assertEquals(AppReviewReason.PlaybackShared, signal.reason)
}
}
@Test
fun `do not dispatch the s... | @@ -213,8 +213,6 @@ class AppReviewManagerTest {
@Test
fun `dispatch event only if the prompt was not triggered in 30 days`() = runTest {
- backgroundScope.launch { manager.monitorAppReviewReasons() }
-
testInLoop {
val trigger = launch {
manager.triggerPrompt(
... | modules/services/repositories/src/test/java/au/com/shiftyjelly/pocketcasts/repositories/appreview/AppReviewManagerTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Clear undispatched app review reasons | 4,723 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
)
private var userReviewResponse: UserReviewResponse? = null
private val args get() = requireArguments().requireParcelable<Args>(NEW_INSTANCE_KEY)
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?,
) = content {
... | No issues found. | )
private var userReviewResponse: UserReviewResponse? = null
private val args get() = requireArguments().requireParcelable<Args>(NEW_INSTANCE_KEY)
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?,
) = content {
... | @@ -15,21 +15,29 @@ import androidx.core.os.bundleOf
import androidx.fragment.app.viewModels
import androidx.fragment.compose.content
import androidx.lifecycle.lifecycleScope
+import au.com.shiftyjelly.pocketcasts.compose.CallOnce
import au.com.shiftyjelly.pocketcasts.preferences.model.AppReviewReason
import au.co... | modules/features/appreview/src/main/kotlin/au/com/shiftyjelly/pocketcasts/appreview/AppReviewDialogFragment.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Add app ratings analytics | 4,724 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
val file = controller.capture(story)
if (file != null) {
onShare(file)
}
}
},
modifier = modifier.padding(4.dp),
)
}
@Composable
internal fun OutlinedEoyButton(
text: String,
onClick: () -> Unit,
modifier: M... | No issues found. | val file = controller.capture(story)
if (file != null) {
onShare(file)
}
}
},
modifier = modifier.padding(4.dp),
)
}
@Composable
internal fun OutlinedEoyButton(
text: String,
onClick: () -> Unit,
modifier: M... | @@ -56,7 +56,7 @@ internal val Story.backgroundColor
is Story.TopShows -> Color(0xFF96BCD1)
is Story.Ratings -> Color(0xFFA22828)
is Story.TotalTime -> Color(0xFF27486A)
- is Story.LongestEpisode -> Color(0xFFE0EFAD)
+ is Story.LongestEpisode -> Color(0xFF17423B)
is Sto... | modules/features/endofyear/src/main/java/au/com/shiftyjelly/pocketcasts/endofyear/ui/Common.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Playback] Longest Episode story | 4,727 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
fun removeFromPlaylist(episodeUuid: String, podcastUuid: String) {
trackAction(SwipeAction.RemoveFromPlaylist)
val playlistUuid = playlistUuid ?: return
viewModelScope.launch {
playlistManager.deleteManualEpisode(
episodeUuid = episodeUuid,
playl... | No issues found. |
fun removeFromPlaylist(episodeUuid: String, podcastUuid: String) {
trackAction(SwipeAction.RemoveFromPlaylist)
val playlistUuid = playlistUuid ?: return
viewModelScope.launch {
playlistManager.deleteManualEpisode(
episodeUuid = episodeUuid,
playl... | @@ -100,7 +100,7 @@ class SwipeActionViewModel @AssistedInject constructor(
}
}
- fun removeFromPlaylist(episodeUuid: String) {
+ fun removeFromPlaylist(episodeUuid: String, podcastUuid: String) {
trackAction(SwipeAction.RemoveFromPlaylist)
val playlistUuid = playlistUuid ?: re... | modules/services/views/src/main/java/au/com/shiftyjelly/pocketcasts/views/swipe/SwipeActionViewModel.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Add unified playlist add and remove analytics | 4,728 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
.weight(1f),
) {
VideoSurface(
videoResourceId = R.raw.playback_plus_interstitial,
videoRatio = 980f / 1338f,
backgroundColor = story.backgroundColor,
modifier = Modifier
... | No issues found. | .weight(1f),
) {
VideoSurface(
videoResourceId = R.raw.playback_plus_interstitial,
videoRatio = 980f / 1338f,
backgroundColor = story.backgroundColor,
modifier = Modifier
... | @@ -1,38 +1,33 @@
package au.com.shiftyjelly.pocketcasts.endofyear.ui
-import androidx.compose.foundation.Image
import androidx.compose.foundation.background
-import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
-impor... | modules/features/endofyear/src/main/java/au/com/shiftyjelly/pocketcasts/endofyear/ui/PlusInterstitialStory.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Playback] Story 7: Plus Interstitial | 4,731 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
onHoldStory = { viewModel.pauseStoryAutoProgress(StoryProgressPauseReason.UserHoldingStory) },
onReleaseStory = { viewModel.resumeStoryAutoProgress(StoryProgressPauseReason.UserHoldingStory) },
onLearnAboutRatings = ::openRatingsInfo,
onClickUpsell = ::sta... | No issues found. | onHoldStory = { viewModel.pauseStoryAutoProgress(StoryProgressPauseReason.UserHoldingStory) },
onReleaseStory = { viewModel.resumeStoryAutoProgress(StoryProgressPauseReason.UserHoldingStory) },
onLearnAboutRatings = ::openRatingsInfo,
onClickUpsell = ::sta... | @@ -1,17 +1,19 @@
package au.com.shiftyjelly.pocketcasts.endofyear
import android.app.Activity
+import android.content.Context
import android.content.Intent
import android.graphics.Color
import android.os.Bundle
+import android.os.Parcelable
import android.view.WindowManager
import androidx.activity.ComponentA... | modules/features/endofyear/src/main/java/au/com/shiftyjelly/pocketcasts/endofyear/StoriesActivity.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Playback] Loading and error handling updates | 4,736 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
trackWithFlow(
event = AnalyticsEvent.INTERESTS_CATEGORY_SELECTED,
flow = flow,
properties = mapOf(
AnalyticsParameter.CATEGORY_ID to categoryId,
AnalyticsParameter.NAME to categoryName,
AnalyticsParameter.IS_SELECTED to isSelec... | No issues found. | trackWithFlow(
event = AnalyticsEvent.INTERESTS_CATEGORY_SELECTED,
flow = flow,
properties = mapOf(
AnalyticsParameter.CATEGORY_ID to categoryId,
AnalyticsParameter.NAME to categoryName,
AnalyticsParameter.IS_SELECTED to isSelec... | @@ -24,6 +24,18 @@ open class AnalyticsTracker(
}
}
+ private fun trackWithFlow(event: AnalyticsEvent, flow: String, properties: Map<String, Any> = emptyMap()) {
+ track(
+ event = event,
+ properties = buildMap {
+ put(AnalyticsParameter.FLOW, flow)
+ ... | modules/services/analytics/src/main/java/au/com/shiftyjelly/pocketcasts/analytics/AnalyticsTracker.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Improve Onboarding events | 4,738 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
onReleaseStory = { viewModel.resumeStoryAutoProgress(StoryProgressPauseReason.UserHoldingStory) },
onLearnAboutRatings = ::openRatingsInfo,
onClickUpsell = ::startUpsellFlow,
onRestartPlayback = storyChanger::reset,
onClose = {
... | No issues found. | onReleaseStory = { viewModel.resumeStoryAutoProgress(StoryProgressPauseReason.UserHoldingStory) },
onLearnAboutRatings = ::openRatingsInfo,
onClickUpsell = ::startUpsellFlow,
onRestartPlayback = storyChanger::reset,
onClose = {
... | @@ -256,6 +256,7 @@ class StoriesActivity : ComponentActivity() {
val currentStory = stories?.getOrNull(pagerState.currentPage)
if (currentStory?.isShareable == true) {
viewModel.pauseStoryAutoProgress(StoryProgressPauseReason.ScreenshotDialog)
+ ... | modules/features/endofyear/src/main/java/au/com/shiftyjelly/pocketcasts/endofyear/StoriesActivity.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Analytics event if Playback screenshots | 4,742 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
package au.com.shiftyjelly.pocketcasts.utils.di
import au.com.shiftyjelly.pocketcasts.utils.UUIDProvider
import au.com.shiftyjelly.pocketcasts.utils.UUIDProviderImpl
import au.com.shiftyjelly.pocketcasts.utils.accessibility.AccessibilityManager
import au.com.shiftyjelly.pocketcasts.utils.accessibility.AccessibilityMan... | No issues found. | package au.com.shiftyjelly.pocketcasts.utils.di
import au.com.shiftyjelly.pocketcasts.utils.UUIDProvider
import au.com.shiftyjelly.pocketcasts.utils.UUIDProviderImpl
import au.com.shiftyjelly.pocketcasts.utils.accessibility.AccessibilityManager
import au.com.shiftyjelly.pocketcasts.utils.accessibility.AccessibilityMan... | @@ -2,6 +2,9 @@ package au.com.shiftyjelly.pocketcasts.utils.di
import au.com.shiftyjelly.pocketcasts.utils.UUIDProvider
import au.com.shiftyjelly.pocketcasts.utils.UUIDProviderImpl
+import au.com.shiftyjelly.pocketcasts.utils.accessibility.AccessibilityManager
+import au.com.shiftyjelly.pocketcasts.utils.accessibi... | modules/services/utils/src/main/java/au/com/shiftyjelly/pocketcasts/utils/di/UtilsModule.kt | 0 | Kotlin | 1 | none | 16 | 30 | 30 | true | Improving Playback accessibility | 4,743 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
if (selected != null) {
setInt("selected_tab", selected)
} else {
sharedPreferences.edit().remove("selected_tab").commit()
}
}
override fun selectedTab(): Int? {
if (contains("selected_tab")) {
return getInt("selected_tab", 0)
}
... | No issues found. | if (selected != null) {
setInt("selected_tab", selected)
} else {
sharedPreferences.edit().remove("selected_tab").commit()
}
}
override fun selectedTab(): Int? {
if (contains("selected_tab")) {
return getInt("selected_tab", 0)
}
... | @@ -1634,6 +1634,12 @@ class SettingsImpl @Inject constructor(
sharedPrefs = sharedPreferences,
)
+ override val saveUpNextAsPlaylist = UserSetting.BoolPref(
+ sharedPrefKey = "save_up_next_as_playlist",
+ defaultValue = true,
+ sharedPrefs = sharedPreferences,
+ )
+
over... | modules/services/preferences/src/main/java/au/com/shiftyjelly/pocketcasts/preferences/SettingsImpl.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Update Play all flow | 4,744 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
trackPaymentFrequencyButtonTapped(planKey)
viewModelScope.launch {
val purchaseResult = paymentClient.purchaseSubscriptionPlan(planKey, flow.source.analyticsValue, activity)
when (purchaseResult) {
is PurchaseResult.Purchased -> {
... | No issues found. | trackPaymentFrequencyButtonTapped(planKey)
viewModelScope.launch {
val purchaseResult = paymentClient.purchaseSubscriptionPlan(planKey, flow.source.analyticsValue, activity)
when (purchaseResult) {
is PurchaseResult.Purchased -> {
... | @@ -182,6 +182,16 @@ class OnboardingUpgradeFeaturesViewModel @AssistedInject constructor(
analyticsTracker.track(AnalyticsEvent.SELECT_PAYMENT_FREQUENCY_DISMISSED, analyticsProps(flow = flow, source = source, variant = experimentProvider.getVariation(Experiment.NewOnboardingABTest).toNewOnboardingVariant()))
... | modules/features/account/src/main/java/au/com/shiftyjelly/pocketcasts/account/viewmodel/OnboardingUpgradeFeaturesViewModel.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Onboarding] Add `plus_promotion_details_tapped` event | 4,745 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Rule
import org.junit.Test
class AddToPlaylistViewModelTest {
@get:Rule
val coroutineRule = MainCoroutineRule()
private val playlistManager = FakePlaylistManager()
private lateinit var viewModel: AddToPlaylistViewModel
... | No issues found. | import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Rule
import org.junit.Test
class AddToPlaylistViewModelTest {
@get:Rule
val coroutineRule = MainCoroutineRule()
private val playlistManager = FakePlaylistManager()
private lateinit var viewModel: AddToPlaylistViewModel
... | @@ -0,0 +1,64 @@
+package au.com.shiftyjelly.pocketcasts.playlists.manual
+
+import au.com.shiftyjelly.pocketcasts.analytics.AnalyticsTracker
+import au.com.shiftyjelly.pocketcasts.playlists.create.FakePlaylistManager
+import au.com.shiftyjelly.pocketcasts.sharedtest.MainCoroutineRule
+import au.com.shiftyjelly.pocketc... | modules/features/filters/src/test/kotlin/au/com/shiftyjelly/pocketcasts/playlists/manual/AddToPlaylistViewModelTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Commit playlist changes only when tapping CTA | 4,746 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
fun `total time`() = runTest {
endOfYearSync.isSynced.add(true)
endOfYearManager.stats.add(stats)
viewModel.syncData()
viewModel.uiState.test {
val story = awaitStory<TotalTime>()
assertEquals(
TotalTime(stats.playbackTime),
s... | No issues found. | fun `total time`() = runTest {
endOfYearSync.isSynced.add(true)
endOfYearManager.stats.add(stats)
viewModel.syncData()
viewModel.uiState.test {
val story = awaitStory<TotalTime>()
assertEquals(
TotalTime(stats.playbackTime),
s... | @@ -189,11 +189,9 @@ class EndOfYearViewModelTest {
assertEquals(stats.playedPodcastCount, story.showCount)
assertEquals(stats.playedEpisodeCount, story.episodeCount)
- // We select 8 random episodes to display in the UI
- assertEquals(4, story.topShowIds.distinct().siz... | modules/features/endofyear/src/test/kotlin/au/com/shiftyjelly/pocketcasts/endofyear/EndOfYearViewModelTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Playback] Number of shows and episodes | 4,752 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
sortType = PlaylistEpisodeSortType.DragAndDrop,
syncStatus = SYNC_STATUS_NOT_SYNCED,
),
)
}
override suspend fun createManualPlaylistWithEpisodes(name: String, episodes: List<PodcastEpisode>): String {
return appDatabase.withTransaction {
... | No issues found. | sortType = PlaylistEpisodeSortType.DragAndDrop,
syncStatus = SYNC_STATUS_NOT_SYNCED,
),
)
}
override suspend fun createManualPlaylistWithEpisodes(name: String, episodes: List<PodcastEpisode>): String {
return appDatabase.withTransaction {
... | @@ -98,8 +98,37 @@ class PlaylistManagerImpl(
}
}
- override suspend fun findPlaylistPreview(uuid: String): PlaylistPreview? {
- return playlistDao.findPlaylistByUuid(uuid)?.toPlaylistPreview()
+ override suspend fun findPlaylistPreview(playlistUuid: String): PlaylistPreview? {
+ ret... | modules/services/repositories/src/main/java/au/com/shiftyjelly/pocketcasts/repositories/playlist/PlaylistManagerImpl.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Continue auto play from the correct position | 4,755 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
flow = flow,
properties = mapOf(
AnalyticsParameter.CATEGORIES to categories.joinToString(", "),
),
)
}
fun trackRecommendationsShown(flow: String) {
trackWithFlow(event = AnalyticsEvent.RECOMMENDATIONS_SHOWN, flow = flow)
}
fun track... | No issues found. | flow = flow,
properties = mapOf(
AnalyticsParameter.CATEGORIES to categories.joinToString(", "),
),
)
}
fun trackRecommendationsShown(flow: String) {
trackWithFlow(event = AnalyticsEvent.RECOMMENDATIONS_SHOWN, flow = flow)
}
fun track... | @@ -216,6 +216,33 @@ open class AnalyticsTracker(
trackWithFlow(event = AnalyticsEvent.SIGNIN_FORGOT_PASSWORD_TAPPED, flow = flow)
}
+ fun trackEndOfYearModalShown(year: Int) {
+ track(
+ event = AnalyticsEvent.END_OF_YEAR_MODAL_SHOWN,
+ properties = mapOf(
+ ... | modules/services/analytics/src/main/java/au/com/shiftyjelly/pocketcasts/analytics/AnalyticsTracker.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Fix Playback model showing | 4,760 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
onLearnAboutRatings: () -> Unit,
onClickUpsell: () -> Unit,
onRestartPlayback: () -> Unit,
) {
val widthPx = LocalDensity.current.run { measurements.width.toPx() }
HorizontalPager(
state = pagerState,
userScrollEnabled = false,
modifier = Modifier.pointerInput(Unit) {
... | No issues found. | onLearnAboutRatings: () -> Unit,
onClickUpsell: () -> Unit,
onRestartPlayback: () -> Unit,
) {
val widthPx = LocalDensity.current.run { measurements.width.toPx() }
HorizontalPager(
state = pagerState,
userScrollEnabled = false,
modifier = Modifier.pointerInput(Unit) {
... | @@ -66,7 +66,6 @@ internal fun StoriesPage(
onClickUpsell: () -> Unit,
onRestartPlayback: () -> Unit,
onClose: () -> Unit,
- onFailedToLoad: () -> Unit,
) {
val size = LocalContext.current.sizeLimit?.let(Modifier::size) ?: Modifier.fillMaxSize()
BoxWithConstraints(
@@ -87,43 +86,24 @@ inter... | modules/features/endofyear/src/main/java/au/com/shiftyjelly/pocketcasts/endofyear/ui/StoriesPage.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Fix manual progress interactions | 4,764 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
)
}
OnboardingUpgradeSource.SKIP_CHAPTERS -> {
add(UpgradePagerContent.PreselectChapters)
add(
UpgradePagerContent.Features(
features = currentPlan.featureItems,
showCta = false,
),
)... | No issues found. | )
}
OnboardingUpgradeSource.SKIP_CHAPTERS -> {
add(UpgradePagerContent.PreselectChapters)
add(
UpgradePagerContent.Features(
features = currentPlan.featureItems,
showCta = false,
),
)... | @@ -105,7 +105,7 @@ fun OnboardingUpgradeScreen(
onChangeSelectedPlan: (SubscriptionPlan) -> Unit,
onClickPrivacyPolicy: () -> Unit,
onClickTermsAndConditions: () -> Unit,
- onClickSeeAllFeatures: (OnboardingUpgradeFeaturesState.NewOnboardingVariant) -> Unit,
+ onClickSeeAllFeatures: (OnboardingUpg... | modules/features/account/src/main/java/au/com/shiftyjelly/pocketcasts/account/onboarding/upgrade/OnboardingUpgradeScreen.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Onboarding] Fix analytics on Upgrade screens | 4,765 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
operation = state.operation.copy(
results = state.operation.results.copy(filter = filter),
),
)
} else {
state
}
... | No issues found. | operation = state.operation.copy(
results = state.operation.results.copy(filter = filter),
),
)
} else {
state
}
... | @@ -59,7 +59,7 @@ class SearchViewModel @Inject constructor(
)
}
is SearchUiState.SearchOperation.Success -> {
- if (operation.results.isEmpty()) {
+ ... | modules/features/search/src/main/java/au/com/shiftyjelly/pocketcasts/search/SearchViewModel.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Improved Search] Fix analytics | 4,772 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
val freezeBar = forceBarVisible || isPreview
pillarComposition?.let { comp ->
val markerIndex = comp.markers.size - heightRange
val targetMarker = comp.markers.find { it.name == "marker_$markerIndex" } ?: comp.markers.firstOrNull()
LaunchedEffect(targetMarker) {
val clipSpe... | No issues found. | val freezeBar = forceBarVisible || isPreview
pillarComposition?.let { comp ->
val markerIndex = comp.markers.size - heightRange
val targetMarker = comp.markers.find { it.name == "marker_$markerIndex" } ?: comp.markers.firstOrNull()
LaunchedEffect(targetMarker) {
val clipSpe... | @@ -38,6 +38,7 @@ import au.com.shiftyjelly.pocketcasts.compose.components.TextH10
import au.com.shiftyjelly.pocketcasts.compose.components.TextP40
import au.com.shiftyjelly.pocketcasts.endofyear.R
import au.com.shiftyjelly.pocketcasts.endofyear.StoryCaptureController
+import au.com.shiftyjelly.pocketcasts.endofyear... | modules/features/endofyear/src/main/java/au/com/shiftyjelly/pocketcasts/endofyear/ui/RatingsStory.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Playback: Fix top shows story title | 4,784 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
modifier = Modifier
.padding(bottom = 18.dp)
.align(alignment = Alignment.BottomCenter),
story = story,
controller = controller,
onShare = onShareStory,
)
}
}
@Composable
private fun Content(
story: Story.LongestEpisode,
... | No issues found. | modifier = Modifier
.padding(bottom = 18.dp)
.align(alignment = Alignment.BottomCenter),
story = story,
controller = controller,
onShare = onShareStory,
)
}
}
@Composable
private fun Content(
story: Story.LongestEpisode,
... | @@ -35,6 +35,7 @@ import androidx.compose.ui.platform.LocalInspectionMode
import androidx.compose.ui.res.colorResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.semantics
+import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import... | modules/features/endofyear/src/main/java/au/com/shiftyjelly/pocketcasts/endofyear/ui/LongestEpisodeStory.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Playback] Top Story fix scale issues | 4,795 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
modifier = Modifier.clickable { navigateToEpisode(state.episodeUuid) },
isPlaybackError = state.error,
)
}
is NowPlayingViewModel.State.Empty -> {
MessageMediaDisplay(
... | No issues found. | modifier = Modifier.clickable { navigateToEpisode(state.episodeUuid) },
isPlaybackError = state.error,
)
}
is NowPlayingViewModel.State.Empty -> {
MessageMediaDisplay(
... | @@ -9,9 +9,11 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
+import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
impo... | wear/src/main/kotlin/au/com/shiftyjelly/pocketcasts/wear/ui/player/NowPlayingScreen.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Upgrade Compose, Wear Compose, and Horologist | 4,796 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
listener.onEvent(AnalyticsEvent.FILTER_CREATED, emptyMap())
assertEquals(clock.instant(), playlistCreatedSetting.value)
}
@Test
fun `updates plusUpgraded setting on PURCHASE_SUCCESSFUL event`() {
listener.onEvent(AnalyticsEvent.PURCHASE_SUCCESSFUL, emptyMap())
assertEquals... | No issues found. | listener.onEvent(AnalyticsEvent.FILTER_CREATED, emptyMap())
assertEquals(clock.instant(), playlistCreatedSetting.value)
}
@Test
fun `updates plusUpgraded setting on PURCHASE_SUCCESSFUL event`() {
listener.onEvent(AnalyticsEvent.PURCHASE_SUCCESSFUL, emptyMap())
assertEquals... | @@ -0,0 +1,219 @@
+package au.com.shiftyjelly.pocketcasts.repositories.appreview
+
+import au.com.shiftyjelly.pocketcasts.analytics.AnalyticsEvent
+import au.com.shiftyjelly.pocketcasts.preferences.Settings
+import au.com.shiftyjelly.pocketcasts.sharedtest.InMemoryFeatureFlagRule
+import au.com.shiftyjelly.pocketcasts.... | modules/services/repositories/src/test/java/au/com/shiftyjelly/pocketcasts/repositories/appreview/AppReviewAnalyticsListenerTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Playback] App review | 4,803 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
override val selectedPlaylist = UserSetting.PrefFromString(
sharedPrefKey = "app_start_selected_playlist",
defaultValue = null,
fromString = { value -> runCatching { selectedPlaylistAdapter.fromJson(value) }.getOrNull() },
toString = { value -> selectedPlaylistAdapter.toJson(value) ... | No issues found. |
override val selectedPlaylist = UserSetting.PrefFromString(
sharedPrefKey = "app_start_selected_playlist",
defaultValue = null,
fromString = { value -> runCatching { selectedPlaylistAdapter.fromJson(value) }.getOrNull() },
toString = { value -> selectedPlaylistAdapter.toJson(value) ... | @@ -38,6 +38,7 @@ import au.com.shiftyjelly.pocketcasts.preferences.model.NewEpisodeNotificationAc
import au.com.shiftyjelly.pocketcasts.preferences.model.NotificationVibrateSetting
import au.com.shiftyjelly.pocketcasts.preferences.model.PlayOverNotificationSetting
import au.com.shiftyjelly.pocketcasts.preferences.m... | modules/services/preferences/src/main/java/au/com/shiftyjelly/pocketcasts/preferences/SettingsImpl.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Open a playlist on startup | 4,808 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
modifier = modifier.fillMaxWidth(),
) {
Spacer(
modifier = Modifier.height(24.dp),
)
TextH30(
text = shareTitle,
textAlign = TextAlign.Center,
color = shareColors.onBackgroundPrimary,
modifier = Modifier.padding(horizontal =... | No issues found. | modifier = modifier.fillMaxWidth(),
) {
Spacer(
modifier = Modifier.height(24.dp),
)
TextH30(
text = shareTitle,
textAlign = TextAlign.Center,
color = shareColors.onBackgroundPrimary,
modifier = Modifier.padding(horizontal =... | @@ -14,6 +14,7 @@ import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
+import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.com... | modules/features/reimagine/src/main/kotlin/au/com/shiftyjelly/pocketcasts/reimagine/ui/SharePage.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Fix sharing edge-to-edge issues | 4,810 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
abortOnError = true
checkAllWarnings = false
warningsAsErrors = false
checkTestSources = false
checkGeneratedSources = false
// Uncomment this when regenerating baseline files
// ignoreWarnings = true
// There's no point in slowing down assembling of r... | No issues found. | abortOnError = true
checkAllWarnings = false
warningsAsErrors = false
checkTestSources = false
checkGeneratedSources = false
// Uncomment this when regenerating baseline files
// ignoreWarnings = true
// There's no point in slowing down assembling of r... | @@ -14,7 +14,6 @@ import com.google.devtools.ksp.gradle.KspGradleSubplugin
import io.sentry.android.gradle.extensions.InstrumentationFeature
import io.sentry.android.gradle.extensions.SentryPluginExtension
import java.util.EnumSet
-import kotlin.collections.addAll
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
i... | build.gradle.kts | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Use per-project Sentry configuration | 4,818 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
private var notificationData: NotificationData? = null
private val imageRequestFactory = PocketCastsImageRequestFactory(
context,
isDarkTheme = true,
size = 128,
placeholderType = PlaceholderType.Small,
)
override fun buildPlayingNotification(
sessionToken: Med... | No issues found. |
private var notificationData: NotificationData? = null
private val imageRequestFactory = PocketCastsImageRequestFactory(
context,
isDarkTheme = true,
size = 128,
placeholderType = PlaceholderType.Small,
)
override fun buildPlayingNotification(
sessionToken: Med... | @@ -11,7 +11,6 @@ import android.support.v4.media.session.PlaybackStateCompat.ACTION_SKIP_TO_NEXT
import android.support.v4.media.session.PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS
import android.support.v4.media.session.PlaybackStateCompat.ACTION_STOP
import androidx.core.app.NotificationCompat
-import androidx.co... | modules/services/repositories/src/main/java/au/com/shiftyjelly/pocketcasts/repositories/notification/NotificationDrawerImpl.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Migrate Coil from 2.7.0 to 3.3.0 | 4,821 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
import java.util.Properties
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.ksp)
alias(libs.plugins.hilt)
}
android {
namespace = "au.com.shiftyjelly.pocketcasts.preferences"
buildFeatures {
buildConfig = true
}
}
dependencies {
... | No issues found. | import java.util.Properties
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.ksp)
alias(libs.plugins.hilt)
}
android {
namespace = "au.com.shiftyjelly.pocketcasts.preferences"
buildFeatures {
buildConfig = true
}
}
dependencies {
... | @@ -12,19 +12,6 @@ android {
buildFeatures {
buildConfig = true
}
-
- defaultConfig {
- val localPropertiesFile = rootProject.file("local.properties")
- val dataCollectionValue = if (localPropertiesFile.exists() && localPropertiesFile.isFile) {
- val properties = Propertie... | modules/services/preferences/build.gradle.kts | 0 | Kotlin | 1 | none | 16 | 46 | 46 | true | Allow to pre-initialize auto downloads setting | 4,823 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
binding.upNextButton.setOnClickListener {
analyticsTracker.track(AnalyticsEvent.UP_NEXT_SHOWN, mapOf(SOURCE_KEY to UpNextSource.PLAYER.analyticsValue))
openUpNext()
}
}
viewLifecycleOwner.lifecycleScope.launch {
viewLifecycleOwner.rep... | No issues found. |
binding.upNextButton.setOnClickListener {
analyticsTracker.track(AnalyticsEvent.UP_NEXT_SHOWN, mapOf(SOURCE_KEY to UpNextSource.PLAYER.analyticsValue))
openUpNext()
}
}
viewLifecycleOwner.lifecycleScope.launch {
viewLifecycleOwner.rep... | @@ -201,7 +201,7 @@ class PlayerContainerFragment :
}
val upNextDrawable: Drawable? = AppCompatResources.getDrawable(binding.upNextButton.context, drawableId)
binding.upNextButton.setImageDrawable(upNextDrawable)
- binding.countText.text = if (upNextCount == 0) "" else ... | modules/features/player/src/main/java/au/com/shiftyjelly/pocketcasts/player/view/PlayerContainerFragment.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Fix mini player Up Next count overflow | 4,826 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
@Test
fun `getArtworkUrl with null size returns 960 image`() {
val url = PodcastImage.getArtworkUrl(size = null, uuid = testUuid, isWearOS = false)
assertEquals("${Settings.SERVER_STATIC_URL}/discover/images/webp/960/$testUuid.webp", url)
}
@Test
fun `getArtworkUrl with size greater... | No issues found. | @Test
fun `getArtworkUrl with null size returns 960 image`() {
val url = PodcastImage.getArtworkUrl(size = null, uuid = testUuid, isWearOS = false)
assertEquals("${Settings.SERVER_STATIC_URL}/discover/images/webp/960/$testUuid.webp", url)
}
@Test
fun `getArtworkUrl with size greater... | @@ -0,0 +1,81 @@
+package au.com.shiftyjelly.pocketcasts.repositories.images
+
+import au.com.shiftyjelly.pocketcasts.preferences.Settings
+import org.junit.Assert.assertEquals
+import org.junit.Test
+
+class PodcastImageTest {
+
+ private val testUuid = "test-podcast-uuid"
+
+ @Test
+ fun `getMediumArtworkUrl... | app/src/test/java/au/com/shiftyjelly/pocketcasts/repositories/images/PodcastImageTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | When following a podcast cache the smaller podcast images | 4,827 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
assertTrue(state is PodcastViewModel.UiState.Empty)
}
}
@Test
fun `when podcast found with episodes, then emits Loaded state with episodes`() = runTest {
val podcast = createTestPodcast(uuid = testPodcastUuid)
val episodes = listOf(
createTestEpisode(uuid = "... | No issues found. | assertTrue(state is PodcastViewModel.UiState.Empty)
}
}
@Test
fun `when podcast found with episodes, then emits Loaded state with episodes`() = runTest {
val podcast = createTestPodcast(uuid = testPodcastUuid)
val episodes = listOf(
createTestEpisode(uuid = "... | @@ -0,0 +1,189 @@
+package au.com.shiftyjelly.pocketcasts.wear.ui.podcast
+
+import androidx.lifecycle.SavedStateHandle
+import app.cash.turbine.test
+import au.com.shiftyjelly.pocketcasts.models.entity.Podcast
+import au.com.shiftyjelly.pocketcasts.models.entity.PodcastEpisode
+import au.com.shiftyjelly.pocketcasts.mo... | wear/src/test/kotlin/au/com/shiftyjelly/pocketcasts/wear/ui/podcast/PodcastViewModelTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Wear OS hide archived or played episodes | 4,831 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
columnState: ScalingLazyColumnState,
uiState: UiState,
useEpisodeArtwork: Boolean,
onItemClick: (PodcastEpisode) -> Unit,
) {
when (uiState) {
is UiState.Loading -> ContentLoading(columnState = columnState)
is UiState.Empty -> ContentEmpty(columnState = columnState)
is UiSt... | No issues found. | columnState: ScalingLazyColumnState,
uiState: UiState,
useEpisodeArtwork: Boolean,
onItemClick: (PodcastEpisode) -> Unit,
) {
when (uiState) {
is UiState.Loading -> ContentLoading(columnState = columnState)
is UiState.Empty -> ContentEmpty(columnState = columnState)
is UiSt... | @@ -1,17 +1,22 @@
package au.com.shiftyjelly.pocketcasts.wear.ui.downloads
import android.content.res.Configuration
+import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
+import android... | wear/src/main/kotlin/au/com/shiftyjelly/pocketcasts/wear/ui/downloads/DownloadsScreen.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Improve Wear OS downloads page with a loading spinner and empty message | 4,837 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
package au.com.shiftyjelly.pocketcasts.wear.ui.downloads
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
import au.com.shiftyjelly.pocketcasts.models.entity.PodcastEpisode
i... | No issues found. | package au.com.shiftyjelly.pocketcasts.wear.ui.downloads
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
import au.com.shiftyjelly.pocketcasts.models.entity.PodcastEpisode
i... | @@ -1,25 +1,13 @@
package au.com.shiftyjelly.pocketcasts.wear.ui.downloads
-import android.content.res.Configuration
-import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
-import android... | wear/src/main/kotlin/au/com/shiftyjelly/pocketcasts/wear/ui/downloads/DownloadsScreen.kt | 0 | Kotlin | 1 | none | 16 | 34 | 34 | true | Wear OS: Add starred episode screen | 4,838 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
val isPreview = LocalInspectionMode.current
val freezeAnimation = controller.isSharing || isPreview
val progress by animateLottieCompositionAsState(
composition = composition,
iterations = LottieConstants.IterateForever,
isPlaying = !f... | No issues found. | val isPreview = LocalInspectionMode.current
val freezeAnimation = controller.isSharing || isPreview
val progress by animateLottieCompositionAsState(
composition = composition,
iterations = LottieConstants.IterateForever,
isPlaying = !f... | @@ -206,6 +206,7 @@ private fun PodcastCoverCarousel(
PodcastImage(
uuid = podcastId,
cornerSize = 4.dp,
+ imageSize = coverSize,
modifier = Modifier
.size(coverSize)
.gra... | modules/features/endofyear/src/main/java/au/com/shiftyjelly/pocketcasts/endofyear/ui/NumberOfShowsStory.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Fix performance of image loading | 4,844 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
internal fun onStoryChanged(story: Story) {
trackStoryShown(story)
viewModelScope.launch {
progress.value = 0f
countDownJob?.cancelAndJoin()
val talkbackOn = accessibilityManager.isTalkBackOnFlow.value
val previewDuration = story.previewDuration
... | No issues found. |
internal fun onStoryChanged(story: Story) {
trackStoryShown(story)
viewModelScope.launch {
progress.value = 0f
countDownJob?.cancelAndJoin()
val talkbackOn = accessibilityManager.isTalkBackOnFlow.value
val previewDuration = story.previewDuration
... | @@ -362,7 +362,7 @@ class EndOfYearViewModel @AssistedInject constructor(
event,
buildMap {
putAll(properties)
- put("year", year.value)
+ put("current_year", year.value)
},
)
}
@@ -390,7 +390,7 @@ class EndOfYearViewMod... | modules/features/endofyear/src/main/java/au/com/shiftyjelly/pocketcasts/endofyear/EndOfYearViewModel.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Playback] Rename `year` prop to `current_year` | 4,845 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
fundingUrl = existingPodcast.fundingUrl,
)
}
@Test
fun `updatePodcastIfRequired updates when the description changes`() = runTest {
val existingPodcast = createPodcast(podcastDescription = "Old description")
val updatedPodcast = existingPodcast.copy(podcastDescription = ... | No issues found. | fundingUrl = existingPodcast.fundingUrl,
)
}
@Test
fun `updatePodcastIfRequired updates when the description changes`() = runTest {
val existingPodcast = createPodcast(podcastDescription = "Old description")
val updatedPodcast = existingPodcast.copy(podcastDescription = ... | @@ -0,0 +1,315 @@
+package au.com.shiftyjelly.pocketcasts.repositories.sync
+
+import au.com.shiftyjelly.pocketcasts.models.db.AppDatabase
+import au.com.shiftyjelly.pocketcasts.models.db.dao.PodcastDao
+import au.com.shiftyjelly.pocketcasts.models.entity.Podcast
+import au.com.shiftyjelly.pocketcasts.repositories.podc... | modules/services/repositories/src/test/java/au/com/shiftyjelly/pocketcasts/repositories/sync/PodcastRefresherImplTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Fix unfollow issue | 4,856 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
)
}[0].measure(Constraints())
val width = maxOf(dummyButton.width, controls.width)
val height = maxOf(dummyButton.height, controls.height)
val controlsOffsetX = ((width - controls.width) / 2f).roundToInt()
val controlsOffsetY = ((height - controls.height) / 2f).roun... | No issues found. | )
}[0].measure(Constraints())
val width = maxOf(dummyButton.width, controls.width)
val height = maxOf(dummyButton.height, controls.height)
val controlsOffsetX = ((width - controls.width) / 2f).roundToInt()
val controlsOffsetY = ((height - controls.height) / 2f).roun... | @@ -180,6 +180,7 @@ internal fun PodcastHeader(
PodcastImage(
uuid = uuid,
imageSize = coverSize,
+ imageRequestSize = expandedCoverSize,
elevation = 16.dp,
modifier = Modifier
.combinedClickable( | modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/podcast/PodcastHeader.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Fix podcast page image flickering when animating | 4,857 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
}
}
val topSections = listOf(limitRow, optionRow, podcastsChosenRow, topFooter, headerRow)
topAdapter.submitList(topSections)
autoAddAdapter.submitList(podcasts)
}
viewLifecycleOwner.lifecycleScope.launch {
viewLifecycleOwner... | No issues found. | }
}
val topSections = listOf(limitRow, optionRow, podcastsChosenRow, topFooter, headerRow)
topAdapter.submitList(topSections)
autoAddAdapter.submitList(podcasts)
}
viewLifecycleOwner.lifecycleScope.launch {
viewLifecycleOwner... | @@ -6,8 +6,6 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
-import androidx.core.view.ViewCompat
-import androidx.core.view.WindowInsetsCompat
import androidx.core.view.updatePadding
import androidx.fragment.app.activityViewModels
impor... | modules/features/settings/src/main/java/au/com/shiftyjelly/pocketcasts/settings/AutoAddSettingsFragment.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Fix notifications choose podcasts obscuring the mini player | 4,861 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
override fun findSubscribedBlocking(): List<Podcast> {
return podcastDao.findSubscribedBlocking()
}
override suspend fun findSubscribedNoOrder(): List<Podcast> {
return podcastDao.findSubscribedNoOrder()
}
override suspend fun findSubscribedSorted(): List<Podcast> {
val sor... | No issues found. | override fun findSubscribedBlocking(): List<Podcast> {
return podcastDao.findSubscribedBlocking()
}
override suspend fun findSubscribedNoOrder(): List<Podcast> {
return podcastDao.findSubscribedNoOrder()
}
override suspend fun findSubscribedSorted(): List<Podcast> {
val sor... | @@ -445,6 +445,10 @@ class PodcastManagerImpl @Inject constructor(
return podcastDao.countBlocking()
}
+ override suspend fun countPodcasts(): Int {
+ return podcastDao.count()
+ }
+
override suspend fun countSubscribed(): Int {
return podcastDao.countSubscribed()
} | modules/services/repositories/src/main/java/au/com/shiftyjelly/pocketcasts/repositories/podcast/PodcastManagerImpl.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Improve debug attachment with download attempt time and playback issues | 4,867 | Automattic/pocket-casts-android | 1,688 | Kotlin | geekygecko | |
/**
* Suspends until remote feature providers have completed initialization.
* This ensures subsequent feature flag checks will use the latest remote values
* rather than cached or default values.
*
* This method can be used before calling any feature flag accessor method
* (e.g., [is... | No issues found. |
/**
* Suspends until remote feature providers have completed initialization.
* This ensures subsequent feature flag checks will use the latest remote values
* rather than cached or default values.
*
* This method can be used before calling any feature flag accessor method
* (e.g., [is... | @@ -4,8 +4,14 @@ import au.com.shiftyjelly.pocketcasts.payment.SubscriptionTier
import au.com.shiftyjelly.pocketcasts.utils.featureflag.ReleaseVersion.Companion.comparedToEarlyPatronAccess
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.CopyOnWriteArrayList
+import kotlin.time.Duration
+imp... | modules/services/utils/src/main/java/au/com/shiftyjelly/pocketcasts/utils/featureflag/FeatureFlag.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Ensure onboarding feature flag is loaded from remote source | 4,882 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
lineHeight = 21.sp,
color = MaterialTheme.theme.colors.primaryText02,
textAlign = TextAlign.Center,
)
}
}
@Composable
private fun Perks(
expirationDate: Instant?,
isInstallment: Boolean,
modifier: Modifier = Modifier,
) {
Column(
verticalArrangeme... | No issues found. | lineHeight = 21.sp,
color = MaterialTheme.theme.colors.primaryText02,
textAlign = TextAlign.Center,
)
}
}
@Composable
private fun Perks(
expirationDate: Instant?,
isInstallment: Boolean,
modifier: Modifier = Modifier,
) {
Column(
verticalArrangeme... | @@ -50,6 +50,7 @@ import au.com.shiftyjelly.pocketcasts.localization.R as LR
@Composable
internal fun CancelConfirmationPage(
expirationDate: Instant?,
+ isInstallment: Boolean,
onKeepSubscription: () -> Unit,
onCancelSubscription: () -> Unit,
modifier: Modifier = Modifier,
@@ -61,12 +62,14 @@ ... | modules/features/profile/src/main/java/au/com/shiftyjelly/pocketcasts/profile/winback/CancelConfirmationPage.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Installments] Update upgrade screen | 4,889 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
fun findDownloadEpisodesFlow(): Flow<List<PodcastEpisode>>
fun findDownloadedEpisodesRxFlowable(): Flowable<List<PodcastEpisode>>
fun findStarredEpisodesFlow(): Flow<List<PodcastEpisode>>
suspend fun findStarredEpisodes(): List<PodcastEpisode>
suspend fun downloadedEpisodesThatHaveNotBeenPlayedCoun... | No issues found. |
fun findDownloadEpisodesFlow(): Flow<List<PodcastEpisode>>
fun findDownloadedEpisodesRxFlowable(): Flowable<List<PodcastEpisode>>
fun findStarredEpisodesFlow(): Flow<List<PodcastEpisode>>
suspend fun findStarredEpisodes(): List<PodcastEpisode>
suspend fun downloadedEpisodesThatHaveNotBeenPlayedCoun... | @@ -103,7 +103,7 @@ interface EpisodeManager {
suspend fun clearEpisodeHistory(episodes: List<PodcastEpisode>)
fun markPlaybackHistorySyncedBlocking()
fun stopDownloadAndCleanUp(episodeUuid: String, from: String)
- fun stopDownloadAndCleanUp(episode: PodcastEpisode, from: String)
+ suspend fun stop... | modules/services/repositories/src/main/java/au/com/shiftyjelly/pocketcasts/repositories/podcast/EpisodeManager.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Remove orphaned transcripts when downloaded episode is deleted | 4,903 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
} else {
val audioFocusRequest = getAudioFocusRequest()
val result = AudioManagerCompat.abandonAudioFocusRequest(audioManager, audioFocusRequest)
LogBuffer.i(LogBuffer.TAG_PLAYBACK, "Giving up audio focus")
if (result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) ... | No issues found. | } else {
val audioFocusRequest = getAudioFocusRequest()
val result = AudioManagerCompat.abandonAudioFocusRequest(audioManager, audioFocusRequest)
LogBuffer.i(LogBuffer.TAG_PLAYBACK, "Giving up audio focus")
if (result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) ... | @@ -11,6 +11,10 @@ import androidx.media.AudioManagerCompat
import au.com.shiftyjelly.pocketcasts.preferences.Settings
import au.com.shiftyjelly.pocketcasts.preferences.model.PlayOverNotificationSetting
import au.com.shiftyjelly.pocketcasts.utils.log.LogBuffer
+import kotlinx.coroutines.CoroutineScope
+import kotlin... | modules/services/repositories/src/main/java/au/com/shiftyjelly/pocketcasts/repositories/playback/FocusManager.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Only pause playback after 200ms on AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK | 4,905 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
.put("offerIdToken", offerIdToken)
.put("pricingPhases", JSONArray(pricingPhases.map(PricingPhase::toJson)))
.put("offerTags", JSONArray(offerTags))
if (installmentPlanCommitmentPaymentsCount != null || subsequentInstallmentPlanCommitmentPaymentsCount != null) {
val installmentDetai... | No issues found. | .put("offerIdToken", offerIdToken)
.put("pricingPhases", JSONArray(pricingPhases.map(PricingPhase::toJson)))
.put("offerTags", JSONArray(offerTags))
if (installmentPlanCommitmentPaymentsCount != null || subsequentInstallmentPlanCommitmentPaymentsCount != null) {
val installmentDetai... | @@ -30,13 +30,27 @@ fun createGoogleOfferDetails(
offerIdToken: String = "offer-id-token",
pricingPhases: List<PricingPhase> = listOf(createGooglePricingPhase()),
offerTags: List<String> = emptyList(),
+ installmentPlanCommitmentPaymentsCount: Int? = null,
+ subsequentInstallmentPlanCommitmentPayme... | modules/services/payment/src/test/kotlin/com/android/billingclient/api/ProductDetails.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Installments] Introduce installments to our models | 4,907 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
@Singleton
@Transcripts
internal fun provideTranscriptsClient(
@Raw client: OkHttpClient,
@Transcripts cache: Cache,
@Transcripts interceptors: List<@JvmSuppressWildcards OkHttpInterceptor>,
): OkHttpClient {
return client.newBuilder()
.cache(cache)
... | No issues found. | @Singleton
@Transcripts
internal fun provideTranscriptsClient(
@Raw client: OkHttpClient,
@Transcripts cache: Cache,
@Transcripts interceptors: List<@JvmSuppressWildcards OkHttpInterceptor>,
): OkHttpClient {
return client.newBuilder()
.cache(cache)
... | @@ -13,6 +13,7 @@ import au.com.shiftyjelly.pocketcasts.preferences.AccessToken
import au.com.shiftyjelly.pocketcasts.preferences.RefreshToken
import au.com.shiftyjelly.pocketcasts.preferences.Settings
import au.com.shiftyjelly.pocketcasts.servers.OkHttpInterceptor
+import au.com.shiftyjelly.pocketcasts.servers.adap... | modules/services/servers/src/main/java/au/com/shiftyjelly/pocketcasts/servers/di/ServersModule.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Dispatch Retrofit enqueued calls on a background thread | 4,909 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
}
@Provides
@Singleton
@Artwork
fun provideArtworkClient(
@Raw client: OkHttpClient,
@Artwork interceptors: List<@JvmSuppressWildcards OkHttpInterceptor>,
): OkHttpClient {
return client.newBuilder()
.addInterceptors(interceptors)
.build()
}
... | No issues found. | }
@Provides
@Singleton
@Artwork
fun provideArtworkClient(
@Raw client: OkHttpClient,
@Artwork interceptors: List<@JvmSuppressWildcards OkHttpInterceptor>,
): OkHttpClient {
return client.newBuilder()
.addInterceptors(interceptors)
.build()
}
... | @@ -1,6 +1,5 @@
package au.com.shiftyjelly.pocketcasts.servers.di
-import android.accounts.AccountManager
import android.content.Context
import au.com.shiftyjelly.pocketcasts.models.entity.AnonymousBumpStat
import au.com.shiftyjelly.pocketcasts.models.type.BlazeAdLocation
@@ -16,16 +15,22 @@ import au.com.shiftyj... | modules/services/servers/src/main/java/au/com/shiftyjelly/pocketcasts/servers/di/NetworkModule.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Refactor network code wiring | 4,910 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
}
data object UserCancelled : PaymentResultCode {
override val analyticsValue get() = "user_cancelled"
}
data object ServiceUnavailable : PaymentResultCode {
override val analyticsValue get() = "service_unavailable"
}
data object BillingUnavailable : PaymentResultCode {
... | No issues found. | }
data object UserCancelled : PaymentResultCode {
override val analyticsValue get() = "user_cancelled"
}
data object ServiceUnavailable : PaymentResultCode {
override val analyticsValue get() = "service_unavailable"
}
data object BillingUnavailable : PaymentResultCode {
... | @@ -5,7 +5,7 @@ sealed interface PaymentResult<out T : Any> {
val value: T,
) : PaymentResult<T>
- data class Failure constructor(
+ data class Failure(
val code: PaymentResultCode,
val message: String,
) : PaymentResult<Nothing> | modules/services/payment/src/main/kotlin/au/com/shiftyjelly/pocketcasts/payment/PaymentResult.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Make payments code safer | 4,920 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
showNotesState = state
.map { episodeState ->
when (episodeState) {
is EpisodeFragmentState.Loaded -> episodeState.showNotesState
is EpisodeFragmentState.Error -> ShowNotesState.NotFound
}
}
.distinctUnti... | No issues found. | showNotesState = state
.map { episodeState ->
when (episodeState) {
is EpisodeFragmentState.Loaded -> episodeState.showNotesState
is EpisodeFragmentState.Error -> ShowNotesState.NotFound
}
}
.distinctUnti... | @@ -19,7 +19,6 @@ import au.com.shiftyjelly.pocketcasts.models.to.Transcript
import au.com.shiftyjelly.pocketcasts.preferences.Settings
import au.com.shiftyjelly.pocketcasts.repositories.download.DownloadManager
import au.com.shiftyjelly.pocketcasts.repositories.playback.PlaybackManager
-import au.com.shiftyjelly.po... | modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/episode/EpisodeFragmentViewModel.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Add playlist from episode details | 4,923 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
insertPodcast(index = 0)
insertPodcastEpisode(index = 0, podcastIndex = 0)
insertPodcastEpisode(index = 1, podcastIndex = 1)
val isAdded = manager.addManualEpisodes("playlist-id-0", listOf("episode-id-0", "episode-id-1"))
assertTrue(isAdded)
expectManualEpisodes(
... | No issues found. | insertPodcast(index = 0)
insertPodcastEpisode(index = 0, podcastIndex = 0)
insertPodcastEpisode(index = 1, podcastIndex = 1)
val isAdded = manager.addManualEpisodes("playlist-id-0", listOf("episode-id-0", "episode-id-1"))
assertTrue(isAdded)
expectManualEpisodes(
... | @@ -365,7 +365,7 @@ class PlaylistManagerManualTest {
}
@Test
- fun addEpisodes() = dsl.test {
+ fun addSingleEpisode() = dsl.test {
insertManualPlaylist(index = 0)
insertPodcast(index = 0)
insertPodcastEpisode(index = 0, podcastIndex = 0)
@@ -405,6 +405,72 @@ class Playlist... | app/src/androidTest/java/au/com/shiftyjelly/pocketcasts/repositories/playlist/PlaylistManagerManualTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Allow to add episodes to a playlist in bulk | 4,926 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
Box(
modifier = Modifier
.width(2.dp)
.height(16.dp)
.background(MaterialTheme.theme.colors.primaryIcon01, CircleShape),
)
}
Spacer(
modifier = Modifier.width(16.dp),
)
TextH40... | No issues found. | Box(
modifier = Modifier
.width(2.dp)
.height(16.dp)
.background(MaterialTheme.theme.colors.primaryIcon01, CircleShape),
)
}
Spacer(
modifier = Modifier.width(16.dp),
)
TextH40... | @@ -82,6 +82,7 @@ import au.com.shiftyjelly.pocketcasts.localization.R as LR
@Composable
internal fun AddToPlaylistPage(
+ newEpisodeUuids: List<String>,
playlistPreviews: List<PlaylistPreviewForEpisode>,
unfilteredPlaylistsCount: Int,
episodeLimit: Int,
@@ -130,6 +131,7 @@ internal fun AddToPlayl... | modules/features/filters/src/main/java/au/com/shiftyjelly/pocketcasts/playlists/manual/AddToPlaylistPage.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Refactor episode add page to handle multiple episodes | 4,927 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
fun create(
source: Source,
uuids: List<EpisodeUuidPair>,
customTheme: Theme.ThemeType? = null,
): BaseDialogFragment
fun create(
source: Source,
episodeUuid: String,
podcastUuid: String,
customTheme: Theme.ThemeType? = null,
): BaseDialogFragment... | No issues found. | fun create(
source: Source,
uuids: List<EpisodeUuidPair>,
customTheme: Theme.ThemeType? = null,
): BaseDialogFragment
fun create(
source: Source,
episodeUuid: String,
podcastUuid: String,
customTheme: Theme.ThemeType? = null,
): BaseDialogFragment... | @@ -1,15 +1,31 @@
package au.com.shiftyjelly.pocketcasts.views.swipe
+import au.com.shiftyjelly.pocketcasts.models.to.EpisodeUuidPair
import au.com.shiftyjelly.pocketcasts.ui.theme.Theme
import au.com.shiftyjelly.pocketcasts.views.fragments.BaseDialogFragment
interface AddToPlaylistFragmentFactory {
+ fun cr... | modules/services/views/src/main/java/au/com/shiftyjelly/pocketcasts/views/swipe/AddToPlaylistFragmentFactory.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Add bulk add episode to playlist toolbar action | 4,928 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
}
isCreationTriggered = true
viewModelScope.launch {
val playlistUuid = playlistManager.createManualPlaylist(sanitizedName)
val uuids = episodeUuids.map(EpisodeUuidPair::episodeUuid)
playlistManager.addManualEpisodes(playlistUuid, uuids)
tracker.tr... | No issues found. | }
isCreationTriggered = true
viewModelScope.launch {
val playlistUuid = playlistManager.createManualPlaylist(sanitizedName)
val uuids = episodeUuids.map(EpisodeUuidPair::episodeUuid)
playlistManager.addManualEpisodes(playlistUuid, uuids)
tracker.tr... | @@ -34,7 +34,6 @@ import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
-import timber.log.Timber
@OptIn(ExperimentalCoroutinesApi::class)
@HiltViewModel(assistedFactory = AddToPlaylistViewModel.Factory::class) | modules/features/filters/src/main/java/au/com/shiftyjelly/pocketcasts/playlists/manual/AddToPlaylistViewModel.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Preserve selection order when adding multiple episodes to a plyalist | 4,942 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
import au.com.shiftyjelly.pocketcasts.analytics.testing.TestEventSink
import com.automattic.eventhorizon.ApplicationClosedEvent
import com.automattic.eventhorizon.ApplicationInstalledEvent
import com.automattic.eventhorizon.ApplicationOpenedEvent
import com.automattic.eventhorizon.ApplicationUpdatedEvent
import com.au... | No issues found. |
import au.com.shiftyjelly.pocketcasts.analytics.testing.TestEventSink
import com.automattic.eventhorizon.ApplicationClosedEvent
import com.automattic.eventhorizon.ApplicationInstalledEvent
import com.automattic.eventhorizon.ApplicationOpenedEvent
import com.automattic.eventhorizon.ApplicationUpdatedEvent
import com.au... | @@ -0,0 +1,51 @@
+package au.com.shiftyjelly.pocketcasts.analytics
+
+import au.com.shiftyjelly.pocketcasts.analytics.testing.TestEventSink
+import com.automattic.eventhorizon.ApplicationClosedEvent
+import com.automattic.eventhorizon.ApplicationInstalledEvent
+import com.automattic.eventhorizon.ApplicationOpenedEvent
... | modules/services/analytics/src/test/kotlin/au/com/shiftyjelly/pocketcasts/analytics/AppLifecycleAnalyticsTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Use Event Horizon for application lifecycle | 4,943 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
}
}
private fun startSyncFlow() {
syncJob?.cancel()
syncJob = viewModelScope.launch {
// Check phone connectivity before starting sync
if (!phoneConnectionMonitor.isPhoneConnected()) {
LogBuffer.e(TAG, "${WearLogging.PREFIX} Phone not connected -... | No issues found. | }
}
private fun startSyncFlow() {
syncJob?.cancel()
syncJob = viewModelScope.launch {
// Check phone connectivity before starting sync
if (!phoneConnectionMonitor.isPhoneConnected()) {
LogBuffer.e(TAG, "${WearLogging.PREFIX} Phone not connected -... | @@ -13,6 +13,7 @@ import au.com.shiftyjelly.pocketcasts.repositories.refresh.RefreshPodcastsTask
import au.com.shiftyjelly.pocketcasts.repositories.sync.LoginResult
import au.com.shiftyjelly.pocketcasts.repositories.user.UserManager
import au.com.shiftyjelly.pocketcasts.utils.log.LogBuffer
+import au.com.shiftyjelly... | wear/src/main/kotlin/au/com/shiftyjelly/pocketcasts/wear/WearMainActivityViewModel.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Q1 Quality] WearOs - Enhance UI with connection status updates | 4,951 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
val value = DownloadProgress(
downloadedByteCount = 372,
contentLength = 1000,
)
assertEquals(37, value.progress)
}
@Test
fun `limit max progress at 100`() {
val value = DownloadProgress(
downloadedByteCount = 1000,
contentLen... | No issues found. | val value = DownloadProgress(
downloadedByteCount = 372,
contentLength = 1000,
)
assertEquals(37, value.progress)
}
@Test
fun `limit max progress at 100`() {
val value = DownloadProgress(
downloadedByteCount = 1000,
contentLen... | @@ -0,0 +1,67 @@
+package au.com.shiftyjelly.pocketcasts.repositories.download
+
+import junit.framework.TestCase.assertEquals
+import junit.framework.TestCase.assertNull
+import org.junit.Test
+
+class DownloadProgressTest {
+ @Test
+ fun `calculate progress`() {
+ val value = DownloadProgress(
+ ... | modules/services/repositories/src/test/java/au/com/shiftyjelly/pocketcasts/repositories/download/DownloadProgressTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Add download progress logic | 4,954 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
*
* @return Result indicating success or failure. The Result is primarily for testing purposes;
* failures are logged internally so callers may safely ignore the return value in production code.
*/
@OptIn(ExperimentalHorologistApi::class)
suspend fun sendAuthToDataLayer(): Result<Unit> {
... | No issues found. | *
* @return Result indicating success or failure. The Result is primarily for testing purposes;
* failures are logged internally so callers may safely ignore the return value in production code.
*/
@OptIn(ExperimentalHorologistApi::class)
suspend fun sendAuthToDataLayer(): Result<Unit> {
... | @@ -25,6 +25,10 @@ constructor(
private val syncManager: SyncManager,
private val tokenBundleRepository: TokenBundleRepository<WatchSyncAuthData?>,
) {
+ companion object {
+ private const val TAG = "WatchSync"
+ }
+
/**
* This should be called by the phone app to update the refresh t... | modules/features/account/src/main/java/au/com/shiftyjelly/pocketcasts/account/watchsync/WatchSync.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Q1 Quality] WearOS - Improve wear-related logging on phone side | 4,955 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek | |
@Test
fun `fail to download episode on invalid url failure`() {
val result = downloader.download(
episode = episode.copy(downloadUrl = "this-is-not-url"),
downloadFile = tempDir.newFile("file.mp3"),
tempFile = tempDir.newFile("file.tmp"),
)
assertEqua... | No issues found. | @Test
fun `fail to download episode on invalid url failure`() {
val result = downloader.download(
episode = episode.copy(downloadUrl = "this-is-not-url"),
downloadFile = tempDir.newFile("file.mp3"),
tempFile = tempDir.newFile("file.tmp"),
)
assertEqua... | @@ -0,0 +1,219 @@
+package au.com.shiftyjelly.pocketcasts.repositories.download
+
+import app.cash.turbine.test
+import au.com.shiftyjelly.pocketcasts.models.entity.PodcastEpisode
+import au.com.shiftyjelly.pocketcasts.repositories.download.EpisodeDownloader.Result
+import java.util.Date
+import junit.framework.TestCas... | modules/services/repositories/src/test/java/au/com/shiftyjelly/pocketcasts/repositories/download/EpisodeDownloaderTest.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | Add episode downloader | 4,956 | Automattic/pocket-casts-android | 1,688 | Kotlin | MiSikora | |
@Inject lateinit var episodeManager: EpisodeManager
@Inject lateinit var notificationHelper: NotificationHelper
@Inject lateinit var playbackManager: PlaybackManager
@Inject lateinit var podcastManager: PodcastManager
@Inject lateinit var settings: Settings
@Inject lateinit var userManager... | No issues found. |
@Inject lateinit var episodeManager: EpisodeManager
@Inject lateinit var notificationHelper: NotificationHelper
@Inject lateinit var playbackManager: PlaybackManager
@Inject lateinit var podcastManager: PodcastManager
@Inject lateinit var settings: Settings
@Inject lateinit var userManager... | @@ -21,6 +21,7 @@ import au.com.shiftyjelly.pocketcasts.shared.DownloadStatisticsReporter
import au.com.shiftyjelly.pocketcasts.utils.TimberDebugTree
import au.com.shiftyjelly.pocketcasts.utils.log.LogBuffer
import au.com.shiftyjelly.pocketcasts.utils.log.RxJavaUncaughtExceptionHandling
+import au.com.shiftyjelly.po... | wear/src/main/kotlin/au/com/shiftyjelly/pocketcasts/wear/PocketCastsWearApplication.kt | 0 | Kotlin | 1 | none | 16 | 51 | 51 | true | [Q1 Quality] WearOS - monitor connectivity changes | 4,959 | Automattic/pocket-casts-android | 1,688 | Kotlin | sztomek |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.