Skip to content

Commit 1e67956

Browse files
committed
Trying to fix crash when hiding git panel
cc libgit2/objective-git#690
1 parent 2e06e23 commit 1e67956

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

StudIO/Editor/Controllers/GitCommit.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,13 @@ class GitCommit: UIView {
9090

9191
func reloadProperties() {
9292
DispatchQueue.global().async {
93+
self.status = []
94+
9395
guard let rsg2 = self.repo?.pointer else { return }
96+
9497
let r = GTRepository(gitRepository: rsg2)
98+
99+
guard nil != r?.fileURL else { return }
95100
do {
96101
try r?.enumerateFileStatus(options: nil, usingBlock: { (delta1, delta2, val) in
97102
if delta2?.status != GTDeltaType.unmodified {

StudIO/Editor/WorkingDirDetailVC.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ class WorkingDirDetailVC: UIViewController {
160160
save()
161161

162162
let p = editorView?.gitPanel
163-
p?.reloadProperties()
163+
164+
if p?.isHidden == true {
165+
p?.reloadProperties()
166+
}
164167
p?.isHidden = !(p?.isHidden ?? false)
165168

166169
}

StudIO/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundleShortVersionString</key>
1818
<string>1.0</string>
1919
<key>CFBundleVersion</key>
20-
<string>827</string>
20+
<string>830</string>
2121
<key>LSRequiresIPhoneOS</key>
2222
<true/>
2323
<key>LSSupportsOpeningDocumentsInPlace</key>

0 commit comments

Comments
 (0)