소스 검색

add constant for number of rows in first section of NewChatViewController

cyberta 5 년 전
부모
커밋
3a05978541
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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