修复打开APP,持续响铃不关闭的问题。

This commit is contained in:
Fin 2024-09-10 14:31:54 +08:00
parent 7d39977990
commit fb31e0aaaf
2 changed files with 9 additions and 15 deletions

View File

@ -213,16 +213,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
func applicationWillEnterForeground(_ application: UIApplication) {
ServerManager.shared.syncAllServers()
// -1
// 0
UIApplication.shared.applicationIconBadgeNumber = -1
//
stopCallNotificationProcessor()
}
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
//
stopCallNotificationProcessor()
}
func applicationWillTerminate(_ application: UIApplication) {

View File

@ -28,17 +28,13 @@ class SectionViewModel: ViewModel, ViewModelType {
}
func initSectionItems() -> Observable<[SectionModel<String, SectionItem>]> {
return Observable.create { (observer) -> Disposable in
let sectionItems = [
SectionItem(image: UIImage(named: "baseline_gite_black_24pt"), title: NSLocalizedString("service")),
SectionItem(image: Icon.history, title: NSLocalizedString("historyMessage")),
SectionItem(image: UIImage(named: "baseline_manage_accounts_black_24pt"), title: NSLocalizedString("settings")),
]
let section = [SectionModel(model: "", items: sectionItems)]
observer.onNext(section)
observer.onCompleted()
return Disposables.create()
}
let sectionItems = [
SectionItem(image: UIImage(named: "baseline_gite_black_24pt"), title: NSLocalizedString("service")),
SectionItem(image: Icon.history, title: NSLocalizedString("historyMessage")),
SectionItem(image: UIImage(named: "baseline_manage_accounts_black_24pt"), title: NSLocalizedString("settings")),
]
let section = [SectionModel(model: "", items: sectionItems)]
return Observable.just(section)
}
func transform(input: Input) -> Output {