mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-07-03 16:40:45 +02:00
putting synchronized lists into a synchronized method
This commit is contained in:
@ -44,10 +44,12 @@ object NostrThreadDataSource: NostrDataSource<Note>("SingleThreadFeed") {
|
|||||||
val loadEventsChannel = requestNewChannel()
|
val loadEventsChannel = requestNewChannel()
|
||||||
|
|
||||||
override fun feed(): List<Note> {
|
override fun feed(): List<Note> {
|
||||||
return eventsToWatch.map {
|
return synchronized(eventsToWatch) {
|
||||||
|
eventsToWatch.map {
|
||||||
LocalCache.notes[it]
|
LocalCache.notes[it]
|
||||||
}.filterNotNull()
|
}.filterNotNull()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun updateChannelFilters() {
|
override fun updateChannelFilters() {
|
||||||
repliesAndReactionsChannel.filter = listOfNotNull(createRepliesAndReactionsFilter()).ifEmpty { null }
|
repliesAndReactionsChannel.filter = listOfNotNull(createRepliesAndReactionsFilter()).ifEmpty { null }
|
||||||
|
Reference in New Issue
Block a user