refactor: typos

This commit is contained in:
Nikita Semenov 2022-10-04 12:08:38 +03:00
parent 54a01db216
commit f4dc72b61f
2 changed files with 5 additions and 5 deletions

View File

@ -41,7 +41,7 @@ final public class LoggingPresenter {
private init() { }
/// binds openning and closing of logging list view to a shacking motion.
/// binds openning and closing of logging list view to a shaking motion.
public func bind(_ scene: UIWindowScene? = nil) {
if let scene = scene {
window.windowScene = scene
@ -51,7 +51,7 @@ final public class LoggingPresenter {
loggingViewController.setVisible(isVisible: false)
}
/// unbinds openning and closing of logging list view by shacking motion.
/// unbinds openning and closing of logging list view by shaking motion.
public func unbind() {
window.isHidden = true
loggingViewController.setVisible(isVisible: true)

View File

@ -28,7 +28,7 @@ open class LoggingTogglingViewController: BaseInitializeableViewController {
private var initialCenter = CGPoint()
private var isRegisteredForShackingEvent: Bool {
private var isRegisteredForShakingEvent: Bool {
!isVisibleState
}
@ -68,7 +68,7 @@ open class LoggingTogglingViewController: BaseInitializeableViewController {
button.addGestureRecognizer(panGesture)
button.addTarget(self, action: #selector(openLoggingScreenAction), for: .touchUpInside)
// Needed for catching shacking motion
// Needed for catching shaking motion
becomeFirstResponder()
}
@ -88,7 +88,7 @@ open class LoggingTogglingViewController: BaseInitializeableViewController {
// MARK: - Overrided methods
open override func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?) {
if !isLogsPresented, isRegisteredForShackingEvent {
if motion == .motionShake, !isLogsPresented, isRegisteredForShakingEvent {
openLoggingScreen()
}
}