Skip to content

Commit

Permalink
Merge pull request #1009 from matrix-org/element_3986
Browse files Browse the repository at this point in the history
MXSession: Make `handleBackgroundSyncCacheIfRequiredWithCompletion` public
  • Loading branch information
ismailgulek authored Feb 2, 2021
2 parents 30a4ed8 + cc05b7a commit 1c44bde
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
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

0 comments on commit 1c44bde

Please sign in to comment.