Skip to content

Commit 4362466

Browse files
committed
Inline the function since it is used in just one place
1 parent 12124bf commit 4362466

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

Sources/NativePusher.swift

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,14 @@ import Foundation
162162
- parameter interests: the name of the interests you want to subscribe to
163163
*/
164164
open func setSubscriptions(interests: Array<String>) {
165-
addSubscriptionChangeToTaskQueue(interests: interests, change: .setSubscriptions)
165+
requestQueue.tasks += { _, next in
166+
self.modifySubscription(
167+
interests: interests,
168+
successCallback: next
169+
)
170+
}
171+
172+
requestQueue.run()
166173
}
167174

168175
/**
@@ -195,17 +202,6 @@ import Foundation
195202
requestQueue.run()
196203
}
197204

198-
private func addSubscriptionChangeToTaskQueue(interests: Array<String>, change: SubscriptionChange) {
199-
requestQueue.tasks += { _, next in
200-
self.modifySubscription(
201-
interests: interests,
202-
successCallback: next
203-
)
204-
}
205-
206-
requestQueue.run()
207-
}
208-
209205
/**
210206
Makes either a POST or DELETE request for a given interest
211207
- parameter interest: The name of the interest to be subscribed to / unsunscribed from

0 commit comments

Comments
 (0)