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 e7134c51..f8691cbb 100644 --- a/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt +++ b/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt @@ -93,14 +93,14 @@ class ObservableTunnel internal constructor( @get:Bindable var statistics: Statistics? = null get() { - if (field == null || field!!.isStale) + if (field == null || field?.isStale != false) manager.getTunnelStatistics(this).whenComplete(ExceptionLoggers.E) return field } private set val statisticsAsync: CompletionStage - get() = if (statistics == null || statistics!!.isStale) + get() = if (statistics == null || statistics?.isStale != false) manager.getTunnelStatistics(this) else CompletableFuture.completedFuture(statistics)