Skip to content
Merged
Changes from 1 commit
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 @@ -65,6 +65,13 @@ struct StatsTotalInsightsData {
}

public static func makeTotalInsightsGuideText(lastPostInsight: StatsLastPostInsight?, statsSummaryType: StatsSummaryType) -> NSAttributedString? {

/// 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 nil
}

switch statsSummaryType {
case .likes:
guard let summary = lastPostInsight else {
Expand Down