Skip to content

Commit

Permalink
Merge release/7.81 into trunk (#2719)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioEstevao authored Jan 31, 2025
2 parents 1310580 + 86b556d commit 3ec7c14
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VERSION_LONG = 7.81.0.2
VERSION_LONG = 7.81.0.3
VERSION_SHORT = 7.81
5 changes: 5 additions & 0 deletions podcasts/PodcastHeadingTableCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@ class PodcastHeadingTableCell: ThemeableCell, SubscribeButtonDelegate, Expandabl
@IBOutlet var bookmarkTabsView: UIStackView!
private var tabsViewController: ThemedHostingController<EpisodeBookmarksTabsView>? = nil

override func prepareForReuse() {
super.prepareForReuse()
richPodcastDescription.reset()
}

private func addBookmarksTabView(parentController: UIViewController) {
// Make sure the view reappears
if let tabsViewController {
Expand Down
2 changes: 1 addition & 1 deletion podcasts/PodcastViewController+TableData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ extension PodcastViewController: UITableViewDataSource, UITableViewDelegate {

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == PodcastViewController.headerSection {
let cell = tableView.dequeueReusableCell(withIdentifier: PodcastViewController.headerCellId, for: indexPath) as! PodcastHeadingTableCell
let cell = podcastHeadingCell
cell.populateFrom(tintColor: podcast?.iconTintColor(), delegate: self, parentController: self)
cell.buttonsEnabled = !isMultiSelectEnabled
return cell
Expand Down
6 changes: 6 additions & 0 deletions podcasts/PodcastViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,12 @@ class PodcastViewController: FakeNavViewController, PodcastActionsDelegate, Sync
updateColors()
}

lazy var podcastHeadingCell: PodcastHeadingTableCell = {
let nib = Bundle.main.loadNibNamed("PodcastHeadingTableCell", owner: self, options: nil)
let cell = nib?[0] as! PodcastHeadingTableCell
return cell
}()

private var hasAppearedAlready = false
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
Expand Down
13 changes: 12 additions & 1 deletion podcasts/RichExpandableDescriptionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class RichExpandableLabel: WKWebView {
private var contentHeight: CGFloat = 0
private var htmlReady: Bool = false
private var previousHTML: String = ""
private var isFirstTime = true

private lazy var linkTapGesture: UITapGestureRecognizer = {
let tapGesture = UITapGestureRecognizer(target: self, action: #selector(labelTapped))
Expand Down Expand Up @@ -40,6 +41,13 @@ class RichExpandableLabel: WKWebView {
updateStyle()
}

func reset() {
htmlReady = false
previousHTML = ""
frame = .zero
heightConstraint.constant = 0
}

private func updateStyle() {
isOpaque = false
scrollView.backgroundColor = .clear
Expand Down Expand Up @@ -148,6 +156,10 @@ class RichExpandableLabel: WKWebView {
contentHeight = CGFloat(cgHeight)
htmlReady = true
update()
if isFirstTime {
isFirstTime = false
updateLinesRequired()
}
})
}

Expand All @@ -174,7 +186,6 @@ extension RichExpandableLabel: WKNavigationDelegate {
}
updateStyle()
updateScrollSize()
updateLinesRequired()
})
}

Expand Down
4 changes: 4 additions & 0 deletions podcasts/sv.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ Tryck på knappen nedan för att logga in på ditt Pocket Casts-konto igen.</str
<string>Tack för att du väljer Pocket Casts. Fakturering startar när din gratismånad har löpt ut.</string>
<key>cancel_subscription_offer_success_view_title</key>
<string>Njut av din gratismånad!</string>
<key>cancel_subscription_promotion_description</key>
<string>Spara %@ i början av nästa faktureringscykel.</string>
<key>cancel_subscription_promotion_title</key>
<string>Få nästa månad gratis</string>
<key>cancel_subscription_title</key>
Expand Down Expand Up @@ -1350,6 +1352,8 @@ podcasts med dig</string>
<string>Du behöver konfigurera ett e-postkonto på enheten för att skicka loggarna</string>
<key>manage_downloads_action</key>
<string>Hantera nedladdningar</string>
<key>manage_downloads_detail</key>
<string>Spara %1$@ genom att hantera nedladdade avsnitt.</string>
<key>manage_downloads_title</key>
<string>Behöver du frigöra utrymme?</string>
<key>mark_played</key>
Expand Down
8 changes: 8 additions & 0 deletions podcasts/zh-Hant.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,10 @@ Tap the button below to sign into your Pocket Casts account again.</string>
<string>無法取消</string>
<key>cancel_subscription</key>
<string>取消訂閱</string>
<key>cancel_subscription_available_plans_footer</key>
<string>新的方案會在目前的帳單週期結束時生效。</string>
<key>cancel_subscription_available_plans_retry_screen_text</key>
<string>抱歉,擷取方案時發生錯誤。</string>
<key>cancel_subscription_available_plans_title</key>
<string>可供取消的方案</string>
<key>cancel_subscription_claim_offer_button</key>
Expand All @@ -357,6 +361,8 @@ Tap the button below to sign into your Pocket Casts account again.</string>
<string>感謝選用 Pocket Casts。 免費試用月結束後,將開始計費。</string>
<key>cancel_subscription_offer_success_view_title</key>
<string>盡情免費試用一個月!</string>
<key>cancel_subscription_promotion_description</key>
<string>自下一期帳單起省下 %@。</string>
<key>cancel_subscription_promotion_title</key>
<string>下個月免費使用</string>
<key>cancel_subscription_title</key>
Expand Down Expand Up @@ -1346,6 +1352,8 @@ Tap the button below to sign into your Pocket Casts account again.</string>
<string>請在裝置上設定電子郵件帳號,以利傳送記錄</string>
<key>manage_downloads_action</key>
<string>管理下載項目</string>
<key>manage_downloads_detail</key>
<string>整理已下載的單集,就能省下 %1$@ 的空間。</string>
<key>manage_downloads_title</key>
<string>需要騰出更多空間?</string>
<key>mark_played</key>
Expand Down

0 comments on commit 3ec7c14

Please sign in to comment.