Rename isIRCStyleCommand to sendAsIRCStyleCommandIfPossible

This commit is contained in:
aringenbach
2022-07-12 10:37:29 +02:00
parent e00a4631eb
commit d9554e3d8a
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -394,7 +394,7 @@ typedef NS_ENUM(NSUInteger, MXKRoomViewControllerJoinRoomResult) {
@param string to analyse
@return YES if IRC style command has been detected and interpreted.
*/
- (BOOL)isIRCStyleCommand:(NSString*)string;
- (BOOL)sendAsIRCStyleCommandIfPossible:(NSString*)string;
/**
Mention the member display name in the current text of the message composer.
+2 -2
View File
@@ -1250,7 +1250,7 @@
customEventDetailsViewClass = eventDetailsViewClass;
}
- (BOOL)isIRCStyleCommand:(NSString*)string
- (BOOL)sendAsIRCStyleCommandIfPossible:(NSString*)string
{
// Check whether the provided text may be an IRC-style command
if ([string hasPrefix:@"/"] == NO || [string hasPrefix:@"//"] == YES)
@@ -3375,7 +3375,7 @@
- (void)roomInputToolbarView:(MXKRoomInputToolbarView*)toolbarView sendTextMessage:(NSString*)textMessage
{
// Handle potential IRC commands in typed string
if ([self isIRCStyleCommand:textMessage] == NO)
if ([self sendAsIRCStyleCommandIfPossible:textMessage] == NO)
{
// Send text message in the current room
[self sendTextMessage:textMessage];
+3 -3
View File
@@ -1228,7 +1228,7 @@ static CGSize kThreadListBarButtonItemImageSize;
}
}
- (BOOL)isIRCStyleCommand:(NSString*)string
- (BOOL)sendAsIRCStyleCommandIfPossible:(NSString*)string
{
// Override the default behavior for `/join` command in order to open automatically the joined room
@@ -1271,7 +1271,7 @@ static CGSize kThreadListBarButtonItemImageSize;
}
return YES;
}
return [super isIRCStyleCommand:string];
return [super sendAsIRCStyleCommandIfPossible:string];
}
- (void)setKeyboardHeight:(CGFloat)keyboardHeight
@@ -4816,7 +4816,7 @@ static CGSize kThreadListBarButtonItemImageSize;
message = attributedTextMessage.string;
}
// Try to send the slash command
isMessageAHandledCommand = [self isIRCStyleCommand:message];
isMessageAHandledCommand = [self sendAsIRCStyleCommandIfPossible:message];
}
if (!isMessageAHandledCommand)