Gated the database suspend and resume calls so that the Mac app will compile.

This commit is contained in:
Maurice Parker 2020-04-06 09:18:20 -05:00
parent f0ec7c5e19
commit 5ab62d3aad
1 changed files with 4 additions and 0 deletions

View File

@ -411,14 +411,18 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
}
public func suspendDatabase() {
#if os(iOS)
database.cancelAndSuspend()
#endif
save()
}
/// Re-open the SQLite database and allow database calls.
/// Call this *before* calling resume.
public func resumeDatabaseAndDelegate() {
#if os(iOS)
database.resume()
#endif
delegate.resume()
}