From 479f10a28effa6ad336edc26cac0dfd5be7217e6 Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 29 Oct 2020 14:36:40 +0100 Subject: [PATCH] Fix potential ConcurrentModificationException give a copy to avoid issues --- .../sdk/internal/session/room/timeline/DefaultTimeline.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/DefaultTimeline.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/DefaultTimeline.kt index b67220edca..4821270869 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/DefaultTimeline.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/DefaultTimeline.kt @@ -819,7 +819,7 @@ internal class DefaultTimeline( private val inMemorySendingEvents = Collections.synchronizedList(ArrayList()) fun getInMemorySendingEvents(): List { - return inMemorySendingEvents + return inMemorySendingEvents.toList() } /**