mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 23:18:27 +02:00
Only no-op the actual sending of a typing notification.
The logic around when to send a typing notification also includes logic around when to exchange encryption keys. handleTypingNotification renamed to handleTypingState for clarity.
This commit is contained in:
@@ -438,11 +438,12 @@ typedef NS_ENUM(NSUInteger, MXKRoomViewControllerJoinRoomResult) {
|
||||
- (void)setBubbleTableViewContentOffset:(CGPoint)contentOffset animated:(BOOL)animated;
|
||||
|
||||
/**
|
||||
Handle typing notification.
|
||||
Sends a typing notification with the specified timeout.
|
||||
|
||||
@param typing Flag indicating whether the user is typing or not.
|
||||
@param notificationTimeoutMS The length of time the typing notification is valid for
|
||||
*/
|
||||
- (void)handleTypingNotification:(BOOL)typing;
|
||||
- (void)sendTypingNotification:(BOOL)typing timeout:(NSUInteger)notificationTimeoutMS;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -3299,7 +3299,7 @@
|
||||
roomDataSource.partialTextMessage = inputToolbarView.textMessage;
|
||||
}
|
||||
|
||||
[self handleTypingNotification:typing];
|
||||
[self handleTypingState:typing];
|
||||
}
|
||||
|
||||
- (void)roomInputToolbarView:(MXKRoomInputToolbarView*)toolbarView heightDidChanged:(CGFloat)height completion:(void (^)(BOOL finished))completion
|
||||
@@ -3420,7 +3420,7 @@
|
||||
}
|
||||
# pragma mark - Typing notification
|
||||
|
||||
- (void)handleTypingNotification:(BOOL)typing
|
||||
- (void)handleTypingState:(BOOL)typing
|
||||
{
|
||||
NSUInteger notificationTimeoutMS = -1;
|
||||
if (typing)
|
||||
@@ -3482,6 +3482,11 @@
|
||||
lastTypingDate = nil;
|
||||
}
|
||||
|
||||
[self sendTypingNotification:typing timeout:notificationTimeoutMS];
|
||||
}
|
||||
|
||||
- (void)sendTypingNotification:(BOOL)typing timeout:(NSUInteger)notificationTimeoutMS
|
||||
{
|
||||
MXWeakify(self);
|
||||
|
||||
// Send typing notification to server
|
||||
@@ -3512,7 +3517,7 @@
|
||||
// Check whether a new typing event has been observed
|
||||
BOOL typing = (lastTypingDate != nil);
|
||||
// Post a new typing notification
|
||||
[self handleTypingNotification:typing];
|
||||
[self handleTypingState:typing];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -70,8 +70,8 @@ class ThreadViewController: RoomViewController {
|
||||
super.onButtonPressed(sender)
|
||||
}
|
||||
|
||||
override func handleTypingNotification(_ typing: Bool) {
|
||||
// no-op
|
||||
override func sendTypingNotification(_ typing: Bool, timeout notificationTimeoutMS: UInt) {
|
||||
// no-op
|
||||
}
|
||||
|
||||
private func showThreadActions() {
|
||||
|
||||
Reference in New Issue
Block a user