This repository was archived by the owner on Sep 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,20 @@ ContextMenuDelegate {
159
159
. newIssue ( issueController: newIssueViewController)
160
160
}
161
161
162
+ func workingCopyAction( ) -> UIAlertAction ? {
163
+ guard let remote = self . repoUrl. absoluteString. addingPercentEncoding ( withAllowedCharacters: CharacterSet . alphanumerics) else { return nil }
164
+
165
+ guard let url = URL ( string: " working-copy://show?remote= \( remote) " ) else { return nil }
166
+ guard UIApplication . shared. canOpenURL ( url) else { return nil }
167
+
168
+ let title = NSLocalizedString ( " Working Copy " , comment: " " )
169
+ let action = UIAlertAction ( title: title, style: . default,
170
+ handler: { _ in
171
+ UIApplication . shared. open ( url)
172
+ } )
173
+ return action
174
+ }
175
+
162
176
@objc func onMore( sender: UIButton ) {
163
177
let alertTitle = " \( repo. owner) / \( repo. name) : \( branch) "
164
178
let alert = UIAlertController . configured ( title: alertTitle, preferredStyle: . actionSheet)
@@ -173,6 +187,7 @@ ContextMenuDelegate {
173
187
$0. popoverPresentationController? . setSourceView ( sender)
174
188
} ,
175
189
switchBranchAction,
190
+ workingCopyAction ( ) ,
176
191
AlertAction . cancel ( )
177
192
] )
178
193
alert. popoverPresentationController? . setSourceView ( sender)
Original file line number Diff line number Diff line change 52
52
<key >LSApplicationQueriesSchemes </key >
53
53
<array >
54
54
<string >org-appextension-feature-password-management </string >
55
+ <string >working-copy </string >
55
56
</array >
56
57
<key >LSRequiresIPhoneOS </key >
57
58
<true />
You can’t perform that action at this time.
0 commit comments