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

Commit 1029698

Browse files
Huddiernystrom
authored andcommitted
Move lock (#2206)
* Moves lock under divider * fix param style * Update IssueManagingContextController.swift
1 parent 3ebd279 commit 1029698

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

Classes/Issues/IssueManagingContextController.swift

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,20 +140,29 @@ final class IssueManagingContextController: NSObject, ContextMenuDelegate {
140140
iconName = "x"
141141
}
142142

143+
// Lock always has the divider above it assuming you're a collaborator.
144+
// If you aren't a collaborator (Lock does not show), close has the divider above it.
143145
let separator: Bool
144146
switch action {
145-
case .reopen, .close: separator = true
147+
case .lock, .unlock: separator = true
148+
case .reopen, .close: separator = permissions != .collaborator
146149
default: separator = false
147150
}
148151

149152
let iconColor: UIColor
150153
switch action {
154+
case .lock: iconColor = Styles.Colors.Gray.light.color
151155
case .close: iconColor = Styles.Colors.Red.medium.color
152156
default: iconColor = Styles.Colors.Blue.medium.color
153157
}
154158

155-
return ContrastContextMenuItem(title: title, iconName: iconName, iconColor: iconColor,
156-
separator: separator, action: actionBlock(action))
159+
return ContrastContextMenuItem(
160+
title: title,
161+
iconName: iconName,
162+
iconColor: iconColor,
163+
separator: separator,
164+
action: actionBlock(action)
165+
)
157166

158167
}
159168

0 commit comments

Comments
 (0)