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

This commit is contained in:
Jeroen Leenarts 2018-09-20 00:44:24 +02:00
parent 336f30e3c9
commit 4fdc8244a1
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 {
return 3
return 2
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
switch section {
case 1:
return tunnel?.peers?.count ?? 1
return tunnel?.peers?.count ?? 0
default:
return 1
}