diff --git a/Monal/Classes/NotificationDebugging.swift b/Monal/Classes/NotificationDebugging.swift index ebe6bdcbfa..3dc7396466 100644 --- a/Monal/Classes/NotificationDebugging.swift +++ b/Monal/Classes/NotificationDebugging.swift @@ -8,11 +8,6 @@ import OrderedCollections -class NotificationDebuggingDefaultsDB: ObservableObject { - @defaultsDB("lastAppexStart") - var lastAppexStart: Date? -} - struct NotificationDebugging: View { private let applePushEnabled: Bool private let applePushToken: String @@ -24,25 +19,18 @@ struct NotificationDebugging: View { @State private var showPushToken = false @State private var selectedPushServer: String - - @ObservedObject var notificationDebuggingDefaultsDB = NotificationDebuggingDefaultsDB() var body: some View { Form { Group { Section(header: Text("Status").font(.title3)) { - VStack(alignment: .leading, spacing:10) { + VStack(alignment: .leading) { buildNotificationStateLabel(Text("Apple Push Service"), isWorking: self.applePushEnabled); Divider() Text("Apple push service should always be on. If it is off, your device can not talk to Apple's server.").foregroundColor(Color(UIColor.secondaryLabel)).font(.footnote) if !self.applePushEnabled, let apnsError = MLXMPPManager.sharedInstance().apnsError { Text("Error: \(String(describing:apnsError))").foregroundColor(.red).font(.footnote) } - if let lastAppexStart = notificationDebuggingDefaultsDB.lastAppexStart { - Text("Last incoming push: \(String(describing:lastAppexStart))").foregroundColor(.gray).font(.footnote) - } else { - Text("Last incoming push: unknown").foregroundColor(.gray).font(.footnote) - } }.onTapGesture(count: 2, perform: { showPushToken = true }).alert(isPresented: $showPushToken) { diff --git a/Monal/NotificationService/NotificationService.m b/Monal/NotificationService/NotificationService.m index c25f3052ca..6bb79c6e57 100644 --- a/Monal/NotificationService/NotificationService.m +++ b/Monal/NotificationService/NotificationService.m @@ -441,8 +441,6 @@ +(void) initialize if(warnUnclean) DDLogError(@"detected unclean appex shutdown!"); - [[HelperTools defaultsDB] setObject:[NSDate now] forKey:@"lastAppexStart"]; - //mark this appex as unclean (will be cleared directly before calling exit(0)) [NotificationService setAppexCleanShutdownStatus:NO]; }