Show the right contacts in the share screen
This commit is contained in:
parent
8c620b7c0b
commit
22ee1d238d
|
@ -353,9 +353,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
- (NSArray<TSThread *> *)filteredThreadsWithSearchText
|
||||
{
|
||||
NSString *searchTerm = [[self.searchBar text] ows_stripped];
|
||||
|
||||
return [self.fullTextSearcher filterThreads:self.threadViewHelper.threads withSearchText:searchTerm];
|
||||
return self.threadViewHelper.threads;
|
||||
}
|
||||
|
||||
- (NSArray<SignalAccount *> *)filteredSignalAccountsWithSearchText
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#import <SessionServiceKit/OWSPrimaryStorage.h>
|
||||
#import <SessionServiceKit/TSDatabaseView.h>
|
||||
#import <SessionServiceKit/TSThread.h>
|
||||
#import <SessionServiceKit/TSContactThread.h>
|
||||
#import <SessionServiceKit/SessionServiceKit-Swift.h>
|
||||
#import <YapDatabase/YapDatabase.h>
|
||||
#import <YapDatabase/YapDatabaseViewChange.h>
|
||||
#import <YapDatabase/YapDatabaseViewConnection.h>
|
||||
|
@ -198,7 +200,16 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
TSThread *thread = [[transaction extension:TSThreadDatabaseViewExtensionName]
|
||||
objectAtIndexPath:[NSIndexPath indexPathForItem:(NSInteger)item inSection:(NSInteger)section]
|
||||
withMappings:self.threadMappings];
|
||||
[threads addObject:thread];
|
||||
if (!thread.shouldThreadBeVisible || !thread.isContactFriend) { continue; }
|
||||
if ([thread isKindOfClass:TSContactThread.class]) {
|
||||
NSString *publicKey = thread.contactIdentifier;
|
||||
if ([LKUserDisplayNameUtilities getPrivateChatDisplayNameFor:publicKey] == nil) { continue; }
|
||||
if ([LKDatabaseUtilities getMasterHexEncodedPublicKeyFor:publicKey in:transaction] == nil) {
|
||||
[threads addObject:thread];
|
||||
}
|
||||
} else {
|
||||
[threads addObject:thread];
|
||||
}
|
||||
}
|
||||
}
|
||||
}];
|
||||
|
|
Loading…
Reference in New Issue