mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Ensure message mapping is up-to-date when app returns from background.
// FREEBIE
This commit is contained in:
parent
fabc0301cc
commit
104a548eb2
|
@ -561,6 +561,13 @@ typedef enum : NSUInteger {
|
|||
// or on another device.
|
||||
[self hideInputIfNeeded];
|
||||
|
||||
// We need to `beginLongLivedReadTransaction` before we update our
|
||||
// mapping in order to jump to the most recent commit.
|
||||
[self.uiDatabaseConnection beginLongLivedReadTransaction];
|
||||
[self.uiDatabaseConnection readWithBlock:^(YapDatabaseReadTransaction *transaction) {
|
||||
[self.messageMappings updateWithTransaction:transaction];
|
||||
}];
|
||||
|
||||
[self toggleObservers:YES];
|
||||
|
||||
// restart any animations that were stopped e.g. while inspecting the contact info screens.
|
||||
|
|
Loading…
Reference in a new issue