Commit 4051056d by Daniel Dahan

issue-1245: Fixed issue where completion block was not executed when calling Switch.toggle

parent 815097ba
## 3.1.6
- [issue-1245](https://github.com/CosmicMind/Material/issues/1245): Fixed issue where completion block was not executed when calling Switch.toggle.
## 3.1.5 ## 3.1.5
- [pr-1248](https://github.com/CosmicMind/Material/pull/1248): Exposed Obj-C methods for NavigationDrawerController. - [pr-1248](https://github.com/CosmicMind/Material/pull/1248): Exposed Obj-C methods for NavigationDrawerController.
......
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'Material' s.name = 'Material'
s.version = '3.1.5' s.version = '3.1.6'
s.swift_version = '5.0' s.swift_version = '5.0'
s.license = 'BSD-3-Clause' s.license = 'BSD-3-Clause'
s.summary = 'A UI/UX framework for creating beautiful applications.' s.summary = 'A UI/UX framework for creating beautiful applications.'
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>3.1.5</string> <string>3.1.6</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -414,11 +414,12 @@ fileprivate extension Switch { ...@@ -414,11 +414,12 @@ fileprivate extension Switch {
if animated { if animated {
animateToState(state: state) { [weak self, isTriggeredByUserInteraction = isTriggeredByUserInteraction] _ in animateToState(state: state) { [weak self, isTriggeredByUserInteraction = isTriggeredByUserInteraction] _ in
guard isTriggeredByUserInteraction else { guard let s = self else {
return return
} }
guard let s = self else { guard isTriggeredByUserInteraction else {
completion?(s)
return return
} }
...@@ -431,6 +432,7 @@ fileprivate extension Switch { ...@@ -431,6 +432,7 @@ fileprivate extension Switch {
styleForState(state: state) styleForState(state: state)
guard isTriggeredByUserInteraction else { guard isTriggeredByUserInteraction else {
completion?(self)
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment