aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-11-02 12:05:40 +0530
committerRoopesh Chander <roop@roopc.net>2018-11-02 12:05:58 +0530
commitb3cc30a207fab2cb6e0ddfb868e9cfff7d913a0d (patch)
tree376e2aa32b11591736a982e09530c877f4f5660c /WireGuard
parentDNSResolver: getaddrinfo returns a sockaddr and inet_ntop takes strlen (diff)
downloadwireguard-apple-b3cc30a207fab2cb6e0ddfb868e9cfff7d913a0d.tar.xz
wireguard-apple-b3cc30a207fab2cb6e0ddfb868e9cfff7d913a0d.zip
Tunnel view model: Initialize peerData.numberOfPeers
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard')
-rw-r--r--WireGuard/WireGuard/UI/TunnelViewModel.swift4
1 files changed, 4 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/UI/TunnelViewModel.swift b/WireGuard/WireGuard/UI/TunnelViewModel.swift
index 8143ba3..0886848 100644
--- a/WireGuard/WireGuard/UI/TunnelViewModel.swift
+++ b/WireGuard/WireGuard/UI/TunnelViewModel.swift
@@ -375,6 +375,10 @@ class TunnelViewModel {
peersData.append(peerData)
}
}
+ let numberOfPeers = peersData.count
+ for peerData in peersData {
+ peerData.numberOfPeers = numberOfPeers
+ }
}
func appendEmptyPeer() {