This commit is contained in:
Niels Andriesse 2019-08-28 16:49:47 +10:00
parent 7acfa40915
commit d4b8dd0875
3 changed files with 8 additions and 11 deletions

View File

@ -564,14 +564,11 @@ typedef enum : NSUInteger {
return !groupThread.isLocalUserInGroup;
}
- (BOOL)isRSSGroup
- (BOOL)isRSSFeed
{
if (![_thread isKindOfClass:[TSGroupThread class]]) {
return NO;
}
TSGroupThread *groupThread = (TSGroupThread *)self.thread;
return groupThread.isRSS;
if (![_thread isKindOfClass:[TSGroupThread class]]) { return NO; }
TSGroupThread *thread = (TSGroupThread *)self.thread;
return thread.isRSSFeed;
}
- (void)hideInputIfNeeded
@ -582,7 +579,7 @@ typedef enum : NSUInteger {
return;
}
if (self.userLeftGroup || self.isRSSGroup) {
if (self.userLeftGroup || self.isRSSFeed) {
self.inputToolbar.hidden = YES; // user has requested they leave the group. further sends disallowed
[self dismissKeyBoard];
} else {

View File

@ -16,7 +16,7 @@ extern NSString *const TSGroupThread_NotificationKey_UniqueId;
@interface TSGroupThread : TSThread
@property (nonatomic, strong) TSGroupModel *groupModel;
@property (nonatomic, readonly) BOOL isRSS;
@property (nonatomic, readonly) BOOL isRSSFeed;
+ (instancetype)getOrCreateThreadWithGroupModel:(TSGroupModel *)groupModel;
+ (instancetype)getOrCreateThreadWithGroupModel:(TSGroupModel *)groupModel

View File

@ -266,10 +266,10 @@ NSString *const TSGroupThread_NotificationKey_UniqueId = @"TSGroupThread_Notific
return [self.class stableColorNameForNewConversationWithString:[self threadIdFromGroupId:groupId]];
}
- (BOOL)isRSS
- (BOOL)isRSSFeed
{
NSString *groupID = [[NSString alloc] initWithData:self.groupModel.groupId encoding:NSUTF8StringEncoding];
return groupID != nil && [groupID containsString:@"rss:"];
return groupID != nil && [groupID hasPrefix:@"rss://"];
}
@end