Tab bar badge now disappears when opening the personal plan

This commit is contained in:
Deniz Duezgoeren
2019-09-18 11:41:17 +02:00
parent 3608d7d363
commit 67d6c5329e
2 changed files with 5 additions and 1 deletions
+3 -1
View File
@@ -148,7 +148,9 @@ class DataFetcher {
} }
} }
if type == "personal" {
personalPlanCount = 0
}
prefs.set(personalPlanCount, forKey: "personalPlanCount") prefs.set(personalPlanCount, forKey: "personalPlanCount")
if isPersonalEmpty { if isPersonalEmpty {
personalSubst.append(SubstModel(group: "", course: NSLocalizedString("personal_plan_empty", comment: ""), additional: "", date: "", time: "", room: "", teacher: "", type: "")) personalSubst.append(SubstModel(group: "", course: NSLocalizedString("personal_plan_empty", comment: ""), additional: "", date: "", time: "", room: "", teacher: "", type: ""))
@@ -26,6 +26,8 @@ class PersonalPlanViewController: PlanViewController {
navigationBarTitle = NSLocalizedString("your_plan", comment: "") navigationBarTitle = NSLocalizedString("your_plan", comment: "")
} }
self.navigationController?.navigationBar.topItem?.title = navigationBarTitle self.navigationController?.navigationBar.topItem?.title = navigationBarTitle
self.prefs.set(0, forKey: "personalPlanCount")
self.df.setTabBarBadge(for: self.tabBarController?.tabBar.items)
} }
override func getViewType() -> String { override func getViewType() -> String {