소스 검색

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? {
-        if sections[section] == .members {
+        if sections[section] == .members && !contactIdsForGroup.isEmpty {
             if createBroadcast {
                 return String.localized(stringID: "n_recipients", count: contactIdsForGroup.count)
             } else {
                 return String.localized(stringID: "n_members", count: contactIdsForGroup.count)
             }
-        } else {
-            return nil
         }
+        return nil
     }
 
     override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {