Explorar o código

fix a index out of bounds crash

Simon Laux %!s(int64=2) %!d(string=hai) anos
pai
achega
1ac77d06ff
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      deltachat-ios/ViewModel/ChatListViewModel.swift

+ 1 - 1
deltachat-ios/ViewModel/ChatListViewModel.swift

@@ -128,7 +128,7 @@ class ChatListViewModel: NSObject {
 
     // only visible on search results
     func titleForHeaderIn(section: Int) -> String? {
-        if showSearchResults {
+        if showSearchResults && !searchResultSections.isEmpty {
             switch searchResultSections[section] {
             case .chats:
                 return String.localized(stringID: "n_chats", count: numberOfRowsIn(section: section))