From 26568a0e247fc0b38fb436dc3f88a7255ff748f9 Mon Sep 17 00:00:00 2001 From: Timothy Moose Date: Tue, 13 Jun 2017 08:40:43 -0500 Subject: [PATCH] Store id on init to avoid non-main queue UIKit access --- CHANGELOG.md | 6 +++++- SwiftMessages/Presenter.swift | 6 ++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90501aea..b600748e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file. ## [3.3.4](https://github.com/SwiftKickMobile/SwiftMessages/releases/tag/3.3.4) ### Features -* Add `blur` dim mode option. +* #89 Add `blur` dim mode option. + +### Bug Fixes +* #98 Fix touch handling in message view's background view. +* #97 Fix main thread checker warning ## [3.3.3](https://github.com/SwiftKickMobile/SwiftMessages/releases/tag/3.3.3) diff --git a/SwiftMessages/Presenter.swift b/SwiftMessages/Presenter.swift index b83dc73e..18d665f6 100644 --- a/SwiftMessages/Presenter.swift +++ b/SwiftMessages/Presenter.swift @@ -63,12 +63,10 @@ class Presenter: NSObject, UIGestureRecognizerDelegate { panRecognizer.addTarget(self, action: #selector(Presenter.pan(_:))) panRecognizer.delegate = self maskingView.clipsToBounds = true + id = (view as? Identifiable)?.id } - var id: String? { - let identifiable = view as? Identifiable - return identifiable?.id - } + var id: String? var pauseDuration: TimeInterval? { let duration: TimeInterval?