Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
fixup! typelevelGH-765 implement Channel.listenR
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaechler committed Dec 20, 2022
1 parent 2cd82de commit 6878c79
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/core/shared/src/main/scala/Channel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,10 @@ object Channel {


def listenR(maxQueued: Int): Resource[F, Stream[F, Notification[String]]] =
Resource.make(listen)(_ => unlisten)
.flatMap(_ => proto.notifications(maxQueued))
.map(stream => stream.filter(_.channel === name))
for {
_ <- Resource.make(listen)(_ => unlisten)
stream <- proto.notifications(maxQueued)
} yield stream.filter(_.channel === name)


def notify(message: String): F[Unit] =
Expand Down

0 comments on commit 6878c79

Please sign in to comment.