mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-19 22:22:14 +02:00
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:
@@ -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;
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Fix mention pills display when coming back to a room with an unsent message
|
||||
Reference in New Issue
Block a user