Skip to content

Commit

Permalink
Fix crash when changing translations from TranslatedVerse screen (#565)
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamede1945 authored Oct 15, 2023
1 parent c8d92bd commit 7d3e24c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Features/QuranViewFeature/QuranViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,11 @@ class QuranViewController: BaseViewController, QuranViewDelegate,
}

private func updateTitle(_ pages: [Page]) {
if pages.isEmpty {
titleView?.firstLine = ""
titleView?.secondLine = ""
return
}
let suras = pages.map(\.startSura)
let juzs = pages.map(\.startJuz)
let pageNumbers = pages.map(\.pageNumber).map(NumberFormatter.shared.format).joined(separator: " - ")
Expand Down

0 comments on commit 7d3e24c

Please sign in to comment.