before_code stringlengths 30 149k | reviewer_comment stringlengths 16 20.6k | after_code stringlengths 30 163k | diff_context stringlengths 0 22.4k | file_path stringlengths 6 155 | comment_line int64 0 26 | language stringclasses 19
values | quality_score float64 0.07 1 | comment_type stringclasses 9
values | comment_length int64 16 20.6k | before_lines int64 2 4.61k | after_lines int64 2 4.4k | is_negative bool 2
classes | pr_title stringlengths 7 140 | pr_number int64 18 61.2k | repo_name stringclasses 29
values | repo_stars int64 321 56k | repo_language stringclasses 14
values | reviewer_username stringclasses 378
values | author_username stringclasses 739
values | user stringlengths 361 200k | assistant stringlengths 16 20.6k | system stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
.frame(width: 101, height: 101)
VStack(alignment: .leading) {
HStack {
Text(podcast.title ?? "")
.foregroundStyle(theme.primaryText01)
.font(.subheadline.weight(.medium))
.lineLimit(2)... | This height cap uses a hardcoded `8.0` that must match the `VStack(spacing: 8)` used for the paired rows. If either value changes, the two-row layout can become misaligned or leave extra space. Consider deriving this from a shared constant (and/or from the actual spacing used) instead of duplicating the literal. | @ViewBuilder
func row(for podcast: DiscoverPodcast) -> some View {
HStack(alignment: .center, spacing: 0) {
PodcastImageViewWrapper(podcastUUID: podcast.uuid ?? "", size: .grid)
.frame(width: (adjustedRowHeight / 2) - 4, height: (adjustedRowHeight / 2) - 4)
Spacer... | @@ -105,6 +113,7 @@ struct HorizontalCollectionList: View {
model.subscribePodcast(podcast)
}
}
+ .frame(maxHeight: (maxRowHeight - 8.0) / 2.0) | podcasts/HorizontalCollectionList.swift | 26 | Swift | 0.643 | suggestion | 313 | 51 | 51 | false | [Dynamic type] Discover network highlight cell | 3,979 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/HorizontalCollectionList.swift
PR Title: [Dynamic type] Discover network highlight cell
BEFORE CODE: .frame(width: 101, height: 101)
VStack(alignment: .leading) {
HStack {
Text(podcast.tit... | This height cap uses a hardcoded `8.0` that must match the `VStack(spacing: 8)` used for the paired rows. If either value changes, the two-row layout can become misaligned or leave extra space. Consider deriving this from a shared constant (and/or from the actual spacing used) instead of duplicating the literal. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
@EnvironmentObject var theme: Theme
@ScaledMetric(relativeTo: .largeTitle) var maxHeight = CGFloat(323)
@ScaledMetric(relativeTo: .largeTitle) var maxRowHeight = CGFloat(210)
var header: some View {
WrappingHStack {
Text(model.type)
.foregroundStyle(theme.primaryTe... | `VStack()` defaults to non-zero spacing, so the added outer `VStack` introduces extra vertical gaps around the poster `ZStack` (in addition to the `Spacer()`s). If the intent is purely to vertically center the poster without adding fixed padding, set `spacing: 0` (or remove the extra stack) to avoid unintended layout c... | @EnvironmentObject var theme: Theme
@ScaledMetric(relativeTo: .largeTitle) var scaledHeight = CGFloat(323)
@ScaledMetric(relativeTo: .largeTitle) var scaledRowHeight = CGFloat(210)
var adjustedHeight: CGFloat {
return max(323, scaledHeight)
}
var adjustedRowHeight: CGFloat {
... | @@ -28,51 +32,55 @@ struct HorizontalCollectionList: View {
}
var poster: some View {
- ZStack(alignment: .bottom) {
- AsyncImage(url: model.posterImage) { image in
- image
- .resizable()
- .scaledToFill()
- } placeholder: {
-... | podcasts/HorizontalCollectionList.swift | 26 | Swift | 0.857 | suggestion | 411 | 51 | 51 | false | [Dynamic type] Discover network highlight cell | 3,979 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/HorizontalCollectionList.swift
PR Title: [Dynamic type] Discover network highlight cell
BEFORE CODE: @EnvironmentObject var theme: Theme
@ScaledMetric(relativeTo: .largeTitle) var maxHeight = CGFloat(323)
@ScaledMetric(relativeTo: .largeT... | `VStack()` defaults to non-zero spacing, so the added outer `VStack` introduces extra vertical gaps around the poster `ZStack` (in addition to the `Spacer()`s). If the intent is purely to vertically center the poster without adding fixed padding, set `spacing: 0` (or remove the extra stack) to avoid unintended layout c... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import SwiftUI
import Foundation
import WrappingHStack
import PocketCastsServer
struct HorizontalCollectionList: View {
@ObservedObject var model: HorizontalCollectionModel
@EnvironmentObject var theme: Theme
@ScaledMetric(relativeTo: .largeTitle) var maxHeight = CGFloat(323)
@ScaledMetric(relative... | `@ScaledMetric` will also scale *down* for smaller Dynamic Type sizes. Since the list layout has a hard minimum height requirement (2 rows of 101pt + 8pt spacing = 210pt), allowing `maxRowHeight` to shrink below 210 will clip the rows/poster. Consider clamping the effective row height to >= 210 (e.g., via a computed `e... | import SwiftUI
import Foundation
import WrappingHStack
import PocketCastsServer
struct HorizontalCollectionList: View {
@ObservedObject var model: HorizontalCollectionModel
@EnvironmentObject var theme: Theme
@ScaledMetric(relativeTo: .largeTitle) var scaledHeight = CGFloat(323)
@ScaledMetric(relat... | @@ -9,8 +9,12 @@ struct HorizontalCollectionList: View {
@EnvironmentObject var theme: Theme
+ @ScaledMetric(relativeTo: .largeTitle) var maxHeight = CGFloat(323)
+
+ @ScaledMetric(relativeTo: .largeTitle) var maxRowHeight = CGFloat(210)
+ | podcasts/HorizontalCollectionList.swift | 15 | Swift | 0.786 | suggestion | 399 | 40 | 40 | false | [Dynamic type] Discover network highlight cell | 3,979 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/HorizontalCollectionList.swift
PR Title: [Dynamic type] Discover network highlight cell
BEFORE CODE: import SwiftUI
import Foundation
import WrappingHStack
import PocketCastsServer
struct HorizontalCollectionList: View {
@ObservedObject var model... | `@ScaledMetric` will also scale *down* for smaller Dynamic Type sizes. Since the list layout has a hard minimum height requirement (2 rows of 101pt + 8pt spacing = 210pt), allowing `maxRowHeight` to shrink below 210 will clip the rows/poster. Consider clamping the effective row height to >= 210 (e.g., via a computed `e... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import Foundation
import PocketCastsDataModel
import PocketCastsServer
import PocketCastsUtils
extension AppDelegate {
func checkDefaults() {
let defaults = UserDefaults.standard
let dataManager = DataManager.sharedManager
performUpdateIfRequired(updateKey: "v5Run") {
// these ... | This early return skips ALL migrations when protected data is unavailable, not just the ones that access the keychain (v5Run and v7_11Run). While this is a conservative approach that prevents the keychain access issue, it also delays other migrations that only access UserDefaults.
A more optimal approach would be to c... | import Foundation
import PocketCastsDataModel
import PocketCastsServer
import PocketCastsUtils
extension AppDelegate {
func checkDefaults() {
let defaults = UserDefaults.standard
let dataManager = DataManager.sharedManager
// Check if protected data is available before running migrations t... | @@ -8,6 +8,16 @@ extension AppDelegate {
let defaults = UserDefaults.standard
let dataManager = DataManager.sharedManager
+ // Check if protected data is available before running migrations that touch keychain
+ // This prevents the v5Run migration from incorrectly clearing tokens when... | podcasts/AppDelegate+Defaults.swift | 19 | Swift | 0.643 | suggestion | 627 | 44 | 44 | false | Skip migrations when User Defaults is unavailable | 3,983 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/AppDelegate+Defaults.swift
PR Title: Skip migrations when User Defaults is unavailable
BEFORE CODE: import Foundation
import PocketCastsDataModel
import PocketCastsServer
import PocketCastsUtils
extension AppDelegate {
func checkDefaults() {
... | This early return skips ALL migrations when protected data is unavailable, not just the ones that access the keychain (v5Run and v7_11Run). While this is a conservative approach that prevents the keychain access issue, it also delays other migrations that only access UserDefaults.
A more optimal approach would be to c... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import Foundation
import PocketCastsDataModel
import PocketCastsServer
import PocketCastsUtils
extension AppDelegate {
func checkDefaults() {
let defaults = UserDefaults.standard
let dataManager = DataManager.sharedManager
performUpdateIfRequired(updateKey: "v5Run") {
// these ... | The comment states "Check if protected data is available" but the PR title says "Skip migrations when User Defaults is unavailable". UserDefaults is typically always available even when the device is locked - it's the keychain that becomes unavailable. Consider updating the PR title to accurately reflect that this is a... | import Foundation
import PocketCastsDataModel
import PocketCastsServer
import PocketCastsUtils
extension AppDelegate {
func checkDefaults() {
let defaults = UserDefaults.standard
let dataManager = DataManager.sharedManager
// Check if protected data is available before running migrations t... | @@ -8,6 +8,16 @@ extension AppDelegate {
let defaults = UserDefaults.standard
let dataManager = DataManager.sharedManager
+ // Check if protected data is available before running migrations that touch keychain
+ // This prevents the v5Run migration from incorrectly clearing tokens when... | podcasts/AppDelegate+Defaults.swift | 13 | Swift | 0.5 | suggestion | 395 | 38 | 38 | false | Skip migrations when User Defaults is unavailable | 3,983 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/AppDelegate+Defaults.swift
PR Title: Skip migrations when User Defaults is unavailable
BEFORE CODE: import Foundation
import PocketCastsDataModel
import PocketCastsServer
import PocketCastsUtils
extension AppDelegate {
func checkDefaults() {
... | The comment states "Check if protected data is available" but the PR title says "Skip migrations when User Defaults is unavailable". UserDefaults is typically always available even when the device is locked - it's the keychain that becomes unavailable. Consider updating the PR title to accurately reflect that this is a... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
.background(theme.primaryInteractive01)
.cornerRadius(800)
.overlay(
RoundedRectangle(cornerRadius: 800)
.inset(by: 0.5)
.stroke(.white.opacity(0.08), lineWidth: 1)
)
}
var actionButton: some View {
SubscriptionPurchaseButton(v... | The style parameter should remain `.caption2` instead of being changed to `.largeTitle`. This change appears to be unintentional and will make the terms and conditions text much larger than intended. If the intent was to limit the maximum size for accessibility, add the `maxSizeCategory` parameter like the other change... | .background(theme.primaryInteractive01)
.cornerRadius(800)
.overlay(
RoundedRectangle(cornerRadius: 800)
.inset(by: 0.5)
.stroke(.white.opacity(0.08), lineWidth: 1)
)
}
var actionButton: some View {
SubscriptionPurchaseButton(v... | @@ -106,7 +106,7 @@ struct UpgradeProductsView: View {
.multilineTextAlignment(.center)
.foregroundColor(theme.primaryText02)
.tint(theme.primaryText02)
- .font(size: 11, style: .caption2, weight: .semibold)
+ .font(size: 11, style: .largeTitle, weight: .semibold) | podcasts/Onboarding/Plus/NewUpgrade/UpgradeProductsView.swift | 26 | Swift | 0.857 | suggestion | 562 | 51 | 51 | false | [Dynamic type] Upgrade view - limit maximum sizes | 3,987 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/Onboarding/Plus/NewUpgrade/UpgradeProductsView.swift
PR Title: [Dynamic type] Upgrade view - limit maximum sizes
BEFORE CODE: .background(theme.primaryInteractive01)
.cornerRadius(800)
.overlay(
RoundedRectangle(corn... | The style parameter should remain `.caption2` instead of being changed to `.largeTitle`. This change appears to be unintentional and will make the terms and conditions text much larger than intended. If the intent was to limit the maximum size for accessibility, add the `maxSizeCategory` parameter like the other change... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import UIKit
class ShelfCell: UITableViewCell {
@IBOutlet var actionName: ThemeableLabel! {
didSet {
actionName.style = .playerContrast01
actionName.font = .font(ofSize: 18, weight: .medium, scalingWith: .headline)
}
}
@IBOutlet var actionSubtitle: ThemeableLabel! {... | In `actionSubtitle`'s `didSet`, the font is being applied to `actionName` instead of `actionSubtitle`, so the subtitle never gets the intended Dynamic Type font (and the title font gets overwritten). Set the font on `actionSubtitle` here.
```suggestion
actionSubtitle.font = .font(ofSize: 14, weight: .regula... | import UIKit
class ShelfCell: UITableViewCell {
@IBOutlet var actionName: ThemeableLabel! {
didSet {
actionName.style = .playerContrast01
actionName.font = .font(ofSize: 18, weight: .medium, scalingWith: .headline)
}
}
@IBOutlet var actionSubtitle: ThemeableLabel! {... | @@ -4,12 +4,14 @@ class ShelfCell: UITableViewCell {
@IBOutlet var actionName: ThemeableLabel! {
didSet {
actionName.style = .playerContrast01
+ actionName.font = .font(ofSize: 18, weight: .medium, scalingWith: .headline)
}
}
@IBOutlet var actionSubtitle: Theme... | podcasts/ShelfCell.swift | 14 | Swift | 1 | suggestion | 353 | 39 | 39 | false | [Dynamic type] Update player more options | 3,993 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/ShelfCell.swift
PR Title: [Dynamic type] Update player more options
BEFORE CODE: import UIKit
class ShelfCell: UITableViewCell {
@IBOutlet var actionName: ThemeableLabel! {
didSet {
actionName.style = .playerContrast01
... | In `actionSubtitle`'s `didSet`, the font is being applied to `actionName` instead of `actionSubtitle`, so the subtitle never gets the intended Dynamic Type font (and the title font gets overwritten). Set the font on `actionSubtitle` here.
```suggestion
actionSubtitle.font = .font(ofSize: 14, weight: .regula... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
updateSleepRemainingTime()
Analytics.track(.playerSleepTimerExtended, properties: ["amount": Int(5.minutes)])
}
@IBAction func closeTapped(_ sender: Any) {
dismiss(animated: true, completion: nil)
}
@objc private func customTimeDidChange() {
Settings.setCustomSleepTime(... | The doc comment for `MultiLineButton` is grammatically unclear (e.g., “properly resize Multiline button”, “force rescale”). Please rewrite it to clearly describe what the class does and why overriding `intrinsicContentSize`/invalidating it in `layoutSubviews` is necessary.
```suggestion
/// A UIButton subclass that cor... | @IBAction func plusFiveTapped(_ sender: Any) {
PlaybackManager.shared.sleepTimeRemaining += 5.minutes
updateSleepRemainingTime()
Analytics.track(.playerSleepTimerExtended, properties: ["amount": Int(5.minutes)])
}
@IBAction func closeTapped(_ sender: Any) {
dismiss(animated:... | @@ -361,3 +380,46 @@ class SleepTimerViewController: SimpleNotificationsViewController {
.portrait
}
}
+
+/// Class that implements a properly resize Multiline button to use inside StackView that can force rescale of the StackView when it expands | podcasts/SleepTimerViewController.swift | 26 | Swift | 0.786 | suggestion | 649 | 51 | 51 | false | [Dynamic type] - Player sleep timer | 3,997 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/SleepTimerViewController.swift
PR Title: [Dynamic type] - Player sleep timer
BEFORE CODE: updateSleepRemainingTime()
Analytics.track(.playerSleepTimerExtended, properties: ["amount": Int(5.minutes)])
}
@IBAction func closeTappe... | The doc comment for `MultiLineButton` is grammatically unclear (e.g., “properly resize Multiline button”, “force rescale”). Please rewrite it to clearly describe what the class does and why overriding `intrinsicContentSize`/invalidating it in `layoutSubviews` is necessary.
```suggestion
/// A UIButton subclass that cor... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
return cell
}
let nib = UINib(nibName: "FilterNameCell", bundle: nil)
let objects = nib.instantiate(withOwner: nil, options: nil)
if let cell = objects.first as? FilterNameCell {
return cell
}
}
return nil
}
... | The dismiss callback reloads the table immediately, but `InformationalBannerViewCoordinator.dismissBanner()` invokes `onDismissBanner` *before* it updates `Settings.dismissBanner(...)`. That means this `reloadData()` can run while `shouldShowBanner()` is still true, causing the banner header to be recreated and not dis... | return cell
}
let nib = UINib(nibName: "FilterNameCell", bundle: nil)
let objects = nib.instantiate(withOwner: nil, options: nil)
if let cell = objects.first as? FilterNameCell {
return cell
}
}
return nil
}
... | @@ -89,7 +89,30 @@ extension PlaylistsViewController: UITableViewDelegate, UITableViewDataSource {
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
- CGFloat.leastNormalMagnitude
+ if informationalBannerCoordinator.shouldShowBanner() {
+ ... | podcasts/PlaylistsViewController+Table.swift | 26 | Swift | 0.857 | suggestion | 727 | 51 | 51 | false | [Dynamic Type] Account creation banner in section header to allow dynamic resize | 4,001 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/PlaylistsViewController+Table.swift
PR Title: [Dynamic Type] Account creation banner in section header to allow dynamic resize
BEFORE CODE: return cell
}
let nib = UINib(nibName: "FilterNameCell", bundle: nil)
... | The dismiss callback reloads the table immediately, but `InformationalBannerViewCoordinator.dismissBanner()` invokes `onDismissBanner` *before* it updates `Settings.dismissBanner(...)`. That means this `reloadData()` can run while `shouldShowBanner()` is still true, causing the banner header to be recreated and not dis... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
} else {
if let cell = tableView.dequeueReusableCell(withIdentifier: identifier) as? FilterNameCell {
return cell
}
let nib = UINib(nibName: "FilterNameCell", bundle: nil)
let objects = nib.instantiate(withOwner: nil, options: nil)
if l... | `viewForHeaderInSection` receives the `tableView` instance; using `tableView.bounds.width` here would be more robust than referencing `filtersTable` directly (avoids relying on the outlet and ensures correct sizing if this delegate is ever reused with a different table view or during early layout).
```suggestion
... | } else {
if let cell = tableView.dequeueReusableCell(withIdentifier: identifier) as? FilterNameCell {
return cell
}
let nib = UINib(nibName: "FilterNameCell", bundle: nil)
let objects = nib.instantiate(withOwner: nil, options: nil)
if l... | @@ -89,7 +89,30 @@ extension PlaylistsViewController: UITableViewDelegate, UITableViewDataSource {
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
- CGFloat.leastNormalMagnitude
+ if informationalBannerCoordinator.shouldShowBanner() {
+ ... | podcasts/PlaylistsViewController+Table.swift | 26 | Swift | 0.857 | suggestion | 439 | 51 | 51 | false | [Dynamic Type] Account creation banner in section header to allow dynamic resize | 4,001 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/PlaylistsViewController+Table.swift
PR Title: [Dynamic Type] Account creation banner in section header to allow dynamic resize
BEFORE CODE: } else {
if let cell = tableView.dequeueReusableCell(withIdentifier: identifier) as? FilterN... | `viewForHeaderInSection` receives the `tableView` instance; using `tableView.bounds.width` here would be more robust than referencing `filtersTable` directly (avoids relying on the outlet and ensures correct sizing if this delegate is ever reused with a different table view or during early layout).
```suggestion
... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
Analytics.track(.filterCreated)
Analytics.track(.filterCreateAsManualPlaylistTapped)
if Settings.firstTimePlaylistCreated {
Settings.shouldShowDragAndDropTip = true
}
// Dismiss all presented view controllers and show snackbar with navigatio... | The `1000` should be a constant defined in the system that we could refer when checking for this limit. |
Analytics.track(.filterCreated)
Analytics.track(.filterCreateAsManualPlaylistTapped)
if Settings.firstTimePlaylistCreated {
Settings.shouldShowDragAndDropTip = true
}
// Dismiss all presented view controllers and show snackbar with navigatio... | @@ -245,6 +248,45 @@ class NewPlaylistViewController: PCViewController {
Settings.shouldShowDragAndDropTip = true
}
+ // Dismiss all presented view controllers and show snackbar with navigation action
+ if let rootVC = SceneHelper.rootViewController(includeTopMost: ... | podcasts/New Creation/New Playlist/NewPlaylistViewController.swift | 26 | Swift | 0.571 | suggestion | 103 | 51 | 51 | false | Add episodes to a playlist from multi-select overflow menu | 4,002 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | yaelirub | Review this pull request change.
Language: Swift
File: podcasts/New Creation/New Playlist/NewPlaylistViewController.swift
PR Title: Add episodes to a playlist from multi-select overflow menu
BEFORE CODE:
Analytics.track(.filterCreated)
Analytics.track(.filterCreateAsManualPlaylistTapped)
... | The `1000` should be a constant defined in the system that we could refer when checking for this limit. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
} else {
initialSelectedPlaylists = []
}
newSelectedPlaylists = initialSelectedPlaylists
}
private func addCloseButton() {
let closeButton = createStandardCloseButton(imageName: "cancel")
closeButton.target = self
closeButton.action = #selector(closeT... | This should also use the `Constants.Limits.maxFilterItems` | } else {
initialSelectedPlaylists = []
}
newSelectedPlaylists = initialSelectedPlaylists
}
private func addCloseButton() {
let closeButton = createStandardCloseButton(imageName: "cancel")
closeButton.target = self
closeButton.action = #selector(closeT... | @@ -159,13 +167,24 @@ class ManualPlaylistsChooserViewController: PCViewController {
var changedPlaylists: Set<EpisodeFilter> = []
+ let maxPlaylistItems = 1000 | podcasts/New Detail/Episode Add/ManualPlaylistsChooserViewController.swift | 26 | Swift | 0.429 | suggestion | 58 | 51 | 51 | false | Add episodes to a playlist from multi-select overflow menu | 4,002 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | yaelirub | Review this pull request change.
Language: Swift
File: podcasts/New Detail/Episode Add/ManualPlaylistsChooserViewController.swift
PR Title: Add episodes to a playlist from multi-select overflow menu
BEFORE CODE: } else {
initialSelectedPlaylists = []
}
newSelectedPlaylists = init... | This should also use the `Constants.Limits.maxFilterItems` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
didSet {
statusImage.tintColor = AppTheme.colorForStyle(.support02)
}
}
@IBOutlet var emailBorderView: ThemeableSelectionView! {
didSet {
emailBorderView.layer.borderWidth = 2
emailBorderView.layer.cornerRadius = 6
emailBorderView.style = ... | There’s trailing whitespace at the end of this line. Please remove it to avoid noisy diffs and style issues.
```suggestion
infoLabel.text = "• " + L10n.changePasswordLengthError
``` | didSet {
statusImage.tintColor = AppTheme.colorForStyle(.support02)
}
}
@IBOutlet var emailBorderView: ThemeableSelectionView! {
didSet {
emailBorderView.layer.borderWidth = 2
emailBorderView.layer.cornerRadius = 6
emailBorderView.style = ... | @@ -57,7 +65,7 @@ class NewEmailViewController: PCViewController, UITextFieldDelegate {
@IBOutlet var infoLabel: ThemeableLabel! {
didSet {
- infoLabel.text = "• " + L10n.changePasswordLengthError
+ infoLabel.text = "• " + L10n.changePasswordLengthError | podcasts/NewEmailViewController.swift | 26 | Swift | 0.929 | suggestion | 193 | 51 | 51 | false | [Dynamic Type] Login polish | 4,006 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/NewEmailViewController.swift
PR Title: [Dynamic Type] Login polish
BEFORE CODE: didSet {
statusImage.tintColor = AppTheme.colorForStyle(.support02)
}
}
@IBOutlet var emailBorderView: ThemeableSelectionView! {
... | There’s trailing whitespace at the end of this line. Please remove it to avoid noisy diffs and style issues.
```suggestion
infoLabel.text = "• " + L10n.changePasswordLengthError
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
if let borderColor {
$0.overlay {
RoundedRectangle(cornerRadius: ViewConstants.buttonCornerRadius)
.stroke(borderColor)
}
} else {
$0
}
}
}
}
s... | `RoundedButtonStyle` now defaults `maxContentSizeCategory` to `.extraExtraExtraLarge`, which is *below* the accessibility categories. Previously, `RoundedButtonStyle(theme: ...)` inherited `applyButtonFont()`’s cap (`.accessibilityExtraExtraLarge`). This change will prevent many existing rounded buttons from scaling fo... | if let borderColor {
$0.overlay {
RoundedRectangle(cornerRadius: ViewConstants.buttonCornerRadius)
.stroke(borderColor)
}
} else {
$0
}
}
}
}
s... | @@ -176,12 +178,14 @@ struct RoundedButtonStyle: ButtonStyle {
let textColor: ThemeStyle
let backgroundColor: Color?
let isEnabled: Bool?
+ let maxContentSizeCategory: UIContentSizeCategory
- init(theme: Theme, textColor: ThemeStyle = .primaryInteractive02, backgroundColor: Color? = nil, isEnable... | podcasts/Styles.swift | 26 | Swift | 0.643 | suggestion | 506 | 51 | 51 | false | [Dynamic type] Change email | 4,009 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/Styles.swift
PR Title: [Dynamic type] Change email
BEFORE CODE: if let borderColor {
$0.overlay {
RoundedRectangle(cornerRadius: ViewConstants.buttonCornerRadius)
.... | `RoundedButtonStyle` now defaults `maxContentSizeCategory` to `.extraExtraExtraLarge`, which is *below* the accessibility categories. Previously, `RoundedButtonStyle(theme: ...)` inherited `applyButtonFont()`’s cap (`.accessibilityExtraExtraLarge`). This change will prevent many existing rounded buttons from scaling fo... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
private func updateButtonState() {
mainButton.isEnabled = validFields()
statusImage.isHidden = !validFields()
mainButton.buttonStyle = mainButton.isEnabled ? .primaryInteractive01 : .primaryInteractive01Disabled
}
private func validFields() -> Bool {
if let email = emailFie... | `originalButtonConstant` is now unused after switching keyboard handling to `scrollView.contentInset`. Please remove this property to avoid dead code and confusion about how the layout is adjusted.
```suggestion
``` |
private func updateButtonState() {
mainButton.isEnabled = validFields()
statusImage.isHidden = !validFields()
mainButton.buttonStyle = mainButton.isEnabled ? .primaryInteractive01 : .primaryInteractive01Disabled
}
private func validFields() -> Bool {
if let email = emailFie... | @@ -269,7 +279,7 @@ class ChangeEmailViewController: PCViewController, UITextFieldDelegate {
private var originalButtonConstant: CGFloat = 60 | podcasts/ChangeEmailViewController.swift | 26 | Swift | 0.857 | refactor | 216 | 51 | 51 | false | [Dynamic type] Change email | 4,009 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/ChangeEmailViewController.swift
PR Title: [Dynamic type] Change email
BEFORE CODE:
private func updateButtonState() {
mainButton.isEnabled = validFields()
statusImage.isHidden = !validFields()
mainButton.buttonStyle = mainB... | `originalButtonConstant` is now unused after switching keyboard handling to `scrollView.contentInset`. Please remove this property to avoid dead code and confusion about how the layout is adjusted.
```suggestion
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
}
private func validFields() -> Bool {
guard let currentPassword = currentField.text, let newPassword = newField.text, let confirmPassword = confirmField.text, currentPassword.count > 5, newPassword.count > 5, confirmPassword.count > 5 else {
errorView.isHidden = true
return fal... | `originalButtonConstant` is now unused after switching from a bottom constraint to `scrollView.contentInset` for keyboard handling. Please remove this property (and any related logic) to avoid dead code / warnings. | mainButton.isEnabled = validFields()
mainButton.buttonStyle = mainButton.isEnabled ? .primaryInteractive01 : .primaryInteractive01Disabled
}
private func validFields() -> Bool {
guard let currentPassword = currentField.text, let newPassword = newField.text, let confirmPassword = confirm... | @@ -315,7 +317,7 @@ class ChangePasswordViewController: PCViewController, UITextFieldDelegate {
private var originalButtonConstant: CGFloat = 49
@objc func keyboardWillShow(notification: NSNotification) {
if let keyboardSize = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSVal... | podcasts/ChangePasswordViewController.swift | 26 | Swift | 0.643 | refactor | 214 | 51 | 51 | false | [Dynamic Type] Update Change password | 4,011 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/ChangePasswordViewController.swift
PR Title: [Dynamic Type] Update Change password
BEFORE CODE: }
private func validFields() -> Bool {
guard let currentPassword = currentField.text, let newPassword = newField.text, let confirmPassword ... | `originalButtonConstant` is now unused after switching from a bottom constraint to `scrollView.contentInset` for keyboard handling. Please remove this property (and any related logic) to avoid dead code / warnings. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
if let cachedResponse = cache.cachedResponse(for: request),
let metadata = extractMetadata(for: episodeUuid, from: cachedResponse.data) {
FileLog.shared.addMessage("Show Info: returning cached data for episode \(episodeUuid)")
return metadata
}
... | Consider adding NSURLErrorTimedOut to the list of network unavailable errors. A timeout error could also indicate temporary network issues where falling back to cache would be appropriate, rather than failing the request entirely. This would improve offline resilience.
```suggestion
nsError.code == NSURLErr... |
if let cachedResponse = cache.cachedResponse(for: request),
let metadata = extractMetadata(for: episodeUuid, from: cachedResponse.data) {
FileLog.shared.addMessage("Show Info: returning cached data for episode \(episodeUuid)")
return metadata
}
... | @@ -26,9 +31,27 @@ public actor ShowInfoDataRetriever {
FileLog.shared.addMessage("Show Info: returning cached data for episode \(episodeUuid)")
return metadata
}
+ return nil
}
- return try await loadEpisodeData(for: podcastUuid, episodeUuid: ... | Modules/Server/Sources/PocketCastsServer/Public/Cache/ShowInfoDataRetriever.swift | 26 | Swift | 1 | bug | 390 | 51 | 51 | false | Episode artwork network handling + prefer Show Notes image | 4,017 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | bjtitus | Review this pull request change.
Language: Swift
File: Modules/Server/Sources/PocketCastsServer/Public/Cache/ShowInfoDataRetriever.swift
PR Title: Episode artwork network handling + prefer Show Notes image
BEFORE CODE:
if let cachedResponse = cache.cachedResponse(for: request),
let meta... | Consider adding NSURLErrorTimedOut to the list of network unavailable errors. A timeout error could also indicate temporary network issues where falling back to cache would be appropriate, rather than failing the request entirely. This would improve offline resilience.
```suggestion
nsError.code == NSURLErr... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
/// Attempts to load episode artwork with the following priority (matching Android):
/// 1. Show notes image URL from the server (publisher intent takes precedence)
/// 2. Embedded artwork from the AVAsset (ID3 tags)
/// If an image is retrieved, `episodeEmbeddedArtworkLoaded` notification is triggered
... | The Task created here is not retained or tracked, which could lead to potential issues if loadEmbeddedImage is called multiple times rapidly for the same episode. Consider storing and checking for in-progress tasks by episodeUuid to prevent redundant network requests and race conditions where multiple requests try to s... | self.imageManager = imageManager
}
/// Attempts to load episode artwork with the following priority (matching Android):
/// 1. Show notes image URL from the server (publisher intent takes precedence)
/// 2. Embedded artwork from the AVAsset (ID3 tags)
/// If an image is retrieved, `episodeE... | @@ -25,12 +25,19 @@ class EpisodeArtwork {
return
}
- if let assetEpisodeArtwork = loadEpisodeArtwork(from: asset) {
- imageManager.save(assetEpisodeArtwork, for: episodeUuid)
- return
- }
+ Task { [weak self] in
+ guard let self else { retur... | podcasts/EpisodeArtwork.swift | 26 | Swift | 0.643 | bug | 475 | 51 | 51 | false | Episode artwork network handling + prefer Show Notes image | 4,017 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/EpisodeArtwork.swift
PR Title: Episode artwork network handling + prefer Show Notes image
BEFORE CODE: /// Attempts to load episode artwork with the following priority (matching Android):
/// 1. Show notes image URL from the server (publisher i... | The Task created here is not retained or tracked, which could lead to potential issues if loadEmbeddedImage is called multiple times rapidly for the same episode. Consider storing and checking for in-progress tasks by episodeUuid to prevent redundant network requests and race conditions where multiple requests try to s... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
/// - podcastUuid: The podcast UUID
/// - episodeUuid: The episode UUID
/// - useCacheOnly: If true, skip the network request and only check cache
public func loadEpisodeDataFromCache(
for podcastUuid: String,
episodeUuid: String,
useCacheOnly: Bool = false
) async thro... | The recursive call to loadEpisodeDataFromCache with useCacheOnly: true could be more clearly implemented. Consider extracting the cache-only logic into a separate helper method like loadEpisodeDataFromCacheOnly to make the code flow clearer and avoid the confusion of a recursive call with a flag change. This would also... | /// - podcastUuid: The podcast UUID
/// - episodeUuid: The episode UUID
/// - useCacheOnly: If true, skip the network request and only check cache
public func loadEpisodeDataFromCache(
for podcastUuid: String,
episodeUuid: String,
useCacheOnly: Bool = false
) async thro... | @@ -26,9 +31,27 @@ public actor ShowInfoDataRetriever {
FileLog.shared.addMessage("Show Info: returning cached data for episode \(episodeUuid)")
return metadata
}
+ return nil
}
- return try await loadEpisodeData(for: podcastUuid, episodeUuid: ... | Modules/Server/Sources/PocketCastsServer/Public/Cache/ShowInfoDataRetriever.swift | 26 | Swift | 0.5 | performance | 374 | 51 | 51 | false | Episode artwork network handling + prefer Show Notes image | 4,017 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | bjtitus | Review this pull request change.
Language: Swift
File: Modules/Server/Sources/PocketCastsServer/Public/Cache/ShowInfoDataRetriever.swift
PR Title: Episode artwork network handling + prefer Show Notes image
BEFORE CODE: /// - podcastUuid: The podcast UUID
/// - episodeUuid: The episode UUID
/// - u... | The recursive call to loadEpisodeDataFromCache with useCacheOnly: true could be more clearly implemented. Consider extracting the cache-only logic into a separate helper method like loadEpisodeDataFromCacheOnly to make the code flow clearer and avoid the confusion of a recursive call with a flag change. This would also... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
}
}
@IBOutlet var rightActionButton: UIButton! {
didSet {
rightActionButton.backgroundColor = ThemeColor.primaryInteractive01()
rightActionButton.setImage(UIImage(named: "more"), for: .normal)
rightActionButton.tintColor = ThemeColor.primaryInteractive02()
... | The `ensureButtonImage` method sets constraints on `button.imageView`, but UIButton's imageView property may be nil or not fully initialized at the time this method is called in the didSet blocks. The imageView is lazily created by UIButton, and accessing it before the view is laid out can lead to undefined behavior. A... | }
}
@IBOutlet var rightActionButton: UIButton! {
didSet {
rightActionButton.backgroundColor = ThemeColor.primaryInteractive01()
rightActionButton.setImage(UIImage(named: "more"), for: .normal)
rightActionButton.tintColor = ThemeColor.primaryInteractive02()
... | @@ -49,9 +50,24 @@ class MultiSelectFooterView: UIView, MultiSelectActionOrderDelegate {
rightActionButton.setImage(UIImage(named: "more"), for: .normal)
rightActionButton.tintColor = ThemeColor.primaryInteractive02()
rightActionButton.layer.cornerRadius = 18
+ ensureBu... | podcasts/MultiSelectFooterView.swift | 26 | Swift | 0.786 | bug | 672 | 51 | 51 | false | Multi-select actions menu and icon size | 4,020 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/MultiSelectFooterView.swift
PR Title: Multi-select actions menu and icon size
BEFORE CODE: }
}
@IBOutlet var rightActionButton: UIButton! {
didSet {
rightActionButton.backgroundColor = ThemeColor.primaryInteractive0... | The `ensureButtonImage` method sets constraints on `button.imageView`, but UIButton's imageView property may be nil or not fully initialized at the time this method is called in the didSet blocks. The imageView is lazily created by UIButton, and accessing it before the view is laid out can lead to undefined behavior. A... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
}
}
@IBOutlet var selectedCountLabel: ThemeableLabel! {
didSet {
selectedCountLabel.themeOverride = themeOverride
}
}
@IBOutlet var moreButton: UIButton! {
didSet {
moreButton.backgroundColor = ThemeColor.primaryInteractive01()
moreBu... | The `ensureButtonImage` method is being called in the didSet blocks for leftActionButton and rightActionButton, which are triggered when the outlets are connected from the XIB/Storyboard. However, this method will only be called once during initial setup. When the button images are changed later in `loadActions()` (lin... | }
}
@IBOutlet var selectedCountLabel: ThemeableLabel! {
didSet {
selectedCountLabel.themeOverride = themeOverride
}
}
@IBOutlet var moreButton: UIButton! {
didSet {
moreButton.backgroundColor = ThemeColor.primaryInteractive01()
moreBu... | @@ -40,6 +40,7 @@ class MultiSelectFooterView: UIView, MultiSelectActionOrderDelegate {
leftActionButton.setImage(UIImage(named: "more"), for: .normal)
leftActionButton.tintColor = ThemeColor.primaryInteractive02()
leftActionButton.layer.cornerRadius = 18
+ ensureButton... | podcasts/MultiSelectFooterView.swift | 26 | Swift | 0.643 | suggestion | 532 | 51 | 51 | false | Multi-select actions menu and icon size | 4,020 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/MultiSelectFooterView.swift
PR Title: Multi-select actions menu and icon size
BEFORE CODE: }
}
@IBOutlet var selectedCountLabel: ThemeableLabel! {
didSet {
selectedCountLabel.themeOverride = themeOverride
}
... | The `ensureButtonImage` method is being called in the didSet blocks for leftActionButton and rightActionButton, which are triggered when the outlets are connected from the XIB/Storyboard. However, this method will only be called once during initial setup. When the button images are changed later in `loadActions()` (lin... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
moreButton.layer.cornerRadius = 18
moreButton.accessibilityLabel = L10n.accessibilityMoreActions
}
}
@IBOutlet var leftActionButton: UIButton! {
didSet {
leftActionButton.backgroundColor = ThemeColor.primaryInteractive01()
leftActionButton.setImag... | The `size` parameter in the `ensureButtonImage` method is not being used. The method always sets constraints to 24 points (line 64-65), regardless of the size value passed as a parameter. Either use the parameter value or remove it from the function signature. | moreButton.layer.cornerRadius = 18
moreButton.accessibilityLabel = L10n.accessibilityMoreActions
}
}
@IBOutlet var leftActionButton: UIButton! {
didSet {
leftActionButton.backgroundColor = ThemeColor.primaryInteractive01()
leftActionButton.setImag... | @@ -49,9 +50,24 @@ class MultiSelectFooterView: UIView, MultiSelectActionOrderDelegate {
rightActionButton.setImage(UIImage(named: "more"), for: .normal)
rightActionButton.tintColor = ThemeColor.primaryInteractive02()
rightActionButton.layer.cornerRadius = 18
+ ensureBu... | podcasts/MultiSelectFooterView.swift | 26 | Swift | 0.643 | suggestion | 260 | 51 | 51 | false | Multi-select actions menu and icon size | 4,020 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/MultiSelectFooterView.swift
PR Title: Multi-select actions menu and icon size
BEFORE CODE: moreButton.layer.cornerRadius = 18
moreButton.accessibilityLabel = L10n.accessibilityMoreActions
}
}
@IBOutlet var leftA... | The `size` parameter in the `ensureButtonImage` method is not being used. The method always sets constraints to 24 points (line 64-65), regardless of the size value passed as a parameter. Either use the parameter value or remove it from the function signature. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
let episodes = actionDelegate.multiSelectedBaseEpisodes()
orderedActions = orderedActions.filter { $0.isVisible(with: episodes) }
}
private func showAllActions() {
orderedActions = originalActions
let hasOnlyShareableEpisodes = actionDelegate
.multiSelectedBaseEpisod... | The `fittingHeight` property accesses `self.view` which triggers the view loading if it hasn't been loaded yet. However, the check `guard self.view != nil` will always pass after the first access because accessing `self.view` loads the view. This means the function will never return 0 as intended. Consider checking `is... | let episodes = actionDelegate.multiSelectedBaseEpisodes()
orderedActions = orderedActions.filter { $0.isVisible(with: episodes) }
}
private func showAllActions() {
orderedActions = originalActions
let hasOnlyShareableEpisodes = actionDelegate
.multiSelectedBaseEpisod... | @@ -293,4 +293,12 @@ class MultiSelectActionController: UIViewController, UITableViewDelegate, UITabl
orderedActions.append(.addToPlaylist)
}
}
+
+ var fittingHeight: CGFloat {
+ guard self.view != nil else { | podcasts/MultiSelectActionController.swift | 26 | Swift | 0.857 | suggestion | 496 | 33 | 33 | false | Multi-select actions menu and icon size | 4,020 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/MultiSelectActionController.swift
PR Title: Multi-select actions menu and icon size
BEFORE CODE: let episodes = actionDelegate.multiSelectedBaseEpisodes()
orderedActions = orderedActions.filter { $0.isVisible(with: episodes) }
}
... | The `fittingHeight` property accesses `self.view` which triggers the view loading if it hasn't been loaded yet. However, the check `guard self.view != nil` will always pass after the first access because accessing `self.view` loads the view. This means the function will never return 0 as intended. Consider checking `is... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
activityIndicator.isHidden = false
activityIndicator.isHidden = false
activityIndicator.startAnimating()
}
@IBAction func moreTapped(_ sender: Any) {
guard let delegate = delegate else { return }
let actions = getActionsFunc()
let multiSelectActionController = ... | The calculation `max(context.maximumDetentValue * 0.25, multiSelectActionController.fittingHeight)` could result in a height that exceeds `maxHeight` (90% of maximumDetentValue). While this is handled by `min(minHeight, maxHeight)`, the variable name "minHeight" is misleading because it represents the calculated desire... | activityIndicator.isHidden = false
activityIndicator.isHidden = false
activityIndicator.startAnimating()
}
@IBAction func moreTapped(_ sender: Any) {
guard let delegate = delegate else { return }
let actions = getActionsFunc()
let multiSelectActionController = ... | @@ -142,18 +158,15 @@ class MultiSelectFooterView: UIView, MultiSelectActionOrderDelegate {
setActionsFunc: setActionsFunc,
themeOverride: themeOverride
)
-
+ multiSelectActionController.loadViewIfNeeded()
+ multiSelectActionController.view.setNeedsLayout()
let ... | podcasts/MultiSelectFooterView.swift | 26 | Swift | 1 | suggestion | 616 | 51 | 51 | false | Multi-select actions menu and icon size | 4,020 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/MultiSelectFooterView.swift
PR Title: Multi-select actions menu and icon size
BEFORE CODE: activityIndicator.isHidden = false
activityIndicator.isHidden = false
activityIndicator.startAnimating()
}
@IBAction func moreTa... | The calculation `max(context.maximumDetentValue * 0.25, multiSelectActionController.fittingHeight)` could result in a height that exceeds `maxHeight` (90% of maximumDetentValue). While this is handled by `min(minHeight, maxHeight)`, the variable name "minHeight" is misleading because it represents the calculated desire... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
private func setup() {
// add the label and dividers
let dividerHeight = 1 / UIScreen.main.scale
let topDivider = ThemeDividerView(frame: CGRect(x: 0, y: 0, width: bounds.width, height: dividerHeight))
topDivider.translatesAutoresizingMaskIntoConstraints = false
addSubview(to... | The title label is now pinned to the top of the view with a constant of 0, which means it will overlap with the top divider. The divider is positioned at the top anchor (line 39 in the context), and the title label is also positioned at the top anchor with no spacing. Consider adding a small constant (e.g., 10) to the ... | private func setup() {
// add the label and dividers
let dividerHeight = 1 / UIScreen.main.scale
let topDivider = ThemeDividerView(frame: CGRect(x: 0, y: 0, width: bounds.width, height: dividerHeight))
topDivider.translatesAutoresizingMaskIntoConstraints = false
addSubview(to... | @@ -38,7 +39,9 @@ class DateHeadingView: UIView {
topDivider.topAnchor.constraint(equalTo: topAnchor),
titleLabel!.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 20),
- bottomAnchor.constraint(equalTo: titleLabel!.bottomAnchor, constant: 10)
+ titleLabel!.tr... | podcasts/DateHeadingView.swift | 26 | Swift | 0.857 | suggestion | 575 | 42 | 45 | false | [Dynamic type] Downloads header and banner | 4,021 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/DateHeadingView.swift
PR Title: [Dynamic type] Downloads header and banner
BEFORE CODE: private func setup() {
// add the label and dividers
let dividerHeight = 1 / UIScreen.main.scale
let topDivider = ThemeDividerView(frame... | The title label is now pinned to the top of the view with a constant of 0, which means it will overlap with the top divider. The divider is positioned at the top anchor (line 39 in the context), and the title label is also positioned at the top anchor with no spacing. Consider adding a small constant (e.g., 10) to the ... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
// MARK: - multi select support
func tableView(_ tableView: UITableView, shouldBeginMultipleSelectionInteractionAt indexPath: IndexPath) -> Bool {
Settings.multiSelectGestureEnabled()
}
func tableView(_ tableView: UITableView, didBeginMultipleSelectionInteractionAt indexPath: IndexPath) {
... | The table header height now uses automatic dimension sizing, but there's no estimated height provided. For optimal scrolling performance with dynamic sizing, consider implementing `estimatedHeightForHeaderInSection` to return an estimated height value (e.g., 45 or 50). This is a common pattern used throughout the codeb... | // MARK: - multi select support
func tableView(_ tableView: UITableView, shouldBeginMultipleSelectionInteractionAt indexPath: IndexPath) -> Bool {
Settings.multiSelectGestureEnabled()
}
func tableView(_ tableView: UITableView, didBeginMultipleSelectionInteractionAt indexPath: IndexPath) {
... | @@ -148,12 +148,16 @@ extension DownloadsViewController: UITableViewDelegate, UITableViewDataSource {
return sectionHeader
}
- func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
- cellHeights[indexPath] = cell.frame.size.height
+ fun... | podcasts/DownloadsViewController+Table.swift | 26 | Swift | 1 | performance | 522 | 43 | 47 | false | [Dynamic type] Downloads header and banner | 4,021 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/DownloadsViewController+Table.swift
PR Title: [Dynamic type] Downloads header and banner
BEFORE CODE: // MARK: - multi select support
func tableView(_ tableView: UITableView, shouldBeginMultipleSelectionInteractionAt indexPath: IndexPath) -> B... | The table header height now uses automatic dimension sizing, but there's no estimated height provided. For optimal scrolling performance with dynamic sizing, consider implementing `estimatedHeightForHeaderInSection` to return an estimated height value (e.g., 45 or 50). This is a common pattern used throughout the codeb... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 0),
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: 0),
tableView.topAnchor.constraint(equalTo: view.topAnchor, constant: 0),
tableView.bottomAnchor.constraint(equalTo: ... | This could be sped up by iterating over and storing the playlist UUIDs in a Set and intersecting the sets. The more playlists you have the more this matters and in my testing it took quite a few (many dozens + hundreds of episodes) to notice any difference. We could fix this up later or now
```suggestion
... |
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 0),
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: 0),
tableView.topAnchor.constraint(equalTo: view.topAnchor, constant: 0),
tableView.bottomAnchor.constraint(equalTo: ... | @@ -143,7 +143,17 @@ class ManualPlaylistsChooserViewController: PCViewController {
let uuids = dataManager.manualPlaylistUUIDs(for: episode.uuid)
initialSelectedPlaylists = Set(uuids)
} else {
- initialSelectedPlaylists = []
+ // For bulk episodes, find playlist... | podcasts/New Detail/Episode Add/ManualPlaylistsChooserViewController.swift | 26 | Swift | 0.857 | suggestion | 732 | 51 | 51 | false | Identify bulk-added episodes already in playlists | 4,027 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | yaelirub | Review this pull request change.
Language: Swift
File: podcasts/New Detail/Episode Add/ManualPlaylistsChooserViewController.swift
PR Title: Identify bulk-added episodes already in playlists
BEFORE CODE:
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 0),
tableView.... | This could be sped up by iterating over and storing the playlist UUIDs in a Set and intersecting the sets. The more playlists you have the more this matters and in my testing it took quite a few (many dozens + hundreds of episodes) to notice any difference. We could fix this up later or now
```suggestion
... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
nowPlayingInfo[WatchConstants.Keys.nowPlayingDuration] = duration > 0 ? duration : 0
nowPlayingInfo[WatchConstants.Keys.nowPlayingUpNextCount] = playbackManager.queue.upNextCount()
let effects = playbackManager.effects()
nowPlayingInfo[WatchConstants.Keys.nowPlayingTrim... | With `unlimitedWatchUpNextSync` enabled this can serialize and send the entire Up Next queue. Since the watch state is sent as a single WCSession dictionary, large queues can create very large payloads and increase the chance of send/update failures (and currently `sendStateToWatch` only logs `sendMessage` errors). Con... | }
}
}
}
}
/// Checks if a WatchConnectivity error is due to payload being too large.
private func isPayloadTooLargeError(_ error: Error) -> Bool {
let nsError = error as NSError
return nsError.domain == WCErrorDomain && nsError.code ==... | @@ -649,8 +649,11 @@ class WatchManager: NSObject, WCSessionDelegate {
let upNextEpisodes = PlaybackManager.shared.allEpisodesInQueue(includeNowPlaying: false)
if upNextEpisodes.count == 0 { return upNextList }
- let truncatedList = Array(upNextEpisodes.prefix(Constants.Limits.maxListItemsToS... | podcasts/WatchManager.swift | 26 | Swift | 1 | bug | 1,294 | 51 | 51 | false | [Watch + Up Next] Remove Watch Up Next sync limit | 4,028 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/WatchManager.swift
PR Title: [Watch + Up Next] Remove Watch Up Next sync limit
BEFORE CODE: nowPlayingInfo[WatchConstants.Keys.nowPlayingDuration] = duration > 0 ? duration : 0
nowPlayingInfo[WatchConstants.Keys.nowPlayingUpNex... | With `unlimitedWatchUpNextSync` enabled this can serialize and send the entire Up Next queue. Since the watch state is sent as a single WCSession dictionary, large queues can create very large payloads and increase the chance of send/update failures (and currently `sendStateToWatch` only logs `sendMessage` errors). Con... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
guard let savedInts = UserDefaults.standard.object(forKey: Settings.filesMultiSelectActionsKey) as? [Int32] else {
return [.playNext, .playLast, .download, .markAsPlayed, .delete]
}
let actions = savedInts.compactMap { MultiSelectAction(rawValue: $0) }
return actions
}
... | `upNextMultiSelectActions()` now hard-codes a one-off migration for `.addToPlaylist`, but unlike `multiSelectActions()` / `listeningHistoryMultiSelectActions()` it won’t automatically surface any *future* new actions (and duplicates the “add missing defaults” logic). Consider switching to the same `defaultActions` + `a... | guard let savedInts = UserDefaults.standard.object(forKey: Settings.filesMultiSelectActionsKey) as? [Int32] else {
return [.playNext, .playLast, .download, .markAsPlayed, .delete]
}
let actions = savedInts.compactMap { MultiSelectAction(rawValue: $0) }
return actions
}
... | @@ -913,10 +913,15 @@ class Settings: NSObject {
private static let upNextMultiSelectActionsKey = "UpNextMultiSelectActions"
class func upNextMultiSelectActions() -> [MultiSelectAction] {
guard let savedInts = UserDefaults.standard.object(forKey: Settings.upNextMultiSelectActionsKey) as? [Int32] else... | podcasts/Settings.swift | 26 | Swift | 0.643 | refactor | 459 | 51 | 51 | false | Add "Add to Playlist" option to Up Next multi-select menu | 4,029 | Automattic/pocket-casts-ios | 1,136 | Swift | Copilot | yaelirub | Review this pull request change.
Language: Swift
File: podcasts/Settings.swift
PR Title: Add "Add to Playlist" option to Up Next multi-select menu
BEFORE CODE: guard let savedInts = UserDefaults.standard.object(forKey: Settings.filesMultiSelectActionsKey) as? [Int32] else {
return [.playNext, .p... | `upNextMultiSelectActions()` now hard-codes a one-off migration for `.addToPlaylist`, but unlike `multiSelectActions()` / `listeningHistoryMultiSelectActions()` it won’t automatically surface any *future* new actions (and duplicates the “add missing defaults” logic). Consider switching to the same `defaultActions` + `a... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
}
}
}
struct PlaceholderPillsView: View {
var body: some View {
ForEach(0..<10) { _ in
Button(action: {}, label: {
Text("Placeholder")
})
.buttonStyle(CategoryButtonStyle())
.environmentObject(Theme.sharedTheme)
.redact... | No issues found. | }
}
}
struct PlaceholderPillsView: View {
var body: some View {
ForEach(0..<10) { _ in
Button(action: {}, label: {
Text("Placeholder")
})
.buttonStyle(CategoryButtonStyle())
.environmentObject(Theme.sharedTheme)
.redact... | @@ -0,0 +1,118 @@
+import SwiftUI
+import PocketCastsServer
+
+struct Category {
+ let title: String
+ let image: String
+}
+
+struct CategoriesSelectorView: View {
+ @ObservedObject var discoverItemObservable: CategoriesSelectorViewController.DiscoverItemObservable
+
+ @State private var categories: [Disco... | podcasts/Categories/CategoriesSelectorView.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Categories Redesign: Pills | 1,602 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/Categories/CategoriesSelectorView.swift
PR Title: Categories Redesign: Pills
BEFORE CODE: }
}
}
struct PlaceholderPillsView: View {
var body: some View {
ForEach(0..<10) { _ in
Button(action: {}, label: {
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
return observable.item?.popular?.contains(id) == true
}
}
}
}
struct PlaceholderPillsView: View {
var body: some View {
ForEach(0..<10) { _ in
Button(action: {}, label: {
Text("Placeholder")
})
.buttonStyle(Category... | No issues found. | return observable.item?.popular?.contains(id) == true
}
}
}
}
struct PlaceholderPillsView: View {
var body: some View {
ForEach(0..<10) { _ in
Button(action: {}, label: {
Text("Placeholder")
})
.buttonStyle(Category... | @@ -16,7 +16,7 @@ struct CategoriesSelectorView: View {
ScrollView(.horizontal, showsIndicators: false) {
HStack {
if let popular {
- CategoriesPillsView(categories: popular)
+ CategoriesPillsView(categories: popular, selectedCategory: $observ... | podcasts/Categories/CategoriesSelectorView.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Categories Redesign: Discover loading changes | 1,604 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/Categories/CategoriesSelectorView.swift
PR Title: Categories Redesign: Discover loading changes
BEFORE CODE: return observable.item?.popular?.contains(id) == true
}
}
}
}
struct PlaceholderPillsView: View {
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
}
public mutating func populateFrom(discoverPodcast: DiscoverPodcast) {
author = discoverPodcast.author
shortDescription = discoverPodcast.shortDescription
title = discoverPodcast.title
uuid = discoverPodcast.uuid
if let iTunes = discoverPodcast.iTunesId {
iT... | No issues found. | }
public mutating func populateFrom(discoverPodcast: DiscoverPodcast) {
author = discoverPodcast.author
shortDescription = discoverPodcast.shortDescription
title = discoverPodcast.title
uuid = discoverPodcast.uuid
if let iTunes = discoverPodcast.iTunesId {
iT... | @@ -270,13 +270,15 @@ public struct DiscoverItem: Decodable, Equatable {
public var regions: [String]
public var isSponsored: Bool?
public var popular: [Int]?
+ public var categoryID: Int?
public enum CodingKeys: String, CodingKey {
case summaryStyle = "summary_style"
case exp... | Modules/Server/Sources/PocketCastsServer/Public/Sharing/Structs/ServerStructs.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Categories: Sponsored Posts | 1,614 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: Modules/Server/Sources/PocketCastsServer/Public/Sharing/Structs/ServerStructs.swift
PR Title: Categories: Sponsored Posts
BEFORE CODE: }
public mutating func populateFrom(discoverPodcast: DiscoverPodcast) {
author = discoverPodcast.author
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
}
private func showPageLoading() {
loadingContent = true
mainScrollView.isHidden = true
noNetworkView.isHidden = true
noResultsView.isHidden = true
loadingIndicator.startAnimating()
}
private var currentSnapshot: NSDiffableDataSourceSnapshot<Int, DiscoverItem>... | No issues found. | }
private func showPageLoading() {
loadingContent = true
mainScrollView.isHidden = true
noNetworkView.isHidden = true
noResultsView.isHidden = true
loadingIndicator.startAnimating()
}
private var currentSnapshot: NSDiffableDataSourceSnapshot<Int, DiscoverItem>... | @@ -145,32 +145,6 @@ class DiscoverViewController: PCViewController {
}
}
- /// Reloads discover, keeping the items listed in `exclude`
- /// - Parameters:
- /// - items: Items to exclude from the reload process. These items will REMAIN in Discover
- /// - category: The `DiscoverCategory... | podcasts/DiscoverViewController.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Add Most Popular section to Discover Categories page | 1,626 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/DiscoverViewController.swift
PR Title: Add Most Popular section to Discover Categories page
BEFORE CODE: }
private func showPageLoading() {
loadingContent = true
mainScrollView.isHidden = true
noNetworkView.isHidden = ... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
optionPicker.show(statusBarStyle: preferredStatusBarStyle)
Analytics.track(.podcastScreenUnsubscribeTapped)
}
private func performUnsubscribe() {
guard let podcast = podcast else { return }
PodcastManager.shared.unsubscribe(podcast: podcast)
navigationController?.popVi... | No issues found. | optionPicker.show(statusBarStyle: preferredStatusBarStyle)
Analytics.track(.podcastScreenUnsubscribeTapped)
}
private func performUnsubscribe() {
guard let podcast = podcast else { return }
PodcastManager.shared.unsubscribe(podcast: podcast)
navigationController?.popVi... | @@ -157,7 +157,7 @@ class PodcastViewController: FakeNavViewController, PodcastActionsDelegate, Sync
self.episodesTable.beginUpdates()
self.episodesTable.setEditing(self.isMultiSelectEnabled, animated: true)
if self.episodesTable.numberOfSections > 0 {
- ... | podcasts/PodcastViewController.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Serial show support | 2,502 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/PodcastViewController.swift
PR Title: Serial show support
BEFORE CODE: optionPicker.show(statusBarStyle: preferredStatusBarStyle)
Analytics.track(.podcastScreenUnsubscribeTapped)
}
private func performUnsubscribe() {
g... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
func next() -> Bool {
if closed {
fatalError("Result set is closed")
}
try? row = rowCursor.next()
return row != nil
}
func int(forColumnIndex: Int32) -> Int32 {
guard let valueForColumn = Array(row.databaseValues)[safe: Int(forColumnIndex)], let int32V... | No issues found. |
func next() -> Bool {
if closed {
fatalError("Result set is closed")
}
try? row = rowCursor.next()
return row != nil
}
func int(forColumnIndex: Int32) -> Int32 {
guard let valueForColumn = Array(row.databaseValues)[safe: Int(forColumnIndex)], let int32V... | @@ -0,0 +1,81 @@
+import GRDB
+import Foundation
+
+class GRDBResultSet: PCDBResultSet {
+ private let rowCursor: RowCursor
+ private var row: Row!
+
+ private var closed = false
+
+ init(rowCursor: RowCursor) {
+ self.rowCursor = rowCursor
+ }
+
+ func close() {
+ closed = true
+ }
+... | Modules/DataModel/Sources/PocketCastsDataModel/Private/DB/GRDB/GRDBResultSet.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | GRDB: add GRDB abstraction | 2,820 | Automattic/pocket-casts-ios | 1,136 | Swift | leandroalonso | Review this pull request change.
Language: Swift
File: Modules/DataModel/Sources/PocketCastsDataModel/Private/DB/GRDB/GRDBResultSet.swift
PR Title: GRDB: add GRDB abstraction
BEFORE CODE:
func next() -> Bool {
if closed {
fatalError("Result set is closed")
}
try? row = rowC... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
/// Shuffle your episodes with Pocket Casts Plus, and more
internal static var paywallDynamicHeadlineUpNextShuffle: String { return L10n.tr("Localizable", "paywall_dynamic_headline_up_next_shuffle") }
/// Listen from your watch with Pocket Casts Plus, and more
internal static var paywallDynamicHeadlineWatch: St... | No issues found. | /// Shuffle your episodes with Pocket Casts Plus, and more
internal static var paywallDynamicHeadlineUpNextShuffle: String { return L10n.tr("Localizable", "paywall_dynamic_headline_up_next_shuffle") }
/// Listen from your watch with Pocket Casts Plus, and more
internal static var paywallDynamicHeadlineWatch: St... | @@ -1708,6 +1708,10 @@ internal enum L10n {
internal static var `none`: String { return L10n.tr("Localizable", "none") }
/// You're not on WiFi
internal static var notOnWifi: String { return L10n.tr("Localizable", "not_on_wifi") }
+ /// Daily Reminders
+ internal static var notificationsDailyReminders: Strin... | podcasts/Strings+Generated.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Notifications revamp] Feature flag and settings UI | 2,934 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/Strings+Generated.swift
PR Title: [Notifications revamp] Feature flag and settings UI
BEFORE CODE: /// Shuffle your episodes with Pocket Casts Plus, and more
internal static var paywallDynamicHeadlineUpNextShuffle: String { return L10n.tr("Localiza... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
var displayCategoryAndAuthor: AttributedString {
let category = podcast.podcastCategory?.localized(seperatingWith: \.isNewline) ?? ""
var markdown = "[\(category)](http://pocketcasts.com)"
if let author = podcast.author {
markdown += " · \(author)"
}
return (try?... | No issues found. |
var displayCategoryAndAuthor: AttributedString {
let category = podcast.podcastCategory?.localized(seperatingWith: \.isNewline) ?? ""
var markdown = "[\(category)](http://pocketcasts.com)"
if let author = podcast.author {
markdown += " · \(author)"
}
return (try?... | @@ -114,7 +114,7 @@ class PodcastHeaderViewModel: NSObject, ObservableObject {
func subscribeButtonTapped() {
guard let delegate = delegate else { return }
- if podcast.isSubscribed() {
+ if podcast.isSubscribed() || isSubscribed {
delegate.unsubscribe()
// do not... | podcasts/PodcastHeaderModel.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Fix for action bar in new view changes | 2,938 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/PodcastHeaderModel.swift
PR Title: Fix for action bar in new view changes
BEFORE CODE:
var displayCategoryAndAuthor: AttributedString {
let category = podcast.podcastCategory?.localized(seperatingWith: \.isNewline) ?? ""
var markdo... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
guard let strongSelf = self, let pathComponents = parameters[JLRouteWildcardComponentsKey] as? [String], let episodeUuid = pathComponents[safe: 0] else { return false }
guard let baseEpisode = DataManager.sharedManager.findBaseEpisode(uuid: episodeUuid) else { return true }
if Play... | No issues found. | guard let strongSelf = self, let pathComponents = parameters[JLRouteWildcardComponentsKey] as? [String], let episodeUuid = pathComponents[safe: 0] else { return false }
guard let baseEpisode = DataManager.sharedManager.findBaseEpisode(uuid: episodeUuid) else { return true }
if Play... | @@ -336,13 +336,19 @@ extension AppDelegate {
JLRoutes.global().addRoute("/upnext/*") { [weak self] paramDict -> Bool in
var source: UpNextViewSource = .unknown
-
+ var showFromMiniPlayer: Bool = true
+ if let location = paramDict["location"] as? String, location == "tab" {... | podcasts/AppDelegate+UrlHandling.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Notifications Revamp] - Onboarding notifications - Part I | 2,943 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/AppDelegate+UrlHandling.swift
PR Title: [Notifications Revamp] - Onboarding notifications - Part I
BEFORE CODE: guard let strongSelf = self, let pathComponents = parameters[JLRouteWildcardComponentsKey] as? [String], let episodeUuid = pathC... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
return L10n.notificationsOnboardingUpnextBody
case .onboardingFilters:
return L10n.notificationsOnboardingFiltersBody
case .onboardingUpsell:
return L10n.notificationsOnboardingUpsellBody
}
}
var identifier: String {
return self.rawValue
}... | No issues found. | return L10n.notificationsOnboardingUpnextBody
case .onboardingFilters:
return L10n.notificationsOnboardingFiltersBody
case .onboardingUpsell:
return L10n.notificationsOnboardingUpsellBody
}
}
var identifier: String {
return self.rawValue
}... | @@ -72,11 +72,13 @@ class NotificationsCoordinator {
var timeIntervalStep: TimeInterval = 24.hours
- private init() {
+ private let notificationCenter: UNUserNotificationCenter
+ private init(notificationCenter: UNUserNotificationCenter = .current()) {
+ self.notificationCenter = notification... | podcasts/Notifications/NotificationsCoordinator.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Notifications Revamp] Onboarding notifications check task completion | 2,963 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/Notifications/NotificationsCoordinator.swift
PR Title: [Notifications Revamp] Onboarding notifications check task completion
BEFORE CODE: return L10n.notificationsOnboardingUpnextBody
case .onboardingFilters:
return L10n... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
navigationController?.pushViewController(podcastController, animated: true)
}
func showItemWith(identifier: String) {
guard let items = discoverLayout?.layout, let item = items.first(where: { $0.id == identifier || $0.uuid == identifier}) else {
return
}
guard let s... | No issues found. | navigationController?.pushViewController(podcastController, animated: true)
}
func showItemWith(identifier: String) {
guard let items = discoverLayout?.layout, let item = items.first(where: { $0.id == identifier || $0.uuid == identifier}) else {
return
}
guard let s... | @@ -14,6 +14,16 @@ extension DiscoverCollectionViewController: DiscoverDelegate {
}
}
+ func navigateTo(listID: String) {
+ if isViewLoaded {
+ showItemWith(identifier: listID)
+ } else {
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.5.seconds) {[weak self] ... | podcasts/DiscoverCollectionViewController+DiscoverDelegate.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Notifications Revamp] Onboarding staff picks | 2,984 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/DiscoverCollectionViewController+DiscoverDelegate.swift
PR Title: [Notifications Revamp] Onboarding staff picks
BEFORE CODE: navigationController?.pushViewController(podcastController, animated: true)
}
func showItemWith(identifier: St... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
return cell
}
}
private var podcastChooserController: PodcastChooserViewController?
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
guard let sectionType = Section(rawValue: indexPath.se... | No issues found. | return cell
}
}
private var podcastChooserController: PodcastChooserViewController?
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
guard let sectionType = Section(rawValue: indexPath.se... | @@ -12,6 +12,8 @@ class NotificationsViewController: PCViewController, UITableViewDataSource, UITa
private var sections: [Section] = [.episodes]
private var rows: [[Row]] = [[.newEpisodes, .podcastsChosen, .appBadges], [.trendingRecommendations, .dailyReminders], [.newFeaturesAndTips, .pocketCastsOffers]]
+... | podcasts/NotificationsViewController.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Notifications Revamp] Notification permissions settings | 2,996 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/NotificationsViewController.swift
PR Title: [Notifications Revamp] Notification permissions settings
BEFORE CODE: return cell
}
}
private var podcastChooserController: PodcastChooserViewController?
func tableView(_ tabl... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
folder = updatedFolder
title = folder.name
reloadPodcasts()
updateNavTintColor()
}
@objc private func handleLongPress(_ gesture: UILongPressGestureRecognizer) {
gridHelper.handleLongPress(gesture, from: mainGrid, isList: Settings.libraryType() == .list, containerView: ... | No issues found. |
folder = updatedFolder
title = folder.name
reloadPodcasts()
updateNavTintColor()
}
@objc private func handleLongPress(_ gesture: UILongPressGestureRecognizer) {
gridHelper.handleLongPress(gesture, from: mainGrid, isList: Settings.libraryType() == .list, containerView: ... | @@ -128,7 +128,11 @@ class FolderViewController: PCViewController, UIGestureRecognizerDelegate {
@objc private func folderOptionsTapped(_ sender: UIBarButtonItem) {
let optionsPicker = OptionsPicker(title: nil)
- let sortOption = folder.librarySort()
+ let sortOption: LibrarySort = if !Fea... | podcasts/FolderViewController.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Improve Podcast Sorting] Add new sort option | 2,998 | Automattic/pocket-casts-ios | 1,136 | Swift | danielebogo | Review this pull request change.
Language: Swift
File: podcasts/FolderViewController.swift
PR Title: [Improve Podcast Sorting] Add new sort option
BEFORE CODE:
folder = updatedFolder
title = folder.name
reloadPodcasts()
updateNavTintColor()
}
@objc private func handleLongP... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
static func copyDatabase(toFile: String) throws {
let documentsPath = NSSearchPathForDirectoriesInDomains(.applicationSupportDirectory, .userDomainMask, true).last as NSString?
guard let dbFolderPath = documentsPath?.appendingPathComponent("Pocket Casts") as? NSString else {
throw TestEr... | No issues found. | static func copyDatabase(toFile: String) throws {
let documentsPath = NSSearchPathForDirectoriesInDomains(.applicationSupportDirectory, .userDomainMask, true).last as NSString?
guard let dbFolderPath = documentsPath?.appendingPathComponent("Pocket Casts") as? NSString else {
throw TestEr... | @@ -65,6 +65,10 @@ extension DatabasePool {
throw TestError.dbFolderPathFailure
}
+ if !FileManager.default.fileExists(atPath: dbFolderPath as String) {
+ try FileManager.default.createDirectory(atPath: dbFolderPath as String, withIntermediateDirectories: true)
+ }
+
... | Modules/DataModel/Tests/PocketCastsDataModelTests/DataManager+TestDatabase.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | GRDB: enable for `DEBUG` environment | 3,009 | Automattic/pocket-casts-ios | 1,136 | Swift | leandroalonso | Review this pull request change.
Language: Swift
File: Modules/DataModel/Tests/PocketCastsDataModelTests/DataManager+TestDatabase.swift
PR Title: GRDB: enable for `DEBUG` environment
BEFORE CODE: static func copyDatabase(toFile: String) throws {
let documentsPath = NSSearchPathForDirectoriesInDomains(.a... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
snapshot.insertItems([.empty], beforeItem: loadingItem)
}
snapshot.deleteItems([loadingItem])
dataSource.apply(snapshot)
}
}
private func showPageLoading() {
var snapshot = NSDiffableDataSourceSnapshot<Section, Item>()
snapshot.append... | No issues found. | snapshot.insertItems([.empty], beforeItem: loadingItem)
}
snapshot.deleteItems([loadingItem])
dataSource.apply(snapshot)
}
}
private func showPageLoading() {
var snapshot = NSDiffableDataSourceSnapshot<Section, Item>()
snapshot.append... | @@ -5,9 +5,10 @@ import PocketCastsUtils
class DiscoverCollectionViewController: PCViewController {
enum CellType: Hashable {
- case loading
+ case loading(String?)
case noNetwork
case noResults
+ case empty
case item(DiscoverCellType.ItemType)
}
@@ -23,6 +... | podcasts/DiscoverCollectionViewController.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Recommendations] Authentication failure handling | 3,022 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/DiscoverCollectionViewController.swift
PR Title: [Recommendations] Authentication failure handling
BEFORE CODE: snapshot.insertItems([.empty], beforeItem: loadingItem)
}
snapshot.deleteItems([loadingItem])
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
return present
case .unknown:
return nil
}
}
.filter { $0.isAvailable }
} else {
playerActions = UserDefaults.standard.playerActions ?? defaultActions
}
return pla... | No issues found. | return present
case .unknown:
return nil
}
}
.filter { $0.isAvailable }
} else {
playerActions = UserDefaults.standard.playerActions ?? defaultActions
}
return pla... | @@ -1433,6 +1433,17 @@ class Settings: NSObject {
}
}
+ // MARK: - Recent Played Sorting Tip
+
+ static var shouldShowRecentlyPlayedSortingTip: Bool {
+ get {
+ UserDefaults.standard.value(forKey: Constants.UserDefaults.shouldShowRecentlyPlayedSortingTip) as? Bool ?? true
+ ... | podcasts/Settings.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Improve podcast Sorting] Add tooltip and Analytics | 3,024 | Automattic/pocket-casts-ios | 1,136 | Swift | danielebogo | Review this pull request change.
Language: Swift
File: podcasts/Settings.swift
PR Title: [Improve podcast Sorting] Add tooltip and Analytics
BEFORE CODE: return present
case .unknown:
return nil
}
}
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
NotificationCenter.default.removeObserver(self, name: Constants.Notifications.podcastAdded, object: nil)
}
// MARK: - UICollectionView Methods
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.deq... | No issues found. | NotificationCenter.default.removeObserver(self, name: Constants.Notifications.podcastAdded, object: nil)
}
// MARK: - UICollectionView Methods
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.deq... | @@ -1,11 +1,12 @@
import PocketCastsServer
import UIKit
+import PocketCastsDataModel
class LargeListSummaryViewController: DiscoverPeekViewController, DiscoverSummaryProtocol, UICollectionViewDataSource, GridLayoutDelegate, UICollectionViewDelegateFlowLayout {
@IBOutlet weak var divider: ThemeDividerView!
... | podcasts/LargeListSummaryViewController.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Recommendations: Discover "Large list with podcast" display style | 3,027 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/LargeListSummaryViewController.swift
PR Title: Recommendations: Discover "Large list with podcast" display style
BEFORE CODE: NotificationCenter.default.removeObserver(self, name: Constants.Notifications.podcastAdded, object: nil)
}
//... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
// This should be a try? to match FMDB behavior
// However, while we test GRDB internally we would like any error
// to be thrown helping us to discover issues.
// TODO: remove once GRDB has been tested.
try! dbPool.write { db in
let dbWrapper ... | No issues found. | // This should be a try? to match FMDB behavior
// However, while we test GRDB internally we would like any error
// to be thrown helping us to discover issues.
// TODO: remove once GRDB has been tested.
try! dbPool.write { db in
let dbWrapper ... | @@ -38,6 +38,32 @@ class GRDBQueue: PCDBQueue {
}
}
+ func read(_ block: (any PCDatabase) -> Void) {
+ withoutActuallyEscaping(block) { block in
+ // This should be a try? to match FMDB behavior
+ // However, while we test GRDB internally we would like any error
+ ... | Modules/DataModel/Sources/PocketCastsDataModel/Private/DB/GRDB/GRDBQueue.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | GRDB: add `write` and `read` methods | 3,040 | Automattic/pocket-casts-ios | 1,136 | Swift | leandroalonso | Review this pull request change.
Language: Swift
File: Modules/DataModel/Sources/PocketCastsDataModel/Private/DB/GRDB/GRDBQueue.swift
PR Title: GRDB: add `write` and `read` methods
BEFORE CODE: // This should be a try? to match FMDB behavior
// However, while we test GRDB internally we would... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
case offers
var notifications: [NotificationType] {
switch self {
case .dailyReminders:
return [.onboardingSignUp, .onboardingImport, .onboardingUpNext, .onboardingFilters, .onboardingThemes, .onboardingStaffPicks, .onboardingUpsell]
case .recommendations:
... | No issues found. | case offers
var notifications: [NotificationType] {
switch self {
case .dailyReminders:
return [.onboardingSignUp, .onboardingImport, .onboardingUpNext, .onboardingFilters, .onboardingThemes, .onboardingStaffPicks, .onboardingUpsell]
case .recommendations:
... | @@ -1,5 +1,6 @@
import Foundation
import PocketCastsUtils
+import PocketCastsServer
enum NotificationType: String {
@@ -15,6 +16,8 @@ enum NotificationType: String {
case recommendationsTrending
+ case upsell
+
var title: String {
switch self {
case .onboardingSignUp:
@@ -35,6 ... | podcasts/Notifications/NotificationsCoordinator.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Notifications revamps] Offers notifications | 3,051 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/Notifications/NotificationsCoordinator.swift
PR Title: [Notifications revamps] Offers notifications
BEFORE CODE: case offers
var notifications: [NotificationType] {
switch self {
case .dailyReminders:
return... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
}
enum NotificationsGroup: CaseIterable {
case newEpisodes
case dailyReminders
case recommendations
case newFeaturesAndTips
case offers
var notifications: [NotificationType] {
switch self {
case .newEpisodes:
return [] // New Episodes are notifications sent... | No issues found. | }
enum NotificationsGroup: CaseIterable {
case newEpisodes
case dailyReminders
case recommendations
case newFeaturesAndTips
case offers
var notifications: [NotificationType] {
switch self {
case .newEpisodes:
return [] // New Episodes are notifications sent... | @@ -16,6 +16,7 @@ enum NotificationType: String {
case reengagementWeekly
case recommendationsTrending
+ case recommendationsYouMightLike
case upsell
case newFeatureSuggestedFolders
@@ -40,6 +41,8 @@ enum NotificationType: String {
return L10n.notificationsReengagementWeeklyTitle... | podcasts/Notifications/NotificationsCoordinator.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Notifications Revamp] Add user recommendations notification | 3,067 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/Notifications/NotificationsCoordinator.swift
PR Title: [Notifications Revamp] Add user recommendations notification
BEFORE CODE: }
enum NotificationsGroup: CaseIterable {
case newEpisodes
case dailyReminders
case recommendations
case ... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
cell.separatorInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: .greatestFiniteMagnitude)
return cell
}
}
}
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
cellHeights[indexPath] = cel... | No issues found. | cell.separatorInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: .greatestFiniteMagnitude)
return cell
}
}
}
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
cellHeights[indexPath] = cel... | @@ -11,13 +11,13 @@ extension PodcastViewController: UITableViewDataSource, UITableViewDelegate {
private static let allArchivedCellId = "AllArchivedCell"
private static let groupHeadingCellId = "GroupHeading"
- private enum SimilarShowsSection {
+ private enum YouMightLikeSection {
case head... | podcasts/PodcastViewController+TableData.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Recommendations: Add information modal for Podroll | 3,070 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/PodcastViewController+TableData.swift
PR Title: Recommendations: Add information modal for Podroll
BEFORE CODE: cell.separatorInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: .greatestFiniteMagnitude)
return cell
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
case .known:
return nil
case .unknown(let absent):
return .unknown(absent)
}
}
SettingsStore.appSettings.playerShelf = actions.map({ .known($0) }) + unknowns
} else {
let actionInts = acti... | No issues found. | case .known:
return nil
case .unknown(let absent):
return .unknown(absent)
}
}
SettingsStore.appSettings.playerShelf = actions.map({ .known($0) }) + unknowns
} else {
let actionInts = acti... | @@ -356,14 +356,17 @@ class Settings: NSObject {
private static let chartRegion = "SJChartRegion"
class func discoverRegion(discoverLayout: DiscoverLayout) -> String {
+ return convertRegion(userRegion: userRegion(), discoverLayout: discoverLayout)
+ }
+
+ class func userRegion() -> String? {
... | podcasts/Settings.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Recommendations: Add country code for recommendations endpoint | 3,085 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/Settings.swift
PR Title: Recommendations: Add country code for recommendations endpoint
BEFORE CODE: case .known:
return nil
case .unknown(let absent):
return .unknown(absent)
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
SubscriptionHelper.setSubscriptionType(SubscriptionType.plus.rawValue)
SubscriptionHelper.subscriptionTier = .plus
NotificationCenter.postOnMainThread(notification: ServerNotifications.subscriptionStatusChanged)
HapticsHelp... | No issues found. | SubscriptionHelper.setSubscriptionType(SubscriptionType.plus.rawValue)
SubscriptionHelper.subscriptionTier = .plus
NotificationCenter.postOnMainThread(notification: ServerNotifications.subscriptionStatusChanged)
HapticsHelp... | @@ -304,7 +304,9 @@ struct DeveloperMenu: View {
Section {
Button("Speed Up Notifications") {
NotificationsGroup.speedUpNotifications = true
- NotificationsCoordinator.shared.ignoreScheduleHours = true
+ }
+ Button("Log ... | podcasts/DeveloperMenu.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Notifications trigger dates updates | 3,090 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/DeveloperMenu.swift
PR Title: Notifications trigger dates updates
BEFORE CODE: SubscriptionHelper.setSubscriptionType(SubscriptionType.plus.rawValue)
SubscriptionHelper.subscriptionTier = .plus
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
/// Unable to load info
internal static var paidPodcastGenericError: String { return L10n.tr("Localizable", "paid_podcast_generic_error") }
/// Manage
internal static var paidPodcastManage: String { return L10n.tr("Localizable", "paid_podcast_manage") }
/// Next episode %1$@
internal static func paidPodcast... | No issues found. | /// Unable to load info
internal static var paidPodcastGenericError: String { return L10n.tr("Localizable", "paid_podcast_generic_error") }
/// Manage
internal static var paidPodcastManage: String { return L10n.tr("Localizable", "paid_podcast_manage") }
/// Next episode %1$@
internal static func paidPodcast... | @@ -1798,6 +1798,10 @@ internal enum L10n {
internal static var `none`: String { return L10n.tr("Localizable", "none") }
/// You're not on WiFi
internal static var notOnWifi: String { return L10n.tr("Localizable", "not_on_wifi") }
+ /// Install Pocket Casts to get the full experience with powerful playback an... | podcasts/Strings+Generated.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | App clip reminder notification | 3,095 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/Strings+Generated.swift
PR Title: App clip reminder notification
BEFORE CODE: /// Unable to load info
internal static var paidPodcastGenericError: String { return L10n.tr("Localizable", "paid_podcast_generic_error") }
/// Manage
internal static... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
backgroundColor = .clear
if #available(iOS 16.0, *) {
self.contentConfiguration = UIHostingConfiguration {
... | No issues found. |
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
backgroundColor = .clear
if #available(iOS 16.0, *) {
self.contentConfiguration = UIHostingConfiguration {
... | @@ -0,0 +1,57 @@
+import SwiftUI
+
+class LoadingCell: UITableViewCell {
+ static let reuseIdentifier = "LoadingCell"
+
+ override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+ super.init(style: style, reuseIdentifier: reuseIdentifier)
+ selectionStyle = .none
+ backgro... | podcasts/LoadingCell.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Recommendations: Add failed loading + retry to "You might like" | 3,097 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/LoadingCell.swift
PR Title: Recommendations: Add failed loading + retry to "You might like"
BEFORE CODE:
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
return Settings.notificationsNewEpisodes
case .dailyReminders:
return Settings.notificationsDailyReminders
case .recommendations:
return Settings.notificationsRecommendations
case .newFeaturesAndTips:
return Settings.not... | No issues found. | return Settings.notificationsNewEpisodes
case .dailyReminders:
return Settings.notificationsDailyReminders
case .recommendations:
return Settings.notificationsRecommendations
case .newFeaturesAndTips:
return Settings.not... | @@ -14,6 +14,7 @@ enum NotificationType: String {
case onboardingUpsell
case reengagementWeekly
+ case reengagementDownloads
case recommendationsTrending
case recommendationsYouMightLike
@@ -39,6 +40,8 @@ enum NotificationType: String {
return L10n.notificationsOnboardingStaffPic... | podcasts/Notifications/NotificationsCoordinator.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Add reengagement downloads notification | 3,099 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/Notifications/NotificationsCoordinator.swift
PR Title: Add reengagement downloads notification
BEFORE CODE: return Settings.notificationsNewEpisodes
case .dailyReminders:
return Settings.notificationsDailyRem... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
#!/bin/bash -eu
if "$(dirname "${BASH_SOURCE[0]}")/should-skip-job.sh" --job-type build; then
exit 0
fi
# Sentry CLI needs to be up-to-date
brew upgrade sentry-cli
"$(dirname "${BASH_SOURCE[0]}")/shared_setup.sh"
echo "--- :closed_lock_with_key: Installing Secrets"
bundle exec fastlane run configure_apply
echo "... | No issues found. | #!/bin/bash -eu
if "$(dirname "${BASH_SOURCE[0]}")/should-skip-job.sh" --job-type build; then
exit 0
fi
# Sentry CLI needs to be up-to-date
brew upgrade sentry-cli
"$(dirname "${BASH_SOURCE[0]}")/shared_setup.sh"
echo "--- :closed_lock_with_key: Installing Secrets"
bundle exec fastlane run configure_apply
echo "... | @@ -1,5 +1,9 @@
#!/bin/bash -eu
+if "$(dirname "${BASH_SOURCE[0]}")/should-skip-job.sh" --job-type build; then
+ exit 0
+fi
+
# Sentry CLI needs to be up-to-date
brew upgrade sentry-cli
| .buildkite/commands/prototype-build.sh | 0 | Shell | 1 | none | 16 | 17 | 17 | true | [Tooling] Skip jobs if there are no relevant code changes | 3,126 | Automattic/pocket-casts-ios | 1,136 | Swift | iangmaia | Review this pull request change.
Language: Shell
File: .buildkite/commands/prototype-build.sh
PR Title: [Tooling] Skip jobs if there are no relevant code changes
BEFORE CODE: #!/bin/bash -eu
if "$(dirname "${BASH_SOURCE[0]}")/should-skip-job.sh" --job-type build; then
exit 0
fi
# Sentry CLI needs to be up-to-da... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
}
static func empty() -> UIContentConfiguration {
if #available(iOS 16.0, *) {
return UIHostingConfiguration {
EmptyView()
}
} else {
return HostingConfiguration {
EmptyView()
}
}
}
static func empt... | No issues found. | }
static func empty() -> UIContentConfiguration {
if #available(iOS 16.0, *) {
return UIHostingConfiguration {
EmptyView()
}
} else {
return HostingConfiguration {
EmptyView()
}
}
}
static func empt... | @@ -1,29 +1,72 @@
import SwiftUI
-@available(iOS 16, *)
// Many of these can be replaced with UIContentUnavailableConfigurations in iOS 17
struct ContentUnavailableConfiguration {
static func loading() -> UIContentConfiguration {
- UIHostingConfiguration {
- LoadingView().environmentObject(T... | podcasts/ContentUnavailableConfiguration.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Empty State] ContentUnavailableConfiguration + HostingConfiguration backfill | 3,129 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/ContentUnavailableConfiguration.swift
PR Title: [Empty State] ContentUnavailableConfiguration + HostingConfiguration backfill
BEFORE CODE: }
static func empty() -> UIContentConfiguration {
if #available(iOS 16.0, *) {
retur... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
class EmptyStateCell: UITableViewCell {
static let reuseIdentifier = "EmptyStateCell"
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
backgroundColor = .clear
}
require... | No issues found. | class EmptyStateCell: UITableViewCell {
static let reuseIdentifier = "EmptyStateCell"
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
backgroundColor = .clear
}
require... | @@ -13,15 +13,15 @@ class EmptyStateCell: UITableViewCell {
fatalError("init(coder:) has not been implemented")
}
- func configure(title: String, message: String? = nil, icon: (() -> Image)? = nil, actions: [EmptyStateAction] = []) {
+ func configure<Style: EmptyStateViewStyle>(title: String, mess... | podcasts/EmptyStateCell.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Empty States] Update Up Next empty state | 3,148 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/EmptyStateCell.swift
PR Title: [Empty States] Update Up Next empty state
BEFORE CODE: class EmptyStateCell: UITableViewCell {
static let reuseIdentifier = "EmptyStateCell"
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
}
}
}
enum IAPPromotionID: String {
case referall = "com.pocketcasts.plus.yearly.referral.promo"
}
enum IAPOfferType: String {
case freeTrial = "free_trial"
case introOffer = "intro_offer"
case referral = "referral"
case winback = "winback"
}
enum Plan {
case plus, patron
var... | No issues found. | }
}
}
enum IAPPromotionID: String {
case referall = "com.pocketcasts.plus.yearly.referral.promo"
}
enum IAPOfferType: String {
case freeTrial = "free_trial"
case introOffer = "intro_offer"
case referral = "referral"
case winback = "winback"
}
enum Plan {
case plus, patron
var... | @@ -17,6 +17,17 @@ enum IAPProductID: String {
}
}
+enum IAPPromotionID: String {
+ case referall = "com.pocketcasts.plus.yearly.referral.promo"
+}
+
+enum IAPOfferType: String {
+ case freeTrial = "free_trial"
+ case introOffer = "intro_offer"
+ case referral = "referral"
+ case winback = "winba... | podcasts/IAPTypes.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Add frequency, tier, and promo details for IAP events | 3,152 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/IAPTypes.swift
PR Title: Add frequency, tier, and promo details for IAP events
BEFORE CODE: }
}
}
enum IAPPromotionID: String {
case referall = "com.pocketcasts.plus.yearly.referral.promo"
}
enum IAPOfferType: String {
case freeTr... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
class MockShowCoordinator: ShowInfoCoordinating {
func loadShowNotes(podcastUuid: String, episodeUuid: String) async throws -> String {
return ""
}
func loadEpisodeArtworkUrl(podcastUuid: String, episodeUuid: String) async throws -> String? {
return nil
}
... | No issues found. |
class MockShowCoordinator: ShowInfoCoordinating {
func loadShowNotes(podcastUuid: String, episodeUuid: String) async throws -> String {
return ""
}
func loadEpisodeArtworkUrl(podcastUuid: String, episodeUuid: String) async throws -> String? {
return nil
}
... | @@ -26,6 +26,16 @@ final class TranscriptManagerTests: XCTestCase {
}
}
+ class EmptyMockShowCoordinator: MockShowCoordinator {
+ override func loadTranscriptsMetadata(podcastUuid: String, episodeUuid: String) async throws -> EpisodeTranscriptData {
+ guard let transcriptURL = Bundl... | PocketCastsTests/Tests/Player/Transcripts/TranscriptManagerTests.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Hotfix] Prevent transcript crash | 3,191 | Automattic/pocket-casts-ios | 1,136 | Swift | danielebogo | Review this pull request change.
Language: Swift
File: PocketCastsTests/Tests/Player/Transcripts/TranscriptManagerTests.swift
PR Title: [Hotfix] Prevent transcript crash
BEFORE CODE:
class MockShowCoordinator: ShowInfoCoordinating {
func loadShowNotes(podcastUuid: String, episodeUuid: String) async thr... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
withoutActuallyEscaping(block) { block in
do {
try dbPool.write { db in
let dbWrapper = GRDBDatabase(database: db)
block(dbWrapper)
}
} catch {
logger?.log(error: error, context: [:])
}
... | No issues found. | withoutActuallyEscaping(block) { block in
do {
try dbPool.write { db in
let dbWrapper = GRDBDatabase(database: db)
block(dbWrapper)
}
} catch {
logger?.log(error: error, context: [:])
}
... | @@ -3,72 +3,74 @@ import Foundation
class GRDBQueue: PCDBQueue {
private let dbPool: DatabasePool
+ private let logger: ErrorLogger?
- init(dbPool: DatabasePool) {
+ init(dbPool: DatabasePool, logger: ErrorLogger? = nil) {
self.dbPool = dbPool
+ self.logger = logger
}
func... | Modules/DataModel/Sources/PocketCastsDataModel/Private/DB/GRDB/GRDBQueue.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | GRDB: remove `try!` and log errors in Sentry | 3,192 | Automattic/pocket-casts-ios | 1,136 | Swift | leandroalonso | Review this pull request change.
Language: Swift
File: Modules/DataModel/Sources/PocketCastsDataModel/Private/DB/GRDB/GRDBQueue.swift
PR Title: GRDB: remove `try!` and log errors in Sentry
BEFORE CODE: withoutActuallyEscaping(block) { block in
do {
try dbPool.write { db in
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
}
func showTranscript() {
generatedTranscriptsPremiumOverlayShown = false
Analytics.track(.episodeTranscriptShown)
addChild(transcriptsItem)
view.addSubview(transcriptsItem.view)
transcriptsItem.view.anchorToAllSidesOf(view: view)
transcriptsItem.didMove(toPare... | No issues found. | }
func showTranscript() {
generatedTranscriptsPremiumOverlayShown = false
Analytics.track(.episodeTranscriptShown)
addChild(transcriptsItem)
view.addSubview(transcriptsItem.view)
transcriptsItem.view.anchorToAllSidesOf(view: view)
transcriptsItem.didMove(toPare... | @@ -0,0 +1,125 @@
+
+
+class TranscriptContainerViewController: UIViewController {
+ private let playbackManager: TranscriptPlaybackManaging
+ private var generatedTranscriptsPremiumOverlayShown: Bool = false
+
+ private lazy var transcriptsItem: TranscriptViewController = {
+ let item = TranscriptViewC... | podcasts/TranscriptContainerViewController.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Transcript in Episode View] Present Transcript view from Episode | 3,230 | Automattic/pocket-casts-ios | 1,136 | Swift | danielebogo | Review this pull request change.
Language: Swift
File: podcasts/TranscriptContainerViewController.swift
PR Title: [Transcript in Episode View] Present Transcript view from Episode
BEFORE CODE: }
func showTranscript() {
generatedTranscriptsPremiumOverlayShown = false
Analytics.track(.episod... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
// We override this because we don't want the ad getting _too_ large. In the player, especially, we run out of space.
let maxSizeCategory: UIContentSizeCategory = .accessibilityMedium
init(model: BannerAdModel, colors: Colors) {
self.model = model
self.colors = colors
}
var body: s... | No issues found. | // We override this because we don't want the ad getting _too_ large. In the player, especially, we run out of space.
let maxSizeCategory: UIContentSizeCategory = .accessibilityMedium
init(model: BannerAdModel, colors: Colors) {
self.model = model
self.colors = colors
}
var body: s... | @@ -26,6 +26,18 @@ struct BannerAdView: View {
let icon: Color
let border: Color?
+ static func playerColors(_ theme: Theme) -> Self {
+ return Self(
+ background: theme.playerContrast06,
+ adText: theme.playerContrast01,
+ titleLabel: P... | podcasts/Common SwiftUI/BannerAdView.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Banner Ads] Player view | 3,233 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/Common SwiftUI/BannerAdView.swift
PR Title: [Banner Ads] Player view
BEFORE CODE: // We override this because we don't want the ad getting _too_ large. In the player, especially, we run out of space.
let maxSizeCategory: UIContentSizeCategory =... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
// swift-tools-version:6.0
import Foundation
import PackageDescription
let package = Package(
name: "BuildTools",
platforms: [.macOS(.v10_13)],
dependencies: [
.package(url: "https://github.com/SimplyDanny/SwiftLintPlugins", exact: "0.58.2"),
.package(url: "https://github.com/SwiftGen/Swift... | No issues found. | // swift-tools-version:6.0
import Foundation
import PackageDescription
let package = Package(
name: "BuildTools",
platforms: [.macOS(.v10_13)],
dependencies: [
.package(url: "https://github.com/SimplyDanny/SwiftLintPlugins", exact: "0.58.2"),
.package(url: "https://github.com/SwiftGen/Swift... | @@ -7,6 +7,7 @@ let package = Package(
platforms: [.macOS(.v10_13)],
dependencies: [
.package(url: "https://github.com/SimplyDanny/SwiftLintPlugins", exact: "0.58.2"),
+ .package(url: "https://github.com/SwiftGen/SwiftGenPlugin", from: "6.5.1")
],
targets: [.target(name: "BuildTools"... | BuildTools/Package.swift | 0 | Swift | 1 | none | 16 | 39 | 39 | true | Use SwiftPM to provision SwiftGen | 3,239 | Automattic/pocket-casts-ios | 1,136 | Swift | mokagio | Review this pull request change.
Language: Swift
File: BuildTools/Package.swift
PR Title: Use SwiftPM to provision SwiftGen
BEFORE CODE: // swift-tools-version:6.0
import Foundation
import PackageDescription
let package = Package(
name: "BuildTools",
platforms: [.macOS(.v10_13)],
dependencies: [
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import PocketCastsUtils
import FirebaseRemoteConfig
struct FirebaseManager {
static func refreshRemoteConfig(expirationDuration: TimeInterval = 2.hour, completion: ((RemoteConfigFetchStatus) -> Void)? = nil) {
// we user remote config for varies parameters in the app we want to be able to set remotely. Her... | No issues found. | import PocketCastsUtils
import FirebaseRemoteConfig
struct FirebaseManager {
static func refreshRemoteConfig(expirationDuration: TimeInterval = 2.hour, completion: ((RemoteConfigFetchStatus) -> Void)? = nil) {
// we user remote config for varies parameters in the app we want to be able to set remotely. Her... | @@ -21,11 +21,26 @@ struct FirebaseManager {
}
remoteConfig.setDefaults(remoteConfigDefaults)
- remoteConfig.fetch(withExpirationDuration: expirationDuration) { status, _ in
- if status == .success {
- remoteConfig.activate(completion: nil)
+ Task {
+ ... | podcasts/FirebaseManager.swift | 0 | Swift | 1 | none | 16 | 47 | 47 | true | Firebase: inform whether is TestFlight or not | 3,249 | Automattic/pocket-casts-ios | 1,136 | Swift | leandroalonso | Review this pull request change.
Language: Swift
File: podcasts/FirebaseManager.swift
PR Title: Firebase: inform whether is TestFlight or not
BEFORE CODE: import PocketCastsUtils
import FirebaseRemoteConfig
struct FirebaseManager {
static func refreshRemoteConfig(expirationDuration: TimeInterval = 2.hour, comp... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
// add title
let titleLabel = UILabel()
titleLabel.font = UIFont.systemFont(ofSize: 20, weight: .bold)
titleLabel.text = title
titleLabel.textColor = AppTheme.mainTextColor(for: themeOverride)
titleLabel.translatesAutoresizingMaskIntoConstraints = false
titleLabe... | No issues found. |
// add title
let titleLabel = UILabel()
titleLabel.font = UIFont.systemFont(ofSize: 20, weight: .bold)
titleLabel.text = title
titleLabel.textColor = AppTheme.mainTextColor(for: themeOverride)
titleLabel.translatesAutoresizingMaskIntoConstraints = false
titleLabe... | @@ -1,4 +1,5 @@
import UIKit
+import PocketCastsUtils
class DescriptiveActionView: UIView {
private let title: String
@@ -7,17 +8,19 @@ class DescriptiveActionView: UIView {
private let actions: [OptionAction]
private let themeOverride: Theme.ThemeType?
private let iconTintStyle: ThemeStyle
+ ... | podcasts/DescriptiveActionView.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Enable 'Warn before using data' by default | 3,301 | Automattic/pocket-casts-ios | 1,136 | Swift | danielebogo | Review this pull request change.
Language: Swift
File: podcasts/DescriptiveActionView.swift
PR Title: Enable 'Warn before using data' by default
BEFORE CODE:
// add title
let titleLabel = UILabel()
titleLabel.font = UIFont.systemFont(ofSize: 20, weight: .bold)
titleLabel.text = titl... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
Text(L10n.userSatisfactionSurveySubtitle)
.font(.callout)
.foregroundColor(theme.primaryText02)
.multilineTextAlignment(.center)
.lineLimit(nil)
.fixedSize(horizontal: false, vertical: true)
... | No issues found. | Text(L10n.userSatisfactionSurveySubtitle)
.font(.callout)
.foregroundColor(theme.primaryText02)
.multilineTextAlignment(.center)
.lineLimit(nil)
.fixedSize(horizontal: false, vertical: true)
... | @@ -0,0 +1,82 @@
+import SwiftUI
+import StoreKit
+
+struct UserSatisfactionSurveyView: View {
+ @Environment(\.dismiss) private var dismiss
+ @EnvironmentObject var theme: Theme
+
+ var presentSupportView: (() -> Void)?
+
+ var body: some View {
+ VStack(spacing: 32) {
+ VStack(spacing: 1... | podcasts/UserSatisfactionSurveyView.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Improve App Rating] Add Survey Screen before rating alert | 3,324 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/UserSatisfactionSurveyView.swift
PR Title: [Improve App Rating] Add Survey Screen before rating alert
BEFORE CODE: Text(L10n.userSatisfactionSurveySubtitle)
.font(.callout)
.foregroundColor(theme.... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
var savingsOnBestValue: String? {
guard let bestProduct = products.first(where: { $0.isBestValue }),
let otherProduct = products.first(where: { $0.isBestValue == false }),
bestProduct.basePrice != 0,
otherProduct.basePrice != 0
else {
return nil
... | No issues found. |
var savingsOnBestValue: String? {
guard let bestProduct = products.first(where: { $0.isBestValue }),
let otherProduct = products.first(where: { $0.isBestValue == false }),
bestProduct.basePrice != 0,
otherProduct.basePrice != 0
else {
return nil
... | @@ -1,14 +1,28 @@
-class UpgradeAccountViewModel: PlusPricingInfoModel {
+import Foundation
+import SwiftUI
+
+import PocketCastsServer
+import PocketCastsUtils
+
+class UpgradeAccountViewModel: PlusPurchaseModel {
+
+ weak var navigationController: UINavigationController? = nil
@Published var upgradeTier: Up... | podcasts/Onboarding/Plus/NewUpgrade/UpgradeAccountViewModel.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [New onboarding] Integration with onboarding flow | 3,328 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/Onboarding/Plus/NewUpgrade/UpgradeAccountViewModel.swift
PR Title: [New onboarding] Integration with onboarding flow
BEFORE CODE:
var savingsOnBestValue: String? {
guard let bestProduct = products.first(where: { $0.isBestValue }),
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
episode.lastPlaybackInteractionDate = now
episode.lastPlaybackInteractionSyncStatus = syncStatus
let fields = ["lastPlaybackInteractionDate", "lastPlaybackInteractionSyncStatus"]
let values = [now, syncStatus, episode.id] as [Any]
FileLog.shared.console("[Episode Save] Episode id... | No issues found. | episode.lastPlaybackInteractionDate = now
episode.lastPlaybackInteractionSyncStatus = syncStatus
let fields = ["lastPlaybackInteractionDate", "lastPlaybackInteractionSyncStatus"]
let values = [now, syncStatus, episode.id] as [Any]
FileLog.shared.console("[Episode Save] Episode id... | @@ -66,7 +66,7 @@ class EpisodeDataManager {
"""
var episodes = [String]()
- dbQueue.inDatabase { db in
+ dbQueue.read { db in
do {
let resultSet = try db.executeQuery(query, values: [PlayingStatus.completed.rawValue])
defer { resultSet.cl... | Modules/DataModel/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | GRDB: add `read`/`write` methods to `EpisodeDataManager` | 3,374 | Automattic/pocket-casts-ios | 1,136 | Swift | leandroalonso | Review this pull request change.
Language: Swift
File: Modules/DataModel/Sources/PocketCastsDataModel/Private/Managers/EpisodeDataManager.swift
PR Title: GRDB: add `read`/`write` methods to `EpisodeDataManager`
BEFORE CODE: episode.lastPlaybackInteractionDate = now
episode.lastPlaybackInteractionSyn... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
case episodeDetailTranscript
/// Include banner ads in the player and podcasts list. This is fetched from ths server so can be disabled from there as well.
case bannerAds
/// Improves configuration for the streaming requet download session
case streamingCustomSessionConfiguration
/// Guest Li... | No issues found. | case episodeDetailTranscript
/// Include banner ads in the player and podcasts list. This is fetched from ths server so can be disabled from there as well.
case bannerAds
/// Improves configuration for the streaming requet download session
case streamingCustomSessionConfiguration
/// Guest Li... | @@ -221,6 +221,9 @@ public enum FeatureFlag: String, CaseIterable {
/// Whether to use database concurrent reads or not
case concurrentDatabaseReads
+ /// Limit playback position changes when switching episodes
+ case limitPlaybackPositionChanges
+
public var enabled: Bool {
if let overr... | Modules/Utils/Sources/PocketCastsUtils/Feature Flags/FeatureFlag.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Limit playback position changes when switching episodes | 3,383 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: Modules/Utils/Sources/PocketCastsUtils/Feature Flags/FeatureFlag.swift
PR Title: Limit playback position changes when switching episodes
BEFORE CODE: case episodeDetailTranscript
/// Include banner ads in the player and podcasts list. This is fetched f... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
@State var showMore: Bool = false
@EnvironmentObject var theme: Theme
@Environment(\.dismiss) var dismiss
var body: some View {
Group {
if viewModel.isLoaded {
mainBody
} else {
ProgressView()
.progressViewStyle(Circu... | No issues found. | @State var showMore: Bool = false
@EnvironmentObject var theme: Theme
@Environment(\.dismiss) var dismiss
var body: some View {
Group {
if viewModel.isLoaded {
mainBody
} else {
ProgressView()
.progressViewStyle(Circu... | @@ -0,0 +1,187 @@
+import SwiftUI
+import PocketCastsDataModel
+import PocketCastsServer
+import PocketCastsUtils
+import WrappingHStack
+
+class InterestsViewModel: ObservableObject, @unchecked Sendable {
+
+ let maxInitialCategories: Int = 12
+ let minimumSelectionCount: Int = 3
+ var allCategories: [Discove... | podcasts/Onboarding/InterestsView.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [New onboarding] Interests UI | 3,431 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/Onboarding/InterestsView.swift
PR Title: [New onboarding] Interests UI
BEFORE CODE: @State var showMore: Bool = false
@EnvironmentObject var theme: Theme
@Environment(\.dismiss) var dismiss
var body: some View {
Group {
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
/// Guest List and Network Highligh Redesign
case guestListsNetworkHighlightsRedesign
/// Adds Discover category user recommendations
case smartCategories
/// Enabled the attributed text view in the Data Usage warning Sheet
case useDescriptiveActionAttributedTextView
/// Use the new upgr... | No issues found. |
/// Guest List and Network Highligh Redesign
case guestListsNetworkHighlightsRedesign
/// Adds Discover category user recommendations
case smartCategories
/// Enabled the attributed text view in the Data Usage warning Sheet
case useDescriptiveActionAttributedTextView
/// Use the new upgr... | @@ -188,8 +188,11 @@ public enum FeatureFlag: String, CaseIterable {
/// Shows transcript excerpt in episode detail
case episodeDetailTranscript
- /// Include banner ads in the player and podcasts list. This is fetched from ths server so can be disabled from there as well.
- case bannerAds
+ /// In... | Modules/Utils/Sources/PocketCastsUtils/Feature Flags/FeatureFlag.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Banner Ads] Split feature flag for podcast & player | 3,448 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: Modules/Utils/Sources/PocketCastsUtils/Feature Flags/FeatureFlag.swift
PR Title: [Banner Ads] Split feature flag for podcast & player
BEFORE CODE:
/// Guest List and Network Highligh Redesign
case guestListsNetworkHighlightsRedesign
/// Adds Disco... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
var label: String {
switch self {
case .broken:
return L10n.bannerAdsReportBroken
case .malicious:
return L10n.bannerAdsReportMalicious
case .tooOften:
return L10n.bannerAdsReportTooOften
case .other:
... | No issues found. |
var label: String {
switch self {
case .broken:
return L10n.bannerAdsReportBroken
case .malicious:
return L10n.bannerAdsReportMalicious
case .tooOften:
return L10n.bannerAdsReportTooOften
case .other:
... | @@ -36,10 +36,7 @@ struct BannerAdReporter {
/// Shows the ad reporting bottom sheet with options to report various problems with an ad
static func show(for adID: String, from source: Any) {
func handle(action: ReportActionType) {
- Analytics.track(.bannerAdReport, source: source, properti... | podcasts/Common SwiftUI/BannerAdReporter.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Banner Ads] Report banner ad to Tracks AND Firebase | 3,455 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/Common SwiftUI/BannerAdReporter.swift
PR Title: [Banner Ads] Report banner ad to Tracks AND Firebase
BEFORE CODE:
var label: String {
switch self {
case .broken:
return L10n.bannerAdsReportBroken
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
case episodeStarred
case episodeBulkStarred
case episodeUnstarred
case episodeBulkUnstarred
case episodeDownloadQueued
case episodeDownloadFinished
case episodeBulkDownloadQueued
case episodeDownloadCancelled
case episodeDownloadFailed
case episodeDownloadsStale
case episod... | No issues found. | case episodeStarred
case episodeBulkStarred
case episodeUnstarred
case episodeBulkUnstarred
case episodeDownloadQueued
case episodeDownloadFinished
case episodeBulkDownloadQueued
case episodeDownloadCancelled
case episodeDownloadFailed
case episodeDownloadsStale
case episod... | @@ -759,6 +759,13 @@ enum AnalyticsEvent: String {
case recommendationsSearchTapped
case recommendationsMoreTapped
+ // MARK: - Interests
+ case onboardingInterestsShown
+ case onboardingInterestsNotNowTapped
+ case onboardingInterestsCategorySelected
+ case onboardingInterestsShownMoreTapped... | podcasts/Analytics/AnalyticsEvent.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [New onboarding] Interests screen analytics | 3,462 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/Analytics/AnalyticsEvent.swift
PR Title: [New onboarding] Interests screen analytics
BEFORE CODE: case episodeStarred
case episodeBulkStarred
case episodeUnstarred
case episodeBulkUnstarred
case episodeDownloadQueued
case epis... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
let cell = tableView.dequeueReusableCell(withIdentifier: DownloadSettingsViewController.disclosureCellId, for: indexPath) as! DisclosureCell
let autoDownloadFilterCount = FilterManager.autoDownloadFilterCount()
let playlistRebrandingEnabled = FeatureFlag.playlistsRebranding.enabled
... | No issues found. | let cell = tableView.dequeueReusableCell(withIdentifier: DownloadSettingsViewController.disclosureCellId, for: indexPath) as! DisclosureCell
let autoDownloadFilterCount = FilterManager.autoDownloadFilterCount()
let playlistRebrandingEnabled = FeatureFlag.playlistsRebranding.enabled
... | @@ -60,7 +60,7 @@ class DownloadSettingsViewController: PCViewController, UITableViewDataSource, U
case .podcastAutoDownload:
return L10n.settingsAutoDownloadsSubtitleNewEpisodes
case .filterSelection:
- return L10n.settingsAutoDownloadsSubtitleFilters
+ return Featu... | podcasts/DownloadSettingsViewController.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Playlists] Podcast and Autodownload settings | 3,485 | Automattic/pocket-casts-ios | 1,136 | Swift | danielebogo | Review this pull request change.
Language: Swift
File: podcasts/DownloadSettingsViewController.swift
PR Title: [Playlists] Podcast and Autodownload settings
BEFORE CODE: let cell = tableView.dequeueReusableCell(withIdentifier: DownloadSettingsViewController.disclosureCellId, for: indexPath) as! Disclosu... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
Analytics.track(.informationalModalViewLoginTap)
pushOnboarding()
}
func pageDidChange(_ index: Int) {
if let card = cardName(from: index) {
Analytics.track(.informationalModalViewCardShowed, properties: ["card": card])
}
}
@objc func dismissTapped() {
... | No issues found. | Analytics.track(.informationalModalViewLoginTap)
pushOnboarding()
}
func pageDidChange(_ index: Int) {
if let card = cardName(from: index) {
Analytics.track(.informationalModalViewCardShowed, properties: ["card": card])
}
}
@objc func dismissTapped() {
... | @@ -1,5 +1,6 @@
import Foundation
import SwiftUI
+import PocketCastsUtils
class InformationalModalViewModel: NSObject, OnboardingModel {
weak var navigationController: UINavigationController? = nil
@@ -39,7 +40,7 @@ class InformationalModalViewModel: NSObject, OnboardingModel {
}
private func push... | podcasts/Onboarding/Encourage Account Creation/Modal/InformationalModalViewModel.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [New Onboarding] Encourage account creation update for new onboarding | 3,508 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/Onboarding/Encourage Account Creation/Modal/InformationalModalViewModel.swift
PR Title: [New Onboarding] Encourage account creation update for new onboarding
BEFORE CODE: Analytics.track(.informationalModalViewLoginTap)
pushOnboarding()... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
if let episode = model.episode {
Text(DateFormatHelper.sharedHelper.tinyLocalizedFormat(episode.publishedDate).localizedUppercase)
.font(style: .footnote, weight: .bold)
.foregroundColor(AppTheme.color(fo... | No issues found. | if let episode = model.episode {
Text(DateFormatHelper.sharedHelper.tinyLocalizedFormat(episode.publishedDate).localizedUppercase)
.font(style: .footnote, weight: .bold)
.foregroundColor(AppTheme.color(fo... | @@ -8,28 +8,27 @@ struct SearchResultCell: View {
@EnvironmentObject var searchAnalyticsHelper: SearchAnalyticsHelper
@EnvironmentObject var searchHistory: SearchHistoryModel
- let episode: EpisodeSearchResult?
- let result: PodcastFolderSearchResult?
+ @StateObject var model: SearchResultCellModel... | podcasts/New Search/Views/Results/SearchResultCell.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Search Improvements] Add direct play button | 3,518 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/New Search/Views/Results/SearchResultCell.swift
PR Title: [Search Improvements] Add direct play button
BEFORE CODE: if let episode = model.episode {
Text(DateFormatHelper.sharedHelper.tinyLocalizedFor... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
.background(Theme.sharedTheme.primaryUi01)
} else if searchResults.isSearchingForEpisodes || searchResults.isSearchingForPodcasts {
ProgressView()
.frame(maxWidth: .infinity, maxHeight: .infinity)
.tint(AppTheme.loadingActivityColor()... | No issues found. | .background(Theme.sharedTheme.primaryUi01)
} else if searchResults.isSearchingForEpisodes || searchResults.isSearchingForPodcasts {
ProgressView()
.frame(maxWidth: .infinity, maxHeight: .infinity)
.tint(AppTheme.loadingActivityColor()... | @@ -11,7 +11,7 @@ struct NewSearchResultsView: View {
@State var identifier = 0
@State var showInlineResults = false
- @State var displayMode: SearchResultsListView.DisplayMode = .podcasts
+ @State var displayMode: SearchResultsListView.DisplayMode = .allResults
var body: some View {
Z... | podcasts/New Search/Views/Results/NewSearchResultsView.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Search Improvement] Search filtering results | 3,522 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/New Search/Views/Results/NewSearchResultsView.swift
PR Title: [Search Improvement] Search filtering results
BEFORE CODE: .background(Theme.sharedTheme.primaryUi01)
} else if searchResults.isSearchingForEpisodes || searchResu... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
ForEach(searchResults.predictive, id: \.self) { predictiveSearch in
switch predictiveSearch.type {
case .term(let searchTerm):
VStack {
termRow(term: searchTerm)
if !FeatureFlag.searchImprovements.enabled {
... | No issues found. | ForEach(searchResults.predictive, id: \.self) { predictiveSearch in
switch predictiveSearch.type {
case .term(let searchTerm):
VStack {
termRow(term: searchTerm)
if !FeatureFlag.searchImprovements.enabled {
... | @@ -0,0 +1,74 @@
+import SwiftUI
+import PocketCastsUtils
+import PocketCastsServer
+
+struct PredictiveList: View {
+
+ @EnvironmentObject var theme: Theme
+ @EnvironmentObject var searchAnalyticsHelper: SearchAnalyticsHelper
+ @EnvironmentObject var searchResults: SearchResultsModel
+ @EnvironmentObject v... | podcasts/New Search/Views/Results/PredictiveList.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Search Improvements] Predictive search | 3,525 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/New Search/Views/Results/PredictiveList.swift
PR Title: [Search Improvements] Predictive search
BEFORE CODE: ForEach(searchResults.predictive, id: \.self) { predictiveSearch in
switch predictiveSearch.type {
case .te... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
DataManager.sharedManager.movePlaylistEpisode(from: Int(episodeToMove.episodePosition), to: to + 1)
saveReplaceIfRequired()
refreshAppFiring(notificationName: fireNotification ? Constants.Notifications.upNextQueueChanged : nil)
}
func overrideAllEpisodesWith(episode: BaseEpisode) {
... | No issues found. | DataManager.sharedManager.movePlaylistEpisode(from: Int(episodeToMove.episodePosition), to: to + 1)
saveReplaceIfRequired()
refreshAppFiring(notificationName: fireNotification ? Constants.Notifications.upNextQueueChanged : nil)
}
func overrideAllEpisodesWith(episode: BaseEpisode) {
... | @@ -389,7 +389,7 @@ class PlaybackQueue: NSObject {
}
}
- FileLog.shared.addMessage("PlaybackQueue: Saving replace of \(episodeUuids.count) episodes")
+ FileLog.shared.addMessage("PlaybackQueue: Saving replace of \(upNextCount()) with \(episodeUuids.count) episodes")
Dat... | podcasts/PlaybackQueue.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Up Next clearing | 3,548 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/PlaybackQueue.swift
PR Title: Up Next clearing
BEFORE CODE: DataManager.sharedManager.movePlaylistEpisode(from: Int(episodeToMove.episodePosition), to: to + 1)
saveReplaceIfRequired()
refreshAppFiring(notificationName: fireNo... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
stories.append(.completionRate)
self.stories = stories
}
func story(for storyNumber: Int) -> any StoryView {
switch stories[storyNumber] {
case .intro:
return IntroStory2025()
case .numberOfPodcastsAndEpisodesListened:
return Numb... | No issues found. | stories.append(.completionRate)
self.stories = stories
}
func story(for storyNumber: Int) -> any StoryView {
switch stories[storyNumber] {
case .intro:
return IntroStory2025()
case .numberOfPodcastsAndEpisodesListened:
return Numb... | @@ -8,11 +8,11 @@ class EndOfYear2025StoriesModel: StoryModel {
var data = EndOfYear2025StoriesData()
var indicatorColor: Color {
- .black
+ .white
}
var primaryBackgroundColor: Color {
- Color(hex: "EE661C")
+ .endOfYear2025Background
}
required init() { ... | podcasts/End of Year/End of Year 2025/EndOfYear2025StoriesModel.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Playback 2025] Intro Story | 3,571 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/End of Year/End of Year 2025/EndOfYear2025StoriesModel.swift
PR Title: [Playback 2025] Intro Story
BEFORE CODE: stories.append(.completionRate)
self.stories = stories
}
func story(for storyNumber: Int) -> any StoryView {
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
if let snapshot {
dataSource.apply(snapshot)
}
}
}
private func updateItemInSnapshot(item: DiscoverItem, isAuthenticated: Bool, region: String, selectedCategory: DiscoverCategory?) {
var snapshot = dataSource.snapshot()
// Find the loading placeh... | No issues found. | if let snapshot {
dataSource.apply(snapshot)
}
}
}
private func updateItemInSnapshot(item: DiscoverItem, isAuthenticated: Bool, region: String, selectedCategory: DiscoverCategory?) {
var snapshot = dataSource.snapshot()
// Find the loading placeh... | @@ -29,7 +29,7 @@ class DiscoverCollectionViewController: PCViewController {
private(set) lazy var searchController: PCSearchBarController = {
PCSearchBarController()
}()
- lazy var searchResultsController = SearchResultsViewController(source: .discover)
+ lazy var searchResultsController = Sea... | podcasts/DiscoverCollectionViewController.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Search improvements] Local predictive search | 3,587 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/DiscoverCollectionViewController.swift
PR Title: [Search improvements] Local predictive search
BEFORE CODE: if let snapshot {
dataSource.apply(snapshot)
}
}
}
private func updateItemInSnapshot(it... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
} else {
episodeImage.alpha = 1
contentStackView.alpha = 1
}
}
inUpNext = PlaybackManager.shared.inUpNext(episode: episode)
EpisodeDateHelper.setDate(episode: episode, on: dayName, tintColor: mainTintColor)
if episode.wasDeleted ... | No issues found. | } else {
episodeImage.alpha = 1
contentStackView.alpha = 1
}
}
inUpNext = PlaybackManager.shared.inUpNext(episode: episode)
EpisodeDateHelper.setDate(episode: episode, on: dayName, tintColor: mainTintColor)
if episode.wasDeleted ... | @@ -94,6 +94,10 @@ class EpisodeCell: ThemeableSwipeCell, MainEpisodeActionViewDelegate {
private var episode: BaseEpisode?
+ private var isSelectableForMultiSelect: Bool {
+ !(episode?.wasDeleted ?? false)
+ }
+
// MARK: - Setup
override func awakeFromNib() {
@@ -150,8 +154,11 @@ clas... | podcasts/EpisodeCell.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Playlists] Unavailable Episodes | 3,598 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/EpisodeCell.swift
PR Title: [Playlists] Unavailable Episodes
BEFORE CODE: } else {
episodeImage.alpha = 1
contentStackView.alpha = 1
}
}
inUpNext = PlaybackManager.shared.inUpNext... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
Settings.trackValueToggled(.settingsGeneralMultiSelectGestureToggled, enabled: enabled)
}
// MARK: Multi Select Actions
private static let multiSelectActionsKey = "MultiSelectActions"
class func multiSelectActions() -> [MultiSelectAction] {
let defaultActions: [MultiSelectAction] = [.p... | No issues found. | Settings.trackValueToggled(.settingsGeneralMultiSelectGestureToggled, enabled: enabled)
}
// MARK: Multi Select Actions
private static let multiSelectActionsKey = "MultiSelectActions"
class func multiSelectActions() -> [MultiSelectAction] {
let defaultActions: [MultiSelectAction] = [.p... | @@ -1494,7 +1494,7 @@ class Settings: NSObject {
}
}
- // MARK: - New Filter Tip
+ // MARK: - Playlists
static var shouldShowNewFilterTip: Bool {
get {
@@ -1505,7 +1505,14 @@ class Settings: NSObject {
}
}
- // MARK: - New Filter Tip
+ static var shouldShowDra... | podcasts/Settings.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Playlists] Present new tip | 3,602 | Automattic/pocket-casts-ios | 1,136 | Swift | danielebogo | Review this pull request change.
Language: Swift
File: podcasts/Settings.swift
PR Title: [Playlists] Present new tip
BEFORE CODE: Settings.trackValueToggled(.settingsGeneralMultiSelectGestureToggled, enabled: enabled)
}
// MARK: Multi Select Actions
private static let multiSelectActionsKey = "... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
var reordered = items
let element = reordered.remove(at: currentIndex)
let clampedIndex = newIndex.clamped(to: 0...reordered.count)
reordered.insert(element, at: clampedIndex)
// Persist new positions
for (index, item) in r... | No issues found. | var reordered = items
let element = reordered.remove(at: currentIndex)
let clampedIndex = newIndex.clamped(to: 0...reordered.count)
reordered.insert(element, at: clampedIndex)
// Persist new positions
for (index, item) in r... | @@ -389,13 +389,24 @@ class PlaylistDataManager {
return highestPosition + 1
}
- func add(episodes: [Episode], to playlist: EpisodeFilter, dbQueue: PCDBQueue) {
+ /// Returns a value indicating whether the episodes were added. If `false`, the playlist is full.
+ func add(episodes: [Episode], to... | Modules/DataModel/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Playlists] Add manual playlist episodes events | 3,629 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: Modules/DataModel/Sources/PocketCastsDataModel/Private/Managers/PlaylistDataManager.swift
PR Title: [Playlists] Add manual playlist episodes events
BEFORE CODE: var reordered = items
let element = reordered.remove(at: currentInde... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
.foregroundStyle(foregroundColor)
.background(
Rectangle()
.fill(backgroundColor)
.ignoresSafeArea()
.allowsHitTesting(false)
)
.onAppear {
if animated {
itemScale = 1.0
}
}
}
... | No issues found. | .foregroundStyle(foregroundColor)
.background(
Rectangle()
.fill(backgroundColor)
.ignoresSafeArea()
.allowsHitTesting(false)
)
.onAppear {
if animated {
itemScale = 1.0
}
}
}
... | @@ -0,0 +1,145 @@
+import SwiftUI
+import PocketCastsDataModel
+import Lottie
+
+struct Top5Podcasts2025Story: ShareableStory {
+ @Environment(\.renderForSharing) var renderForSharing: Bool
+ @Environment(\.animated) var animated: Bool
+
+ let top5Podcasts: [TopPodcast]
+
+ let identifier: String = "top_5_s... | podcasts/End of Year/Stories/2025/Top5Podcasts2025Story.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Playback 25] Top 5 Podcasts | 3,653 | Automattic/pocket-casts-ios | 1,136 | Swift | danielebogo | Review this pull request change.
Language: Swift
File: podcasts/End of Year/Stories/2025/Top5Podcasts2025Story.swift
PR Title: [Playback 25] Top 5 Podcasts
BEFORE CODE: .foregroundStyle(foregroundColor)
.background(
Rectangle()
.fill(backgroundColor)
.igno... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import SwiftUI
import PocketCastsServer
struct StoryHeader2025: View {
let title: String?
let description: String?
let subscriptionTier: SubscriptionTier?
init(title: String? = nil, description: String? = nil, subscriptionTier: SubscriptionTier? = nil) {
self.title = title
self.descrip... | No issues found. | import SwiftUI
import PocketCastsServer
struct StoryHeader2025: View {
let title: String?
let description: String?
let subscriptionTier: SubscriptionTier?
init(title: String? = nil, description: String? = nil, subscriptionTier: SubscriptionTier? = nil) {
self.title = title
self.descrip... | @@ -14,9 +14,9 @@ struct StoryHeader2025: View {
var body: some View {
VStack(spacing: 8) {
- HStack { Spacer() }
if let subscriptionTier {
- SubscriptionBadge2024(subscriptionTier: subscriptionTier)
+ SubscriptionBadge2025(subscriptionTier: subscrip... | podcasts/End of Year/Stories/2025/StoryHeader2025.swift | 0 | Swift | 1 | none | 16 | 49 | 49 | true | [Playback 25] Completion Rate Story | 3,656 | Automattic/pocket-casts-ios | 1,136 | Swift | danielebogo | Review this pull request change.
Language: Swift
File: podcasts/End of Year/Stories/2025/StoryHeader2025.swift
PR Title: [Playback 25] Completion Rate Story
BEFORE CODE: import SwiftUI
import PocketCastsServer
struct StoryHeader2025: View {
let title: String?
let description: String?
let subscriptionTi... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
searchTask = nil
}
func clearResults() {
cancelPendingSearch()
clearPendingSearchState()
cancelPreloadTask()
}
private func clearPendingSearchState() {
isSearchInFlight = false
episodes = []
currentEpisodeSearchTerm = ""
currentSearchPodc... | No issues found. | searchTask = nil
}
func clearResults() {
cancelPendingSearch()
clearPendingSearchState()
cancelPreloadTask()
}
private func clearPendingSearchState() {
isSearchInFlight = false
episodes = []
currentEpisodeSearchTerm = ""
currentSearchPodc... | @@ -131,6 +131,9 @@ final class LocalSearchCoordinator {
let didAdd = dataManager.add(episodes: [episode], to: playlist)
+ playlist.syncStatus = SyncStatus.notSynced.rawValue
+ dataManager.save(playlist: playlist)
+
let isFull = !didAdd
Analytics.track(.filterAddEpisodesEp... | podcasts/New Search/Views/Results/LocalSearchCoordinator.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Playlists: ensure changed playlists are marked to sync | 3,660 | Automattic/pocket-casts-ios | 1,136 | Swift | leandroalonso | Review this pull request change.
Language: Swift
File: podcasts/New Search/Views/Results/LocalSearchCoordinator.swift
PR Title: Playlists: ensure changed playlists are marked to sync
BEFORE CODE: searchTask = nil
}
func clearResults() {
cancelPendingSearch()
clearPendingSearchState(... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
}
ServerConfig.shared.playbackDelegate?.seekToFromSync(time: playedUpTo, syncChanges: false, startPlaybackAfterSeek: false)
}
}
// only update the duration if we aren't actively playing this episode
if episodeItem.hasDuration, Int64(episode.duration) ... | No issues found. | }
ServerConfig.shared.playbackDelegate?.seekToFromSync(time: playedUpTo, syncChanges: false, startPlaybackAfterSeek: false)
}
}
// only update the duration if we aren't actively playing this episode
if episodeItem.hasDuration, Int64(episode.duration) ... | @@ -355,6 +355,7 @@ extension SyncTask {
let serverSet = Set(playlistItem.episodeOrder)
let matchedEpisodes = DataManager.sharedManager.playlistEpisodes(for: playlist).map { $0.uuid }
let missingEpisodes = serverSet.subtracting(matchedEpisodes)
+ let episodesToDelete = ... | Modules/Server/Sources/PocketCastsServer/Public/Sync/SyncTask+ServerChanges.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Playlists: handle episode deletion in incremental sync | 3,661 | Automattic/pocket-casts-ios | 1,136 | Swift | leandroalonso | Review this pull request change.
Language: Swift
File: Modules/Server/Sources/PocketCastsServer/Public/Sync/SyncTask+ServerChanges.swift
PR Title: Playlists: handle episode deletion in incremental sync
BEFORE CODE: }
ServerConfig.shared.playbackDelegate?.seekToFromSync(time: playedUp... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import PocketCastsServer
struct StoryHeader2025: View {
let title: String?
let description: String?
let subscriptionTier: SubscriptionTier?
let topPadding: CGFloat?
init(title: String? = nil, description: String? = nil, subscriptionTier: SubscriptionTier? = nil, topPadding: CGFloat? = nil) {
... | No issues found. | import PocketCastsServer
struct StoryHeader2025: View {
let title: String?
let description: String?
let subscriptionTier: SubscriptionTier?
let topPadding: CGFloat?
init(title: String? = nil, description: String? = nil, subscriptionTier: SubscriptionTier? = nil, topPadding: CGFloat? = nil) {
... | @@ -5,11 +5,13 @@ struct StoryHeader2025: View {
let title: String?
let description: String?
let subscriptionTier: SubscriptionTier?
+ let topPadding: CGFloat?
- init(title: String? = nil, description: String? = nil, subscriptionTier: SubscriptionTier? = nil) {
+ init(title: String? = nil, des... | podcasts/End of Year/Stories/2025/StoryHeader2025.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Playback 25] Paywall Story | 3,669 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/End of Year/Stories/2025/StoryHeader2025.swift
PR Title: [Playback 25] Paywall Story
BEFORE CODE: import PocketCastsServer
struct StoryHeader2025: View {
let title: String?
let description: String?
let subscriptionTier: SubscriptionTier?
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
let smartPlaylistsWithDeleted = dataManager.allSmartPlaylists(includeDeleted: true)
XCTAssertEqual(smartPlaylistsWithDeleted.map(\.uuid), ["smart-active", "smart-deleted"])
}
func testFirstSortPosition() throws {
guard let dbPool = try DatabasePool.newTestDatabase() else {
... | No issues found. |
let smartPlaylistsWithDeleted = dataManager.allSmartPlaylists(includeDeleted: true)
XCTAssertEqual(smartPlaylistsWithDeleted.map(\.uuid), ["smart-active", "smart-deleted"])
}
func testFirstSortPosition() throws {
guard let dbPool = try DatabasePool.newTestDatabase() else {
... | @@ -40,4 +40,87 @@ final class PlaylistDataManagerTests: XCTestCase {
let smartPlaylistsWithDeleted = dataManager.allSmartPlaylists(includeDeleted: true)
XCTAssertEqual(smartPlaylistsWithDeleted.map(\.uuid), ["smart-active", "smart-deleted"])
}
+
+ func testFirstSortPosition() throws {
+ ... | Modules/DataModel/Tests/PocketCastsDataModelTests/PlaylistDataManagerTests.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Playlists] Address few UI feedback and new playlists order | 3,680 | Automattic/pocket-casts-ios | 1,136 | Swift | danielebogo | Review this pull request change.
Language: Swift
File: Modules/DataModel/Tests/PocketCastsDataModelTests/PlaylistDataManagerTests.swift
PR Title: [Playlists] Address few UI feedback and new playlists order
BEFORE CODE:
let smartPlaylistsWithDeleted = dataManager.allSmartPlaylists(includeDeleted: true)
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
podcastUuid: "manual-podcast"
)
addManualPlaylistEntry(
queue: queue,
episodeUuid: "manual-episode-2",
playlistId: 42,
playlistUuid: manualPlaylistUuid,
position: 1,
title: "Manual Episode 2",
podcastUuid: "m... | No issues found. | podcastUuid: "manual-podcast"
)
addManualPlaylistEntry(
queue: queue,
episodeUuid: "manual-episode-2",
playlistId: 42,
playlistUuid: manualPlaylistUuid,
position: 1,
title: "Manual Episode 2",
podcastUuid: "m... | @@ -60,6 +60,167 @@ final class UpNextEpisodeFetchTests: XCTestCase {
XCTAssertEqual(results.map(\.uuid), [upNextUserEpisode.uuid])
}
+ func testSavingUpNextEpisodeShiftsExistingUpNextEntries() throws {
+ let queue = try makeQueue()
+ let upNextManager = UpNextDataManager()
+ upN... | Modules/DataModel/Tests/PocketCastsDataModelTests/UpNextEpisodeFetchTests.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Playlists] Play All order fix with custom order Manual playlists | 3,701 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: Modules/DataModel/Tests/PocketCastsDataModelTests/UpNextEpisodeFetchTests.swift
PR Title: [Playlists] Play All order fix with custom order Manual playlists
BEFORE CODE: podcastUuid: "manual-podcast"
)
addManualPlaylistEntry(
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
.foregroundStyle(foregroundColor)
.background(backgroundColor)
.onAppear {
playMode = renderForSharing ? .paused(at: .progress(1)) : .playing(.fromProgress(0, toProgress: 1, loopMode: .autoReverse))
playModeNumbers = renderForSharing ? .playing(.fromProgress(0.5, toProgre... | No issues found. | .foregroundStyle(foregroundColor)
.background(backgroundColor)
.onAppear {
playMode = renderForSharing ? .paused(at: .progress(1)) : .playing(.fromProgress(0, toProgress: 1, loopMode: .autoReverse))
playModeNumbers = renderForSharing ? .playing(.fromProgress(0.5, toProgre... | @@ -44,35 +44,33 @@ struct ListeningTime2025Story: ShareableStory {
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(content: {
ZStack {
- LottieView(animation: .named("playback2025_listening_time_numbers"))
+ LottieView(anima... | podcasts/End of Year/Stories/2025/ListeningTime2025Story.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Playback 2025] Fix sync issues on listening animation | 3,712 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/End of Year/Stories/2025/ListeningTime2025Story.swift
PR Title: [Playback 2025] Fix sync issues on listening animation
BEFORE CODE: .foregroundStyle(foregroundColor)
.background(backgroundColor)
.onAppear {
playMode ... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import PocketCastsDataModel
import PocketCastsServer
import PocketCastsUtils
class UpNextHistoryModel: ObservableObject {
@Published var historyEntries: [UpNextHistoryManager.UpNextHistoryEntry] = []
@Published var episodes: [BaseEpisode] = []
private let dataManager: DataManager
init(dataManager: Da... | No issues found. | import PocketCastsDataModel
import PocketCastsServer
import PocketCastsUtils
class UpNextHistoryModel: ObservableObject {
@Published var historyEntries: [UpNextHistoryManager.UpNextHistoryEntry] = []
@Published var episodes: [BaseEpisode] = []
private let dataManager: DataManager
init(dataManager: Da... | @@ -43,4 +43,8 @@ class UpNextHistoryModel: ObservableObject {
FileLog.shared.addMessage("UpNextHistory: Restored Up Next Queue to \(upNextQueueCount) episodes")
}
}
+
+ func createSnapshot() {
+ dataManager.snapshotUpNext()
+ }
} | podcasts/Up Next History/UpNextHistoryModel.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Playlists] Up Next History snapshot fix | 3,718 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/Up Next History/UpNextHistoryModel.swift
PR Title: [Playlists] Up Next History snapshot fix
BEFORE CODE: import PocketCastsDataModel
import PocketCastsServer
import PocketCastsUtils
class UpNextHistoryModel: ObservableObject {
@Published var histo... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import SwiftUI
struct StoryLogoView: View {
var body: some View {
VStack {
Spacer()
HStack {
Spacer()
Image("logo")
.padding(.bottom, Constants.paddingBottom)
Spacer()
}
}
}
enum Constan... | No issues found. | import SwiftUI
struct StoryLogoView: View {
var body: some View {
VStack {
Spacer()
HStack {
Spacer()
Image("logo")
.padding(.bottom, Constants.paddingBottom)
Spacer()
}
}
}
enum Constan... | @@ -13,7 +13,7 @@ struct StoryLogoView: View {
}
}
- private enum Constants {
- static let paddingBottom = 24.0
+ enum Constants {
+ static let paddingBottom = 29.0
}
} | podcasts/End of Year/Stories/Views/StoryLogoView.swift | 0 | Swift | 1 | none | 16 | 20 | 20 | true | [Playback 2025] Fix padding in shareable story views | 3,719 | Automattic/pocket-casts-ios | 1,136 | Swift | bjtitus | Review this pull request change.
Language: Swift
File: podcasts/End of Year/Stories/Views/StoryLogoView.swift
PR Title: [Playback 2025] Fix padding in shareable story views
BEFORE CODE: import SwiftUI
struct StoryLogoView: View {
var body: some View {
VStack {
Spacer()
HStack {
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
// Make sure new items are shown
return actions + defaultActions.filter { !actions.contains($0) }
}
class func updateMultiSelectActions(_ actions: [MultiSelectAction]) {
let actionInts = actions.map(\.rawValue)
UserDefaults.standard.set(actionInts, forKey: Settings.multiSelectA... | No issues found. |
// Make sure new items are shown
return actions + defaultActions.filter { !actions.contains($0) }
}
class func updateMultiSelectActions(_ actions: [MultiSelectAction]) {
let actionInts = actions.map(\.rawValue)
UserDefaults.standard.set(actionInts, forKey: Settings.multiSelectA... | @@ -468,11 +468,11 @@ class Settings: NSObject {
}
class func displayableVersion() -> String {
- #if STAGING
- return L10n.appVersion(Settings.appVersion(), Settings.buildNumber()) + " - STAGING"
- #else
- return L10n.appVersion(Settings.appVersion(), Settings.buildNumber... | podcasts/Settings.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Playback 2025] Ensure sync for year is done based on model year | 3,767 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/Settings.swift
PR Title: [Playback 2025] Ensure sync for year is done based on model year
BEFORE CODE:
// Make sure new items are shown
return actions + defaultActions.filter { !actions.contains($0) }
}
class func updateMultiS... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
self?.tableData[indexPath.section].remove(at: indexPath.row)
tableView.deleteRows(at: [indexPath], with: .fade)
}
}
cell.onRequestEarlyAccessTap = { [weak self] _ in
let viewModel = KidsProfileSheetViewModel()
... | No issues found. | self?.tableData[indexPath.section].remove(at: indexPath.row)
tableView.deleteRows(at: [indexPath], with: .fade)
}
}
cell.onRequestEarlyAccessTap = { [weak self] _ in
let viewModel = KidsProfileSheetViewModel()
... | @@ -447,7 +447,7 @@ class ProfileViewController: PCViewController, UITableViewDataSource, UITableVie
var data: [[ProfileViewController.TableRow]]
data = [[.allStats, .downloaded, .uploadedFiles, .starred, .bookmarks, .listeningHistory, .help]]
- if EndOfYear.isEligible {
+ if EndOfYear... | podcasts/ProfileViewController.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Playback 2025] Update checks for end of year | 3,790 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: podcasts/ProfileViewController.swift
PR Title: [Playback 2025] Update checks for end of year
BEFORE CODE: self?.tableData[indexPath.section].remove(at: indexPath.row)
tableView.deleteRows(at: [indexPath], with: .fade)
... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
WHERE n.rn = 1
\(playlistPositionOrderBy)
LIMIT \(limit)
"""
}
private static func select(clause: SelectClause) -> String {
switch clause {
case .episode:
return "SELECT episode.* FROM \(DataManager.episodeTableName) episode LEFT JOIN \(DataManager.po... | No issues found. | WHERE n.rn = 1
\(playlistPositionOrderBy)
LIMIT \(limit)
"""
}
private static func select(clause: SelectClause) -> String {
switch clause {
case .episode:
return "SELECT episode.* FROM \(DataManager.episodeTableName) episode LEFT JOIN \(DataManager.po... | @@ -44,61 +44,49 @@ public class PlaylistQueryBuilder {
var queryString: String = ""
if playlist.manual {
- let manualCTE =
- """
- WITH playlist AS (
- SELECT episodeUuid, MIN(episodePosition) AS pos
- FROM \(DataManager.pla... | Modules/DataModel/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | [Playlists] Improve artwork and count queries | 3,807 | Automattic/pocket-casts-ios | 1,136 | Swift | danielebogo | Review this pull request change.
Language: Swift
File: Modules/DataModel/Sources/PocketCastsDataModel/Public/PlaylistQueryBuilder.swift
PR Title: [Playlists] Improve artwork and count queries
BEFORE CODE: WHERE n.rn = 1
\(playlistPositionOrderBy)
LIMIT \(limit)
"""
}
private... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
) async throws -> Data {
if let task = dataRequestMap[podcastUuid] {
return try await task.value
}
let url = ServerHelper.asUrl(ServerConstants.Urls.cache() + "mobile/show_notes/full/\(podcastUuid)")
let cachePolicy: URLRequest.CachePolicy = FeatureFlag.episodesInfoCache... | No issues found. | ) async throws -> Data {
if let task = dataRequestMap[podcastUuid] {
return try await task.value
}
let url = ServerHelper.asUrl(ServerConstants.Urls.cache() + "mobile/show_notes/full/\(podcastUuid)")
let cachePolicy: URLRequest.CachePolicy = FeatureFlag.episodesInfoCache... | @@ -17,13 +17,15 @@ public actor ShowInfoDataRetriever {
for podcastUuid: String,
episodeUuid: String
) async throws -> String? {
- let url = ServerHelper.asUrl(ServerConstants.Urls.cache() + "mobile/show_notes/full/\(podcastUuid)")
- let request = URLRequest(url: url)
-
- if... | Modules/Server/Sources/PocketCastsServer/Public/Cache/ShowInfoDataRetriever.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Use cache policy to reload episode info if necessary | 3,818 | Automattic/pocket-casts-ios | 1,136 | Swift | danielebogo | Review this pull request change.
Language: Swift
File: Modules/Server/Sources/PocketCastsServer/Public/Cache/ShowInfoDataRetriever.swift
PR Title: Use cache policy to reload episode info if necessary
BEFORE CODE: ) async throws -> Data {
if let task = dataRequestMap[podcastUuid] {
return try... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
/// Skips switching player to downloaded file if already playing from the same cached streamed file
case doNotSwitchToDownloadedFile
/// Do not show the free trial timeline on the upgrade screens on all variants
case newOnboardingUpgradeTrialTimeline
/// Use the new interests and recommendations ... | No issues found. |
/// Skips switching player to downloaded file if already playing from the same cached streamed file
case doNotSwitchToDownloadedFile
/// Do not show the free trial timeline on the upgrade screens on all variants
case newOnboardingUpgradeTrialTimeline
/// Use the new interests and recommendations ... | @@ -261,6 +261,9 @@ public enum FeatureFlag: String, CaseIterable {
/// Ignores play remote commands when other audio is playing
case ignorePlayWithOtherAudio
+ /// Read streaming data from memory buffer it's available
+ case streamAndDownloadReadFromMemoryBuffer
+
public var enabled: Bool {
... | Modules/Utils/Sources/PocketCastsUtils/Feature Flags/FeatureFlag.swift | 0 | Swift | 1 | none | 16 | 51 | 51 | true | Resource loader use memory buffer to fulfil requests | 3,829 | Automattic/pocket-casts-ios | 1,136 | Swift | SergioEstevao | Review this pull request change.
Language: Swift
File: Modules/Utils/Sources/PocketCastsUtils/Feature Flags/FeatureFlag.swift
PR Title: Resource loader use memory buffer to fulfil requests
BEFORE CODE:
/// Skips switching player to downloaded file if already playing from the same cached streamed file
case ... | No issues found. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.