Skip to content

Commit

Permalink
Remove addChannel method
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-tennert committed Jan 10, 2025
1 parent 4594978 commit 816b416
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ sealed interface Realtime : MainPlugin<Realtime.Config>, CustomSerializationPlug
*/
fun disconnect()

@SupabaseInternal
fun Realtime.addChannel(channel: RealtimeChannel)

/**
* Unsubscribes and removes a channel from the [subscriptions]
* @param channel The channel to remove
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ internal class RealtimeChannelImpl(
if(!realtimeImpl.config.connectOnSubscribe) error("You can't subscribe to a channel while the realtime client is not connected. Did you forget to call `realtime.connect()`?")
realtimeImpl.connect()
}
realtimeImpl.run {
addChannel(this@RealtimeChannelImpl)
}
_status.value = RealtimeChannel.Status.SUBSCRIBING
Realtime.logger.d { "Subscribing to channel $topic" }
val currentJwt = accessToken()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.github.jan.supabase.realtime

import io.github.jan.supabase.SupabaseClient
import io.github.jan.supabase.annotations.SupabaseInternal
import io.github.jan.supabase.auth.Auth
import io.github.jan.supabase.auth.status.SessionStatus
import io.github.jan.supabase.buildUrl
Expand Down Expand Up @@ -241,11 +240,6 @@ import kotlin.io.encoding.ExperimentalEncodingApi
}
}

@SupabaseInternal
override fun Realtime.addChannel(channel: RealtimeChannel) {
_subscriptions[channel.topic] = channel
}

override suspend fun close() {
disconnect()
}
Expand Down

0 comments on commit 816b416

Please sign in to comment.