Skip to content

Commit

Permalink
swiftlint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
maxxfrazer committed Nov 7, 2023
1 parent 08c0cde commit fd25224
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
9 changes: 6 additions & 3 deletions presence/PresenceView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ struct PresenceView: View {
}
}
}
}.onReceive(timer, perform: { out in
}.onReceive(timer, perform: { _ in
Task {
// fetch online users every 5 seconds.
// fetching directly is an alternative to checking delegate callbacks
Expand All @@ -97,7 +97,10 @@ struct PresenceView: View {
}
}).onAppear {
await signalingManager.loginAndSub(to: self.channelId, with: DocsAppConfig.shared.token)
_ = try? await self.signalingManager.setUserState(in: self.channelId, to: ["joinedAt": Date.now.description])
_ = try? await self.signalingManager.setUserState(
in: self.channelId,
to: ["joinedAt": Date.now.description]
)
}.onDisappear {
timer.upstream.connect().cancel()
try? await signalingManager.destroy()
Expand All @@ -123,7 +126,7 @@ struct PresenceView: View {
static var docTitle: String = "Presence"
}

fileprivate struct DictionaryView: View {
private struct DictionaryView: View {
@State var data: RtmPresenceGetStateResponse

var body: some View {
Expand Down
3 changes: 1 addition & 2 deletions storage/StorageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ struct StorageView: View {
static var docTitle: String = "Store channel and user data"
}

fileprivate struct DictionaryView: View {
private struct DictionaryView: View {
@State var data: RtmMetadata

var body: some View {
Expand All @@ -301,7 +301,6 @@ fileprivate struct DictionaryView: View {
}
}


// MARK: - Previews

struct StorageView_Previews: PreviewProvider {
Expand Down
2 changes: 1 addition & 1 deletion stream-channels/StreamChannelsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class StreamChannelSignalingManager: SignalingManager, RtmClientDelegate
throw error
}
}

func leaveChannel() async throws {
try await self.streamChannel?.leave()
}
Expand Down

0 comments on commit fd25224

Please sign in to comment.