     }
     
     private func getPasswordEntry(by indexPath: IndexPath) -> PasswordsTableEntry {
-        var entry: PasswordsTableEntry
-        let index = sections[indexPath.section].index + indexPath.row
-        if searchController.isActive && searchController.searchBar.text != "" {
-            entry = filteredPasswordsTableEntries[index]
-        } else {
-            entry = passwordsTableEntries[index]
-        }
-        return entry
+        return sections[indexPath.section].entries[indexPath.row]
     }
     
     func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {

import SwiftyUserDefaults
import PasscodeLock

enum PasswordsTableEntryType {
    case password, dir
}

struct PasswordsTableEntry {
    var title: String
    var isDir: Bool
    var passwordEntity: PasswordEntity?
}

class PasswordsViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, UITabBarControllerDelegate {

    
    private var tapTabBarTime: TimeInterval = 0

    private var sections = [(title: String, entries: [PasswordsTableEntry])]()
    
    private var searchActive : Bool = false
    
    private lazy var searchController: UISearchController = {
