Skip to content

Commit

Permalink
Fixed delegate for native style.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvorobei committed Sep 2, 2021
1 parent 3e526e1 commit 847ae72
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Binary file not shown.
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -440,17 +440,17 @@ I have libraries with native interface and managing permissions. Also available
Со сложными и непонятными задачами помогут в чате.

<p float="left">
<a href="https://sparrowcode.by/telegram/channel">
<a href="https://tutorials.ivanvorobei.by/telegram/channel">
<img src="https://github.com/ivanvorobei/Readme/blob/main/Buttons/russian-community-tutorials.svg">
</a>
<a href="https://sparrowcode.by/telegram/libs">
<a href="https://tutorials.ivanvorobei.by/telegram/libs">
<img src="https://github.com/ivanvorobei/Readme/blob/main/Buttons/russian-community-libraries.svg">
</a>
<a href="https://sparrowcode.by/telegram/chat">
<a href="https://tutorials.ivanvorobei.by/telegram/chat">
<img src="https://github.com/ivanvorobei/Readme/blob/main/Buttons/russian-community-chat.svg">
</a>
</p>

Видео-туториалы выклыдываю на [YouTube](https://sparrowcode.by/youtube):
Видео-туториалы выклыдываю на [YouTube](https://tutorials.ivanvorobei.by/youtube):

[![Tutorials on YouTube](https://cdn.ivanvorobei.by/github/readme/youtube-preview.jpg)](https://sparrowcode.by/youtube)
[![Tutorials on YouTube](https://cdn.ivanvorobei.by/github/readme/youtube-preview.jpg)](https://tutorials.ivanvorobei.by/youtube)
2 changes: 1 addition & 1 deletion SPPermissions.podspec
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "SPPermissions"
s.version = "6.6.5"
s.version = "6.6.8"
s.summary = "Ask permissions on Swift. Available List, Dialog & Native interface. Can check state permission."
s.homepage = "https://github.com/ivanvorobei/SPPermissions"
s.source = { :git => "https://github.com/ivanvorobei/SPPermissions.git", :tag => s.version }
Expand Down
Expand Up @@ -46,9 +46,7 @@ public class SPPermissionsNativeController: NSObject, SPPermissionsControllerInt
self.proceseedPermissions = permissions
for permission in permissions {
permission.request(completion: { [weak self] in

self?.proceseedPermissions = self?.proceseedPermissions.filter({ $0 != permission }) ?? []

guard let self = self else { return }
if permission.authorized {
self.delegate?.didAllowPermission(permission)
Expand All @@ -59,6 +57,7 @@ public class SPPermissionsNativeController: NSObject, SPPermissionsControllerInt

if self.proceseedPermissions.isEmpty {
self.memoryLocker = nil
self.delegate?.didHidePermissions(self.permissions)
}
})
}
Expand Down

0 comments on commit 847ae72

Please sign in to comment.