Skip to content

Commit

Permalink
Trying to fix crash when hiding git panel
Browse files Browse the repository at this point in the history
  • Loading branch information
arguiot committed May 16, 2019
1 parent 2e06e23 commit 1e67956
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions StudIO/Editor/Controllers/GitCommit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,13 @@ class GitCommit: UIView {

func reloadProperties() {
DispatchQueue.global().async {
self.status = []

guard let rsg2 = self.repo?.pointer else { return }

let r = GTRepository(gitRepository: rsg2)

guard nil != r?.fileURL else { return }
do {
try r?.enumerateFileStatus(options: nil, usingBlock: { (delta1, delta2, val) in
if delta2?.status != GTDeltaType.unmodified {
Expand Down
5 changes: 4 additions & 1 deletion StudIO/Editor/WorkingDirDetailVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ class WorkingDirDetailVC: UIViewController {
save()

let p = editorView?.gitPanel
p?.reloadProperties()

if p?.isHidden == true {
p?.reloadProperties()
}
p?.isHidden = !(p?.isHidden ?? false)

}
Expand Down
2 changes: 1 addition & 1 deletion StudIO/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>827</string>
<string>830</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>LSSupportsOpeningDocumentsInPlace</key>
Expand Down

0 comments on commit 1e67956

Please sign in to comment.