Report the correct number of rows in the info table view.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jeroen Leenarts 2018-09-20 00:44:24 +02:00
parent 659a24250a
commit 19a4339a27
1 changed files with 2 additions and 2 deletions

View File

@ -40,13 +40,13 @@ class TunnelInfoTableViewController: UITableViewController {
} }
override func numberOfSections(in tableView: UITableView) -> Int { override func numberOfSections(in tableView: UITableView) -> Int {
return 3 return 2
} }
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
switch section { switch section {
case 1: case 1:
return tunnel?.peers?.count ?? 1 return tunnel?.peers?.count ?? 0
default: default:
return 1 return 1
} }