浏览代码

do not show header for visually non-existing member/recipient lists

B. Petersen 3 年之前
父节点
当前提交
bc30ec4128
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      deltachat-ios/Controller/NewGroupController.swift

+ 2 - 3
deltachat-ios/Controller/NewGroupController.swift

@@ -238,15 +238,14 @@ class NewGroupController: UITableViewController, MediaPickerDelegate {
     }
     }
 
 
     override func tableView(_: UITableView, titleForHeaderInSection section: Int) -> String? {
     override func tableView(_: UITableView, titleForHeaderInSection section: Int) -> String? {
-        if sections[section] == .members {
+        if sections[section] == .members && !contactIdsForGroup.isEmpty {
             if createBroadcast {
             if createBroadcast {
                 return String.localized(stringID: "n_recipients", count: contactIdsForGroup.count)
                 return String.localized(stringID: "n_recipients", count: contactIdsForGroup.count)
             } else {
             } else {
                 return String.localized(stringID: "n_members", count: contactIdsForGroup.count)
                 return String.localized(stringID: "n_members", count: contactIdsForGroup.count)
             }
             }
-        } else {
-            return nil
         }
         }
+        return nil
     }
     }
 
 
     override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
     override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {