Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,12 @@ class StatsTotalInsightsCell: StatsBaseCell {

// Rebuilds guide view for accessibility only if guide view already exists
private func rebuildGuideViewIfNeeded() {
/// NSAttributedString initialized with HTML on the background crashes the app
/// This method can be called when traitCollectionDidChange which can be triggered when app goes to background
guard UIApplication.shared.applicationState != .background else {
return
}

if guideText != nil,
let statsSummaryType = statsSummaryType,
let guideText = StatsTotalInsightsData.makeTotalInsightsGuideText(lastPostInsight: lastPostInsight, statsSummaryType: statsSummaryType) {
Expand Down