Skip to content

Commit

Permalink
remove unused, not working debug variables from context
Browse files Browse the repository at this point in the history
closes #1975 (read Explanation on that issue)
  • Loading branch information
Simon-Laux authored and r10s committed Nov 23, 2023
1 parent a5e4be7 commit 8b54ca1
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions DcCore/DcCore/DC/Wrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ public class DcContext {

public var logger: Logger?
var contextPointer: OpaquePointer?
public var lastWarningString: String = "" // temporary thing to get a grip on some weird errors
public var maxConfigureProgress: Int = 0 // temporary thing to get a grip on some weird errors
private var anyWebxdcSeen: Bool = false

public init(contextPointer: OpaquePointer?, logger: Logger?) {
Expand Down Expand Up @@ -494,8 +492,6 @@ public class DcContext {
}

public func configure() {
maxConfigureProgress = 0
lastWarningString = ""
dc_configure(contextPointer)
}

Expand Down
2 changes: 0 additions & 2 deletions DcCore/DcCore/DC/events.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ public class DcEventHandler {

case DC_EVENT_WARNING:
let s = event.data2String
dcContext.lastWarningString = s
dcContext.logger?.warning("event: \(s)")

case DC_EVENT_CONFIGURE_PROGRESS:
dcContext.maxConfigureProgress = max(dcContext.maxConfigureProgress, Int(data1))
dcContext.logger?.info("configure progress: \(Int(data1)) \(Int(data2))")
let nc = NotificationCenter.default
DispatchQueue.main.async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,6 @@ class AccountSetupController: UITableViewController, ProgressAlertHandler {
if let reachability = appDelegate.reachability, reachability.connection == .unavailable {
errorMessage = String.localized("login_error_no_internet_connection")
}
} else {
errorMessage = "\(errorMessage ?? "no message")\n\n(warning=\(self.dcContext.lastWarningString) (progress=\(self.dcContext.maxConfigureProgress))"
}
self.updateProgressAlert(error: errorMessage)
} else if let done = ui["done"] as? Bool, done {
Expand Down

0 comments on commit 8b54ca1

Please sign in to comment.