From 2cbb155e345cb2f1fd4fc6b1cbef93d4b1b576f7 Mon Sep 17 00:00:00 2001 From: Igor Solomennikov Date: Sat, 29 Jan 2022 16:27:56 -0800 Subject: [PATCH] Fix three minor compiler warnings. --- .../ConversationView/Cells/AudioMessageView.swift | 2 -- .../ConversationViewController+GestureRecognizers.swift | 2 -- .../RegistrationPinAttemptsExhaustedViewController.swift | 4 ++-- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/Cells/AudioMessageView.swift b/Signal/src/ViewControllers/ConversationView/Cells/AudioMessageView.swift index daf5164382..faae5619f4 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/AudioMessageView.swift +++ b/Signal/src/ViewControllers/ConversationView/Cells/AudioMessageView.swift @@ -436,8 +436,6 @@ class AudioMessageView: ManualStackView { } private func updateViewedState(animated: Bool = true) { - var isViewed = self.isViewed - let destination: AnimationProgressTime = isViewed ? 1 : 0 // Do nothing if we're already there. diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController+GestureRecognizers.swift b/Signal/src/ViewControllers/ConversationView/ConversationViewController+GestureRecognizers.swift index 231c000f3d..ede37d54da 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController+GestureRecognizers.swift +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController+GestureRecognizers.swift @@ -378,8 +378,6 @@ public struct CVLongPressHandler { return } - let shouldAllowReply = delegate.cvc_shouldAllowReplyForItem(itemViewModel) - switch gestureLocation { case .bodyText(let item): delegate.cvc_didLongPressBodyTextItem(.init(item: item)) diff --git a/Signal/src/ViewControllers/Registration/RegistrationPinAttemptsExhaustedViewController.swift b/Signal/src/ViewControllers/Registration/RegistrationPinAttemptsExhaustedViewController.swift index fb1ccf4867..123b8327b2 100644 --- a/Signal/src/ViewControllers/Registration/RegistrationPinAttemptsExhaustedViewController.swift +++ b/Signal/src/ViewControllers/Registration/RegistrationPinAttemptsExhaustedViewController.swift @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Open Whisper Systems. All rights reserved. +// Copyright (c) 2022 Open Whisper Systems. All rights reserved. // import UIKit @@ -106,7 +106,7 @@ public class RegistrationPinAttemptsExhaustedViewController: RegistrationBaseVie func primaryButtonPressed() { Logger.info("") - guard let navigationController = navigationController else { + guard navigationController != nil else { owsFailDebug("Missing navigationController") return }