Skip to content

Commit a6ee05a

Browse files
rawnsleyDaniel Rees
authored andcommitted
Calling of Java 8 method throws a runtime error in Android API < 24 (#59)
1 parent a8729b3 commit a6ee05a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/org/phoenixframework/Presence.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class Presence(channel: Channel, opts: Options = Options.defaults) {
268268
val state = cloneState(currentState)
269269

270270
// Sync the joined states and inform onJoin of new presence
271-
diff["joins"]?.forEach { key, newPresence ->
271+
diff["joins"]?.forEach { (key, newPresence) ->
272272
val currentPresence = state[key]
273273
state[key] = cloneMap(newPresence)
274274

@@ -288,7 +288,7 @@ class Presence(channel: Channel, opts: Options = Options.defaults) {
288288
}
289289

290290
// Sync the left diff and inform onLeave of left presence
291-
diff["leaves"]?.forEach { key, leftPresence ->
291+
diff["leaves"]?.forEach { (key, leftPresence) ->
292292
val curPresence = state[key] ?: return@forEach
293293

294294
val refsToRemove = leftPresence["metas"]!!.map { it["phx_ref"] as String }

0 commit comments

Comments
 (0)