summaryrefslogtreecommitdiffhomepage
path: root/android/src
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2021-01-25 17:59:54 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2021-02-11 14:36:18 +0000
commit9016856769dad19513f87c6a092aace8efaf947b (patch)
tree61547078e8963cb578145263d2810669ddfb20b9 /android/src
parentecc775e5bd9e6289315137e36a93ee5a382bcff7 (diff)
downloadmullvadvpn-9016856769dad19513f87c6a092aace8efaf947b.tar.xz
mullvadvpn-9016856769dad19513f87c6a092aace8efaf947b.zip
Make `EventNotifier` to respect registration order
Diffstat (limited to 'android/src')
-rw-r--r--android/src/main/kotlin/net/mullvad/talpid/util/EventNotifier.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/android/src/main/kotlin/net/mullvad/talpid/util/EventNotifier.kt b/android/src/main/kotlin/net/mullvad/talpid/util/EventNotifier.kt
index f0084e25d4..e0dc26f972 100644
--- a/android/src/main/kotlin/net/mullvad/talpid/util/EventNotifier.kt
+++ b/android/src/main/kotlin/net/mullvad/talpid/util/EventNotifier.kt
@@ -11,7 +11,7 @@ import kotlin.properties.Delegates.observable
// If the ID object class (or any of its super-classes) overrides `hashCode` or `equals`,
// unsubscribe might not work correctly.
class EventNotifier<T>(private val initialValue: T) {
- private val listeners = HashMap<Any, (T) -> Unit>()
+ private val listeners = LinkedHashMap<Any, (T) -> Unit>()
var latestEvent = initialValue
private set