mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-06-28 08:51:07 +02:00
putting synchronized lists into a synchronized method
This commit is contained in:
parent
d13979b4b5
commit
9c04cb0e30
@ -44,9 +44,11 @@ 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) {
|
||||||
LocalCache.notes[it]
|
eventsToWatch.map {
|
||||||
}.filterNotNull()
|
LocalCache.notes[it]
|
||||||
|
}.filterNotNull()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun updateChannelFilters() {
|
override fun updateChannelFilters() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user