Remove badge value of tab bar item when numberOfLocalCommits is zero
This commit is contained in:
parent
0f39fa5567
commit
479453a7e3
1 changed files with 3 additions and 1 deletions
|
|
@ -500,7 +500,9 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
|
|||
private func reloadTableView(data: [PasswordsTableEntry], anim: CAAnimation? = nil) {
|
||||
// set navigation item
|
||||
let numberOfLocalCommits = self.passwordStore.numberOfLocalCommits()
|
||||
if numberOfLocalCommits > 0 {
|
||||
if numberOfLocalCommits == 0 {
|
||||
navigationController?.tabBarItem.badgeValue = nil
|
||||
} else {
|
||||
navigationController?.tabBarItem.badgeValue = "\(numberOfLocalCommits)"
|
||||
}
|
||||
if parentPasswordEntity != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue