Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MXSession: Make handleBackgroundSyncCacheIfRequiredWithCompletion public #1009

Merged
merged 2 commits into from
Feb 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Changes to be released in next version
* MXMemory: New utility class to track memory usage.
* MXRealmCryptoStore: Compact Realm DB only once, at the first usage.
* MXLoginSSOIdentityProvider: Add new `brand` field as described in MSC2858 (vector-im/element-ios/issues/3980).
* MXSession: Make `handleBackgroundSyncCacheIfRequiredWithCompletion` method public (vector-im/element-ios/issues/3986).

🐛 Bugfix
* Background Sync: Use autoreleasepool to limit RAM usage (vector-im/element-ios/issues/3957).
Expand Down
7 changes: 7 additions & 0 deletions MatrixSDK/MXSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,13 @@ typedef void (^MXOnBackgroundSyncFail)(NSError *error);
success:(MXOnBackgroundSyncDone)backgroundSyncDone
failure:(MXOnBackgroundSyncFail)backgroundSyncfails NS_REFINED_FOR_SWIFT;

/**
Handles sync response retrieved by the background sync service, if the cache is valid. Clears the cache after processing.

@param completion Completion block called when the session has been processed the cache, or when no valid cache exists.
*/
- (void)handleBackgroundSyncCacheIfRequiredWithCompletion:(void (^)(void))completion;

/**
Restart the session events stream.
@return YES if the operation succeeds
Expand Down