File tree 4 files changed +7
-8
lines changed 4 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
Pod ::Spec . new do |s |
2
2
s . name = "QiscusCore"
3
- s . version = "1.13.1 "
3
+ s . version = "1.13.2 "
4
4
s . summary = "Qiscus Core SDK for iOS"
5
5
s . description = <<-DESC
6
6
Qiscus SDK for iOS contains Qiscus public Model.
Original file line number Diff line number Diff line change @@ -71,7 +71,9 @@ class NetworkManager: NSObject {
71
71
if QiscusCore . enableExpiredToken == true {
72
72
if errorMessage. lowercased ( ) == " Unauthorized. Token is expired " . lowercased ( ) {
73
73
QiscusCore . shared. refreshToken { isSuccess in
74
-
74
+ if let delegate = QiscusCore . delegate {
75
+ delegate. onRefreshToken ( event: QiscusRefreshTokenEvent . isSuccessAutoRefreshToken)
76
+ }
75
77
} onError: { error in
76
78
if let delegate = QiscusCore . delegate {
77
79
delegate. onRefreshToken ( event: QiscusRefreshTokenEvent . isUnauthorized)
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ public enum QiscusConnectionState : String{
25
25
public enum QiscusRefreshTokenEvent : String {
26
26
case isUnauthorized = " unauthorized "
27
27
case isTokenExpired = " tokenexpired "
28
+ case isSuccessAutoRefreshToken = " success "
28
29
}
29
30
30
31
public protocol QiscusCoreDelegate {
Original file line number Diff line number Diff line change @@ -196,12 +196,8 @@ class QiscusWorkerManager {
196
196
}
197
197
198
198
private func pending( ) {
199
- if Thread . isMainThread {
200
- sendPendingMessage ( )
201
- } else {
202
- DispatchQueue . global ( qos: . background) . sync {
203
- sendPendingMessage ( )
204
- }
199
+ DispatchQueue . global ( qos: . background) . async {
200
+ self . sendPendingMessage ( )
205
201
}
206
202
}
207
203
You can’t perform that action at this time.
0 commit comments