From 4f72a53c5727d2aaab7a43e73f08d712dbd7d3bb Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sat, 28 Oct 2023 23:26:11 +0200 Subject: WIP: ui: fix onPersistentKeepaliveChanged --- ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt b/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt index 866601d1..03529454 100644 --- a/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt +++ b/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt @@ -237,7 +237,7 @@ class ObservableTunnel internal constructor( private fun onPersistentKeepaliveChanged(publicKey: Key, newPersistentKeepalive: Int?) { var peer: PeerDetail = lookupPeer(publicKey) - peer.persistentKeepalive = newPersistentKeepalive + peer.persistentKeepalive = Optional.ofNullable(newPersistentKeepalive) } override fun onAllowedIpsChange(publicKey: Key, addNetworks: List?, removeNetworks: List?) { -- cgit v1.2.3