Merge pull request #6671 from vector-im/aringenbach/6670_mention_pills_partial_text_message

Fix mention pills display when coming back to a room with an unsent message
This commit is contained in:
aringenbach
2022-09-05 14:24:53 +02:00
committed by GitHub
5 changed files with 4 additions and 18 deletions
@@ -160,11 +160,6 @@ extern NSString *const kMXKRoomDataSourceTimelineErrorErrorKey;
*/
@property (nonatomic, readonly) NSInteger serverSyncEventCount;
/**
The current text message partially typed in text input (use nil to reset it).
*/
@property (nonatomic) NSString *partialTextMessage;
/**
The current attributed text message partially typed in text input (use nil to reset it).
*/
@@ -919,16 +919,6 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
return attachments;
}
- (NSString *)partialTextMessage
{
return _room.partialTextMessage;
}
- (void)setPartialTextMessage:(NSString *)partialTextMessage
{
_room.partialTextMessage = partialTextMessage;
}
- (NSAttributedString *)partialAttributedTextMessage
{
return _room.partialAttributedTextMessage;
+2 -2
View File
@@ -358,7 +358,7 @@
{
// Retrieve the potential message partially typed during last room display.
// Note: We have to wait for viewDidAppear before updating growingTextView (viewWillAppear is too early)
inputToolbarView.textMessage = roomDataSource.partialTextMessage;
inputToolbarView.attributedTextMessage = roomDataSource.partialAttributedTextMessage;
}
if (!hasAppearedOnce)
@@ -3351,7 +3351,7 @@
if (_saveProgressTextInput && roomDataSource)
{
// Store the potential message partially typed in text input
roomDataSource.partialTextMessage = inputToolbarView.textMessage;
roomDataSource.partialAttributedTextMessage = inputToolbarView.attributedTextMessage;
}
[self handleTypingState:typing];
+1 -1
View File
@@ -5669,7 +5669,7 @@ static CGSize kThreadListBarButtonItemImageSize;
if (self.saveProgressTextInput)
{
// Restore the potential message partially typed before jump to last unread messages.
self.inputToolbarView.textMessage = roomDataSource.partialTextMessage;
self.inputToolbarView.attributedTextMessage = roomDataSource.partialAttributedTextMessage;
}
};
+1
View File
@@ -0,0 +1 @@
Fix mention pills display when coming back to a room with an unsent message