mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
respond to CR
// FREEBIE
This commit is contained in:
parent
8ef9e96b91
commit
e82a3f3ddf
2 changed files with 22 additions and 9 deletions
|
@ -49,14 +49,16 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
[dataOutputStream open];
|
[dataOutputStream open];
|
||||||
OWSGroupsOutputStream *groupsOutputStream = [OWSGroupsOutputStream streamWithOutputStream:dataOutputStream];
|
OWSGroupsOutputStream *groupsOutputStream = [OWSGroupsOutputStream streamWithOutputStream:dataOutputStream];
|
||||||
|
|
||||||
[TSGroupThread enumerateCollectionObjectsUsingBlock:^(id obj, BOOL *stop) {
|
[TSGroupThread
|
||||||
if (![obj isKindOfClass:[TSGroupThread class]]) {
|
enumerateCollectionObjectsWithTransaction:transaction
|
||||||
DDLogVerbose(@"Ignoring non group thread in thread collection: %@", obj);
|
usingBlock:^(id obj, BOOL *stop) {
|
||||||
return;
|
if (![obj isKindOfClass:[TSGroupThread class]]) {
|
||||||
}
|
DDLogVerbose(@"Ignoring non group thread in thread collection: %@", obj);
|
||||||
TSGroupModel *group = ((TSGroupThread *)obj).groupModel;
|
return;
|
||||||
[groupsOutputStream writeGroup:group];
|
}
|
||||||
}];
|
TSGroupModel *group = ((TSGroupThread *)obj).groupModel;
|
||||||
|
[groupsOutputStream writeGroup:group];
|
||||||
|
}];
|
||||||
|
|
||||||
[groupsOutputStream flush];
|
[groupsOutputStream flush];
|
||||||
[dataOutputStream close];
|
[dataOutputStream close];
|
||||||
|
|
|
@ -81,9 +81,20 @@
|
||||||
+ (instancetype)fetchObjectWithUniqueID:(NSString *)uniqueID NS_SWIFT_NAME(fetch(uniqueId:));
|
+ (instancetype)fetchObjectWithUniqueID:(NSString *)uniqueID NS_SWIFT_NAME(fetch(uniqueId:));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Saves the object with shared readWrite connection.
|
* Saves the object with the shared readWrite connection.
|
||||||
|
*
|
||||||
|
* This method will block if another readWrite transaction is open.
|
||||||
*/
|
*/
|
||||||
- (void)save;
|
- (void)save;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Saves the object with the shared readWrite connection - does not block.
|
||||||
|
*
|
||||||
|
* Be mindful that this method may clobber other changes persisted
|
||||||
|
* while waiting to open the readWrite transaction.
|
||||||
|
*
|
||||||
|
* @param completionBlock is called on the main thread
|
||||||
|
*/
|
||||||
- (void)saveAsyncWithCompletionBlock:(void (^_Nullable)(void))completionBlock;
|
- (void)saveAsyncWithCompletionBlock:(void (^_Nullable)(void))completionBlock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue