Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
Merge branch 'xcode8b4' into swift3
Browse files Browse the repository at this point in the history
  • Loading branch information
pvzig committed Aug 4, 2016
2 parents 8007fa6 + c241dcf commit 183ed91
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "pvzig/Starscream" "98d7ccea30621d51a93ee5c155b3f670e37e037b"
github "pvzig/swifter" "8adfae89a6d34cfea1c20d53d8112d1d69e01bd0"
github "pvzig/Starscream" "2fde5c5eb9302439e634753c3aacc794ca2e42e8"
github "pvzig/swifter" "ddbebdde19360a2c9e4e01e5a0642dd12082cc92"
4 changes: 2 additions & 2 deletions SlackKit/Sources/Client+EventHandling.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ internal extension Client {
channelEventsDelegate?.userTyping(self, channel: channel, user: user)

let timeout = DispatchTime.now() + Double(Int64(5.0 * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC)
DispatchQueue.main.after(when: timeout) {
DispatchQueue.main.asyncAfter(deadline: timeout, execute: {
if let index = self.channels[channelID]?.usersTyping.index(of: userID) {
self.channels[channelID]?.usersTyping.remove(at: index)
}
}
})
}

func channelMarked(_ event: Event) {
Expand Down
2 changes: 1 addition & 1 deletion SlackKit/Sources/Client+Utilities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

public enum ClientError: ErrorProtocol {
public enum ClientError: Error {
case channelDoesNotExist
case userDoesNotExist
}
Expand Down
4 changes: 2 additions & 2 deletions SlackKit/Sources/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public final class Client: WebSocketDelegate {
}

internal var webSocket: WebSocket?
private let pingPongQueue = DispatchQueue(label: "com.launchsoft.SlackKit", attributes: DispatchQueueAttributes.serial)
private let pingPongQueue = DispatchQueue(label: "com.launchsoft.SlackKit")
internal var ping: Double?
internal var pong: Double?
internal var options: ClientOptions?
Expand Down Expand Up @@ -128,7 +128,7 @@ public final class Client: WebSocketDelegate {
//MARK: - RTM Ping
private func pingRTMServerAtInterval(_ interval: TimeInterval) {
let delay = DispatchTime.now() + Double(Int64(interval * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC)
pingPongQueue.after(when: delay, execute: {
pingPongQueue.asyncAfter(deadline: delay, execute: {
guard self.connected && self.timeoutCheck() else {
self.disconnect()
return
Expand Down
2 changes: 1 addition & 1 deletion SlackKit/Sources/Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ internal extension String {

}

internal extension Dictionary where Key: StringLiteralConvertible, Value: AnyObject {
internal extension Dictionary where Key: ExpressibleByStringLiteral, Value: AnyObject {

var requestStringFromParameters: String {
var requestString = ""
Expand Down
2 changes: 1 addition & 1 deletion SlackKit/Sources/SlackError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

public enum SlackError: String, ErrorProtocol {
public enum SlackError: String, Error {
case AccountInactive = "account_inactive"
case AlreadyArchived = "already_archived"
case AlreadyInChannel = "already_in_channel"
Expand Down

0 comments on commit 183ed91

Please sign in to comment.