Commit 18394918 authored by Geoffrey Métais's avatar Geoffrey Métais

BrowserProvider: Don't send to channel once closed

parent 170fe7a6
......@@ -177,7 +177,7 @@ abstract class BrowserProvider(val context: Context, val dataset: LiveDataset<Me
}
}
override fun onMediaAdded(index: Int, media: Media) { browserChannel.offer(media) }
override fun onMediaAdded(index: Int, media: Media) { if (!browserChannel.isClosedForReceive) browserChannel.offer(media) }
override fun onBrowseEnd() { browserChannel.close() }
override fun onMediaRemoved(index: Int, media: Media){}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment