Browse Source

add constant for number of rows in first section of NewChatViewController

cyberta 5 năm trước cách đây
mục cha
commit
3a05978541
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      deltachat-ios/Controller/NewChatViewController.swift

+ 2 - 1
deltachat-ios/Controller/NewChatViewController.swift

@@ -9,6 +9,7 @@ class NewChatViewController: UITableViewController {
     private let sectionImportedContacts = 1
     private let sectionNewRowNewGroup = 0
     private let sectionNewRowNewContact = 1
+    private let sectionNewRowCount = 2
 
     private lazy var searchController: UISearchController = {
         let searchController = UISearchController(searchResultsController: nil)
@@ -134,7 +135,7 @@ class NewChatViewController: UITableViewController {
 
     override func tableView(_: UITableView, numberOfRowsInSection section: Int) -> Int {
         if section == sectionNew {
-            return 2
+            return sectionNewRowCount
         } else if section == sectionImportedContacts {
             if deviceContactAccessGranted {
                 return isFiltering() ? filteredContacts.count : contacts.count