diff --git a/app/src/main/java/de/westnordost/streetcomplete/screens/about/LogsViewModelImpl.kt b/app/src/main/java/de/westnordost/streetcomplete/screens/about/LogsViewModelImpl.kt index 6b72b9e0f4..4e7ce2026f 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/screens/about/LogsViewModelImpl.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/screens/about/LogsViewModelImpl.kt @@ -59,14 +59,14 @@ class LogsViewModelImpl( filters.transformLatest { filters -> // get prior logs into a backing state // There will be duplication regardless. - val logs = ArrayList(logsController.getLogs(filters)) + var logs: List = logsController.getLogs(filters) // emit the logs for the first view emit(logs) // start listening to new logs getIncomingLogs(filters).collect { - logs.add(it) + logs = logs + it emit(logs) } }.stateIn(viewModelScope + Dispatchers.IO, SharingStarted.Eagerly, emptyList())