File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
ViewRelated/Blog/Blog Dashboard/Cards/Prompts Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ public class BloggingPrompt: NSManagedObject {
17
17
self . displayAvatarURLs = [ ]
18
18
}
19
19
20
+ var promptAttribution : BloggingPromptsAttribution ? {
21
+ BloggingPromptsAttribution ( rawValue: attribution. lowercased ( ) )
22
+ }
23
+
20
24
/// Convenience method to map properties from `RemoteBloggingPrompt`.
21
25
///
22
26
/// - Parameters:
Original file line number Diff line number Diff line change @@ -352,8 +352,7 @@ private extension DashboardPromptsCardCell {
352
352
promptLabel. text = forExampleDisplay ? Strings . examplePrompt : prompt? . text. stringByDecodingXMLCharacters ( ) . trim ( )
353
353
containerStackView. addArrangedSubview ( promptTitleView)
354
354
355
- if let promptAttribution = prompt? . attribution. lowercased ( ) ,
356
- let attribution = BloggingPromptsAttribution ( rawValue: promptAttribution) {
355
+ if let attribution = prompt? . promptAttribution {
357
356
attributionIcon. image = attribution. iconImage
358
357
attributionSourceLabel. attributedText = attribution. attributedText
359
358
containerStackView. addArrangedSubview ( attributionStackView)
You can’t perform that action at this time.
0 commit comments