mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 13:35:19 +00:00
WatchOS keyboard allow emoji
This commit is contained in:
parent
be7626f30b
commit
836ed086f4
@ -5,6 +5,7 @@
|
||||
@interface TGInputController : NSObject
|
||||
|
||||
+ (void)presentPlainInputControllerForInterfaceController:(TGInterfaceController *)interfaceController completion:(void (^)(NSString *))completion;
|
||||
+ (void)presentInputControllerWithEmojisForInterfaceController:(TGInterfaceController *)interfaceController completion:(void (^)(NSString *))completion;
|
||||
+ (void)presentInputControllerForInterfaceController:(TGInterfaceController *)interfaceController suggestionsForText:(NSString *)text completion:(void (^)(NSString *))completion;
|
||||
+ (void)presentAudioControllerForInterfaceController:(TGInterfaceController *)interfaceController completion:(void (^)(int64_t uniqueId, int32_t duration, NSURL *url))completion;
|
||||
|
||||
|
@ -20,6 +20,15 @@
|
||||
}];
|
||||
}
|
||||
|
||||
+ (void)presentInputControllerWithEmojisForInterfaceController:(TGInterfaceController *)interfaceController completion:(void (^)(NSString *))completion;
|
||||
{
|
||||
[interfaceController presentTextInputControllerWithSuggestions:nil allowedInputMode:WKTextInputModeAllowEmoji completion:^(NSArray *results)
|
||||
{
|
||||
if (completion != nil && results.count > 0 && [results.firstObject isKindOfClass:[NSString class]])
|
||||
completion(results.firstObject);
|
||||
}];
|
||||
}
|
||||
|
||||
+ (void)presentInputControllerForInterfaceController:(TGInterfaceController *)interfaceController suggestionsForText:(NSString *)text completion:(void (^)(NSString *))completion
|
||||
{
|
||||
[interfaceController presentTextInputControllerWithSuggestions:[self suggestionsForText:text] allowedInputMode:WKTextInputModeAllowEmoji completion:^(NSArray *results)
|
||||
|
@ -229,7 +229,7 @@ NSString *const TGMessageViewControllerIdentifier = @"TGMessageViewController";
|
||||
if (strongSelf == nil)
|
||||
return;
|
||||
|
||||
[TGInputController presentPlainInputControllerForInterfaceController:strongSelf completion:^(NSString *text)
|
||||
[TGInputController presentInputControllerWithEmojisForInterfaceController:strongSelf completion:^(NSString *text)
|
||||
{
|
||||
[strongSelf->_sendMessageDisposable setDisposable:[[TGBridgeSendMessageSignals sendMessageWithPeerId:strongSelf->_context.peerId text:text replyToMid:strongSelf->_context.message.identifier] startWithNext:^(TGBridgeMessage *message)
|
||||
{
|
||||
|
@ -1238,7 +1238,7 @@ const NSInteger TGNeoConversationControllerInitialRenderCount = 4 * 2;
|
||||
if (strongSelf == nil)
|
||||
return;
|
||||
|
||||
[TGInputController presentPlainInputControllerForInterfaceController:strongSelf completion:^(NSString *text)
|
||||
[TGInputController presentInputControllerWithEmojisForInterfaceController:strongSelf completion:^(NSString *text)
|
||||
{
|
||||
[strongSelf sendMessageWithText:text];
|
||||
}];
|
||||
|
Loading…
x
Reference in New Issue
Block a user