Respond to CR.

pull/1/head
Matthew Chen 6 years ago
parent f34bdd34bc
commit d4f7b5d45b

@ -72,10 +72,10 @@ class CompareSafetyNumbersActivity: UIActivity {
let pasteboardSafetyNumbers = pasteboardString! let pasteboardSafetyNumbers = pasteboardString!
if pasteboardSafetyNumbers == mySafetyNumbers { if pasteboardSafetyNumbers == mySafetyNumbers {
Logger.info("successfully matched safety numbers. local numbers: \(String(describing: self.mySafetyNumbers)) pasteboard:\(pasteboardSafetyNumbers)") Logger.info("successfully matched safety numbers. local numbers: \(String(describing: mySafetyNumbers)) pasteboard:\(pasteboardSafetyNumbers)")
delegate.compareSafetyNumbersActivitySucceeded(activity: self) delegate.compareSafetyNumbersActivitySucceeded(activity: self)
} else { } else {
Logger.warn("local numbers: \(String(describing: self.mySafetyNumbers)) didn't match pasteboard:\(pasteboardSafetyNumbers)") Logger.warn("local numbers: \(String(describing: mySafetyNumbers)) didn't match pasteboard:\(pasteboardSafetyNumbers)")
let error = OWSErrorWithCodeDescription(OWSErrorCode.privacyVerificationFailure, let error = OWSErrorWithCodeDescription(OWSErrorCode.privacyVerificationFailure,
NSLocalizedString("PRIVACY_VERIFICATION_FAILED_MISMATCHED_SAFETY_NUMBERS_IN_CLIPBOARD", comment: "Alert body")) NSLocalizedString("PRIVACY_VERIFICATION_FAILED_MISMATCHED_SAFETY_NUMBERS_IN_CLIPBOARD", comment: "Alert body"))
delegate.compareSafetyNumbersActivity(self, failedWithError: error) delegate.compareSafetyNumbersActivity(self, failedWithError: error)

@ -102,7 +102,7 @@ class CallViewController: OWSViewController, CallObserver, CallServiceObserver,
// MARK: - Audio Source // MARK: - Audio Source
var hasAlternateAudioSources: Bool { var hasAlternateAudioSources: Bool {
Logger.info("available audio sources: \(self.allAudioSources)") Logger.info("available audio sources: \(allAudioSources)")
// internal mic and speakerphone will be the first two, any more than one indicates e.g. an attached bluetooth device. // internal mic and speakerphone will be the first two, any more than one indicates e.g. an attached bluetooth device.
// TODO is this sufficient? Are their devices w/ bluetooth but no external speaker? e.g. ipod? // TODO is this sufficient? Are their devices w/ bluetooth but no external speaker? e.g. ipod?

@ -22,7 +22,7 @@ class GifPickerViewController: OWSViewController, UISearchBarDelegate, UICollect
private var viewMode = ViewMode.idle { private var viewMode = ViewMode.idle {
didSet { didSet {
Logger.info("viewMode: \(self.viewMode)") Logger.info("viewMode: \(viewMode)")
updateContents() updateContents()
} }
@ -301,7 +301,7 @@ class GifPickerViewController: OWSViewController, UISearchBarDelegate, UICollect
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: kCellReuseIdentifier, for: indexPath) let cell = collectionView.dequeueReusableCell(withReuseIdentifier: kCellReuseIdentifier, for: indexPath)
guard indexPath.row < imageInfos.count else { guard indexPath.row < imageInfos.count else {
Logger.warn("indexPath: \(indexPath.row) out of range for imageInfo count: \(self.imageInfos.count) ") Logger.warn("indexPath: \(indexPath.row) out of range for imageInfo count: \(imageInfos.count) ")
return cell return cell
} }
let imageInfo = imageInfos[indexPath.row] let imageInfo = imageInfos[indexPath.row]

@ -623,7 +623,7 @@ class MediaGalleryViewController: OWSNavigationController, MediaGalleryDataSourc
// Range instead of indexSet since it's contiguous? // Range instead of indexSet since it's contiguous?
var fetchedIndexSet = IndexSet() { var fetchedIndexSet = IndexSet() {
didSet { didSet {
Logger.debug("\(oldValue) -> \(self.fetchedIndexSet)") Logger.debug("\(oldValue) -> \(fetchedIndexSet)")
} }
} }

@ -96,7 +96,7 @@ public class OWS2FAReminderViewController: UIViewController, PinEntryViewDelegat
} }
private func didSubmitCorrectPin() { private func didSubmitCorrectPin() {
Logger.info("noWrongGuesses: \(self.noWrongGuesses)") Logger.info("noWrongGuesses: \(noWrongGuesses)")
self.dismiss(animated: true) self.dismiss(animated: true)

@ -138,7 +138,7 @@ private class SignalCallData: NSObject {
didSet { didSet {
AssertIsOnMainThread() AssertIsOnMainThread()
Logger.info("\(self.isRemoteVideoEnabled)") Logger.info("\(isRemoteVideoEnabled)")
} }
} }
@ -146,7 +146,7 @@ private class SignalCallData: NSObject {
didSet { didSet {
AssertIsOnMainThread() AssertIsOnMainThread()
Logger.debug(".peerConnectionClient setter: \(oldValue != nil) -> \(self.peerConnectionClient != nil) \(String(describing: self.peerConnectionClient))") Logger.debug(".peerConnectionClient setter: \(oldValue != nil) -> \(peerConnectionClient != nil) \(String(describing: peerConnectionClient))")
} }
} }
@ -253,7 +253,7 @@ private class SignalCallData: NSObject {
} }
} }
Logger.debug(".callData setter: \(oldValue?.call.identifiersForLogs as Optional) -> \(self.callData?.call.identifiersForLogs as Optional)") Logger.debug(".callData setter: \(oldValue?.call.identifiersForLogs as Optional) -> \(callData?.call.identifiersForLogs as Optional)")
for observer in observers { for observer in observers {
observer.value?.didUpdateCall(call: callData?.call) observer.value?.didUpdateCall(call: callData?.call)

@ -121,7 +121,7 @@ protocol CallObserver: class {
var audioSource: AudioSource? = nil { var audioSource: AudioSource? = nil {
didSet { didSet {
AssertIsOnMainThread() AssertIsOnMainThread()
Logger.debug("audioSource changed: \(String(describing: oldValue)) -> \(String(describing: self.audioSource))") Logger.debug("audioSource changed: \(String(describing: oldValue)) -> \(String(describing: audioSource))")
for observer in observers { for observer in observers {
observer.value?.audioSourceDidChange(call: self, audioSource: audioSource) observer.value?.audioSourceDidChange(call: self, audioSource: audioSource)

@ -82,7 +82,7 @@ extension GiphyError: LocalizedError {
} }
public func log() { public func log() {
Logger.verbose("\t \(self.format), \(self.name), \(self.width), \(self.height), \(self.fileSize)") Logger.verbose("\t \(format), \(name), \(width), \(height), \(fileSize)")
} }
} }
@ -114,7 +114,7 @@ extension GiphyError: LocalizedError {
} }
public func log() { public func log() {
Logger.verbose("giphyId: \(self.giphyId), \(self.renditions.count)") Logger.verbose("giphyId: \(giphyId), \(renditions.count)")
for rendition in renditions { for rendition in renditions {
rendition.log() rendition.log()
} }

@ -28,13 +28,13 @@ public class DisappearingTimerConfigurationView: UIView {
override public var frame: CGRect { override public var frame: CGRect {
didSet { didSet {
Logger.verbose("\(oldValue) -> \(self.frame)") Logger.verbose("\(oldValue) -> \(frame)")
} }
} }
override public var bounds: CGRect { override public var bounds: CGRect {
didSet { didSet {
Logger.verbose("\(oldValue) -> \(self.bounds)") Logger.verbose("\(oldValue) -> \(bounds)")
} }
} }

@ -160,7 +160,7 @@ public class SignalAttachment: NSObject {
AssertIsOnMainThread() AssertIsOnMainThread()
assert(oldValue == nil) assert(oldValue == nil)
Logger.verbose("Attachment has error: \(String(describing: self.error))") Logger.verbose("Attachment has error: \(String(describing: error))")
} }
} }

@ -142,7 +142,7 @@ public class OWSAudioSession: NSObject {
} }
guard currentActivities.isEmpty else { guard currentActivities.isEmpty else {
Logger.debug("not deactivating due to currentActivities: \(self.currentActivities)") Logger.debug("not deactivating due to currentActivities: \(currentActivities)")
return return
} }

@ -19,7 +19,7 @@ public class OutageDetection: NSObject {
AssertIsOnMainThread() AssertIsOnMainThread()
if hasOutage != oldValue { if hasOutage != oldValue {
Logger.info("hasOutage: \(self.hasOutage).") Logger.info("hasOutage: \(hasOutage).")
NotificationCenter.default.postNotificationNameAsync(OutageDetection.outageStateDidChange, object: nil) NotificationCenter.default.postNotificationNameAsync(OutageDetection.outageStateDidChange, object: nil)
} }

Loading…
Cancel
Save