Respond to CR.

This commit is contained in:
Matthew Chen 2020-06-07 12:01:35 -03:00
parent 24b86e0075
commit e059be0d8e

View File

@ -111,11 +111,11 @@ public class UIDatabaseObserver: NSObject {
NotificationCenter.default.addObserver(self,
selector: #selector(self.applicationStateDidChange),
name: .OWSApplicationWillResignActive,
name: .OWSApplicationDidEnterBackground,
object: nil)
NotificationCenter.default.addObserver(self,
selector: #selector(applicationStateDidChange),
name: .OWSApplicationDidBecomeActive,
name: .OWSApplicationWillEnterForeground,
object: nil)
AppReadiness.runNowOrWhenAppDidBecomeReady {
@ -133,7 +133,7 @@ public class UIDatabaseObserver: NSObject {
guard AppReadiness.isAppReady() else {
return false
}
guard CurrentAppContext().isAppForegroundAndActive() else {
guard !CurrentAppContext().isInBackground() else {
return false
}
return true