Skip to content

Commit

Permalink
Merge branch 'beta' into oldstable/6.4-line
Browse files Browse the repository at this point in the history
  • Loading branch information
tmolitor-stud-tu authored Nov 9, 2024
2 parents e64a13b + 18f42d2 commit 944db5d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
14 changes: 1 addition & 13 deletions Monal/Classes/NotificationDebugging.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
Expand Down
2 changes: 0 additions & 2 deletions Monal/NotificationService/NotificationService.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down

0 comments on commit 944db5d

Please sign in to comment.