code review - extra spacing
This commit is contained in:
parent
614a2b89c8
commit
5098bc911b
@ -10,15 +10,15 @@ public extension LabelModel {
|
||||
|
||||
convenience init(linkAction: [AnyHashable: Any]) {
|
||||
// Concatentate the text.
|
||||
let title = linkAction.stringForkey(KeyTitle)
|
||||
var titlePrefix = linkAction.stringForkey(KeyTitlePrefix)
|
||||
var titlePostfix = linkAction.stringForkey(KeyTitlePostfix)
|
||||
if !titlePrefix.isEmpty {
|
||||
if !titlePrefix.isEmpty && (!title.isEmpty || !titlePostfix.isEmpty) {
|
||||
titlePrefix += " "
|
||||
}
|
||||
if !titlePostfix.isEmpty {
|
||||
if !titlePostfix.isEmpty && !title.isEmpty {
|
||||
titlePostfix = " " + titlePostfix
|
||||
}
|
||||
let title = linkAction.optionalStringForKey(KeyTitle) ?? ""
|
||||
let text = "\(titlePrefix)\(title)\(titlePostfix)"
|
||||
|
||||
// Initialize with text.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user