Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 16 additions & 48 deletions ownCloud.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

31 changes: 13 additions & 18 deletions ownCloud/Bookmarks/BookmarkViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,10 @@ class BookmarkViewController: StaticTableViewController {

certificateRow = StaticTableViewRow(rowWithAction: { [weak self] (_, _) in
if let certificate = self?.bookmark?.certificate {
if let certificateViewController : ThemeCertificateViewController = ThemeCertificateViewController(certificate: certificate) {
let navigationController = ThemeNavigationController(rootViewController: certificateViewController)
let certificateViewController : ThemeCertificateViewController = ThemeCertificateViewController(certificate: certificate, compare: nil)
let navigationController = ThemeNavigationController(rootViewController: certificateViewController)

self?.present(navigationController, animated: true, completion: nil)
}
self?.present(navigationController, animated: true, completion: nil)
}
}, title: "Certificate Details".localized, accessoryType: .disclosureIndicator, accessoryView: BorderedLabel(), identifier: "row-url-certificate")

Expand Down Expand Up @@ -423,10 +422,12 @@ class BookmarkViewController: StaticTableViewController {

if issue != nil {
// Parse issue for display
if let displayIssues = issue?.prepareForDisplay() {
if displayIssues.displayLevel.rawValue >= OCIssueLevel.warning.rawValue {
if let issue = issue {
let displayIssues = issue.prepareForDisplay()

if displayIssues.isAtLeast(level: .warning) {
// Present issues if the level is >= warning
let issuesViewController = ConnectionIssueViewController(displayIssues: displayIssues, completion: { [weak self] (response) in
IssuesCardViewController.present(on: self, issue: issue, displayIssues: displayIssues, completion: { [weak self, weak issue] (response) in
switch response {
case .cancel:
issue?.reject()
Expand All @@ -440,11 +441,9 @@ class BookmarkViewController: StaticTableViewController {
self?.bookmark?.url = nil
}
})

self.present(issuesViewController, animated: true, completion: nil)
} else {
// Do not present issues
issue?.approve()
issue.approve()
continueToNextStep()
}
}
Expand Down Expand Up @@ -503,8 +502,8 @@ class BookmarkViewController: StaticTableViewController {
self.updateInputFocus(fallbackRow: self.passwordRow)
} else if nsError?.isOCError(withCode: .authorizationCancelled) == true {
// User cancelled authorization, no reaction needed
} else {
let issuesViewController = ConnectionIssueViewController(displayIssues: issue?.prepareForDisplay(), completion: { [weak self] (response) in
} else if let issue = issue {
IssuesCardViewController.present(on: self, issue: issue, completion: { [weak self, weak issue] (response) in
switch response {
case .cancel:
issue?.reject()
Expand All @@ -516,8 +515,6 @@ class BookmarkViewController: StaticTableViewController {
case .dismiss: break
}
})

self.present(issuesViewController, animated: true, completion: nil)
}
})
}
Expand Down Expand Up @@ -598,10 +595,10 @@ class BookmarkViewController: StaticTableViewController {
} else {
OnMainThread {
hudCompletion({
if issue != nil {
if let issue = issue {
self?.bookmark?.authenticationData = nil

let issuesViewController = ConnectionIssueViewController(displayIssues: issue?.prepareForDisplay(), completion: { [weak self] (response) in
IssuesCardViewController.present(on: strongSelf, issue: issue, completion: { [weak self, weak issue] (response) in
switch response {
case .cancel:
issue?.reject()
Expand All @@ -613,8 +610,6 @@ class BookmarkViewController: StaticTableViewController {
case .dismiss: break
}
})

strongSelf.present(issuesViewController, animated: true, completion: nil)
} else {
strongSelf.presentingViewController?.dismiss(animated: true, completion: nil)
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading