diff --git a/Riot/Modules/MatrixKit/Models/Room/MXKRoomDataSource.h b/Riot/Modules/MatrixKit/Models/Room/MXKRoomDataSource.h index d7c4b2db2..9928892f2 100644 --- a/Riot/Modules/MatrixKit/Models/Room/MXKRoomDataSource.h +++ b/Riot/Modules/MatrixKit/Models/Room/MXKRoomDataSource.h @@ -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). */ diff --git a/Riot/Modules/MatrixKit/Models/Room/MXKRoomDataSource.m b/Riot/Modules/MatrixKit/Models/Room/MXKRoomDataSource.m index 7770efd89..d7bc67822 100644 --- a/Riot/Modules/MatrixKit/Models/Room/MXKRoomDataSource.m +++ b/Riot/Modules/MatrixKit/Models/Room/MXKRoomDataSource.m @@ -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; diff --git a/Riot/Modules/Room/MXKRoomViewController.m b/Riot/Modules/Room/MXKRoomViewController.m index 65dc73a3e..84ba1c128 100644 --- a/Riot/Modules/Room/MXKRoomViewController.m +++ b/Riot/Modules/Room/MXKRoomViewController.m @@ -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]; diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index d7df77ead..b39f1de4b 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -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; } }; diff --git a/changelog.d/6670.bugfix b/changelog.d/6670.bugfix new file mode 100644 index 000000000..41dc09b6f --- /dev/null +++ b/changelog.d/6670.bugfix @@ -0,0 +1 @@ +Fix mention pills display when coming back to a room with an unsent message