aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/TunnelViewModel.swift
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2019-02-04 18:57:59 +0530
committerRoopesh Chander <roop@roopc.net>2019-02-05 12:36:34 +0530
commit8a6a60482c7880ae72dafad14e23b5b36b63a7b0 (patch)
tree822fd7b6492b7540ff3cadd7b7566371413fbd51 /WireGuard/WireGuard/UI/TunnelViewModel.swift
parentmacOS: Tunnel detail: Refactor calculation of tableViewModelRows (diff)
downloadwireguard-apple-8a6a60482c7880ae72dafad14e23b5b36b63a7b0.tar.xz
wireguard-apple-8a6a60482c7880ae72dafad14e23b5b36b63a7b0.zip
TunnelViewModel: Don't call peer change handler if there are no changes
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuard/UI/TunnelViewModel.swift4
1 files changed, 3 insertions, 1 deletions
diff --git a/WireGuard/WireGuard/UI/TunnelViewModel.swift b/WireGuard/WireGuard/UI/TunnelViewModel.swift
index fcbaef3b..39d55bed 100644
--- a/WireGuard/WireGuard/UI/TunnelViewModel.swift
+++ b/WireGuard/WireGuard/UI/TunnelViewModel.swift
@@ -462,7 +462,9 @@ class TunnelViewModel {
}
}
scratchpad = otherScratchPad
- changeHandler(peerIndex, changes)
+ if !changes.isEmpty {
+ changeHandler(peerIndex, changes)
+ }
}
}