Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit 4d0644e

Browse files
committed
Fix indentation from 813e091
1 parent 813e091 commit 4d0644e

File tree

2 files changed

+59
-59
lines changed

2 files changed

+59
-59
lines changed

Classes/Issues/IssueManagingContextController.swift

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -90,51 +90,51 @@ final class IssueManagingContextController: NSObject, ContextMenuDelegate {
9090
}
9191

9292
func item(_ action: Action) -> ContrastContextMenuItem {
93-
let title: String
94-
let iconName: String
95-
96-
switch action {
97-
case .labels:
98-
title = Constants.Strings.labels
99-
iconName = "tag"
100-
case .milestone:
101-
title = Constants.Strings.milestone
102-
iconName = "milestone"
103-
case .assignees:
104-
title = Constants.Strings.assignees
105-
iconName = "person"
106-
case .reviewers:
107-
title = Constants.Strings.reviewers
108-
iconName = "reviewer"
109-
case .unlock:
110-
title = NSLocalizedString("Unlock", comment: "")
111-
iconName = "key"
112-
case .lock:
113-
title = NSLocalizedString("Lock", comment: "")
114-
iconName = "lock"
115-
case .reopen:
116-
title = Constants.Strings.reopen
117-
iconName = "sync"
118-
case .close:
119-
title = Constants.Strings.close
120-
iconName = "x"
121-
}
122-
123-
let separator: Bool
124-
switch action {
125-
case .reopen, .close: separator = true
126-
default: separator = false
127-
}
128-
129-
let iconColor: UIColor
130-
switch action {
131-
case .close: iconColor = Styles.Colors.Red.medium.color
132-
default: iconColor = Styles.Colors.Blue.medium.color
133-
}
134-
135-
return ContrastContextMenuItem(title: title, iconName: iconName, iconColor: iconColor,
136-
separator: separator, action: actionBlock(action))
137-
93+
let title: String
94+
let iconName: String
95+
96+
switch action {
97+
case .labels:
98+
title = Constants.Strings.labels
99+
iconName = "tag"
100+
case .milestone:
101+
title = Constants.Strings.milestone
102+
iconName = "milestone"
103+
case .assignees:
104+
title = Constants.Strings.assignees
105+
iconName = "person"
106+
case .reviewers:
107+
title = Constants.Strings.reviewers
108+
iconName = "reviewer"
109+
case .unlock:
110+
title = NSLocalizedString("Unlock", comment: "")
111+
iconName = "key"
112+
case .lock:
113+
title = NSLocalizedString("Lock", comment: "")
114+
iconName = "lock"
115+
case .reopen:
116+
title = Constants.Strings.reopen
117+
iconName = "sync"
118+
case .close:
119+
title = Constants.Strings.close
120+
iconName = "x"
121+
}
122+
123+
let separator: Bool
124+
switch action {
125+
case .reopen, .close: separator = true
126+
default: separator = false
127+
}
128+
129+
let iconColor: UIColor
130+
switch action {
131+
case .close: iconColor = Styles.Colors.Red.medium.color
132+
default: iconColor = Styles.Colors.Blue.medium.color
133+
}
134+
135+
return ContrastContextMenuItem(title: title, iconName: iconName, iconColor: iconColor,
136+
separator: separator, action: actionBlock(action))
137+
138138
}
139139

140140
func actionBlock(_ action: Action) -> (ContrastContextMenu) -> Void {

Classes/View Controllers/ContrastContextMenu.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ struct ContrastContextMenuItem {
1515
let iconColor: UIColor?
1616
let separator: Bool
1717
let action: ((ContrastContextMenu) -> Void)?
18-
18+
1919
init(
20-
title: String,
21-
iconName: String? = nil,
22-
iconColor: UIColor? = Styles.Colors.Blue.medium.color,
23-
separator: Bool = false,
24-
action: ((ContrastContextMenu) -> Void)? = nil
25-
) {
26-
self.title = title
27-
self.iconName = iconName
28-
self.iconColor = iconColor
29-
self.separator = separator
30-
self.action = action
20+
title: String,
21+
iconName: String? = nil,
22+
iconColor: UIColor? = Styles.Colors.Blue.medium.color,
23+
separator: Bool = false,
24+
action: ((ContrastContextMenu) -> Void)? = nil
25+
) {
26+
self.title = title
27+
self.iconName = iconName
28+
self.iconColor = iconColor
29+
self.separator = separator
30+
self.action = action
3131
}
3232

3333
}
@@ -95,9 +95,9 @@ final class ContrastContextMenu: UITableViewController {
9595
if let iconName = item.iconName {
9696
cell.imageView?.image = UIImage(named: iconName)?.withRenderingMode(.alwaysTemplate)
9797
}
98-
98+
9999
if let iconColor = item.iconColor {
100-
cell.imageView?.tintColor = iconColor
100+
cell.imageView?.tintColor = iconColor
101101
}
102102

103103
if let cell = cell as? Cell {

0 commit comments

Comments
 (0)