Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rooms: support for attributedPartialTextMessage storage #1457

Merged
merged 5 commits into from
May 12, 2022

Conversation

aringenbach
Copy link
Contributor

Rooms can now store an attributed string as partialTextMessage. Similar NSString API is now deprecated.

Support for: element-hq/element-ios#3526

/**
The text message partially typed by the user but not yet sent.
The value is stored by the session store. Thus, it can be retrieved
when the application restarts.
*/
// @TODO(summary): Move to MXRoomSummary
@property (nonatomic) NSString *partialTextMessage;
@property (nonatomic) NSAttributedString *attributedPartialTextMessage;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this maybe be partialAttributedTextMessage instead? 🤔 It's probably going to mean a lot of changes if you modify it now, up to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, this will go obviously super smoothly with Xcode's awesome refactors 👍

@@ -22,7 +22,7 @@
/**
`MXRoomMember` is the information about a user in a room.
*/
@interface MXRoomMember : NSObject
@interface MXRoomMember : NSObject<NSCoding>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really necessary to encode the whole RoomMember for pills to work? Is there a possibility we expose private data here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed this with @SBiOSoftWhare already, I suppose it could be worth it to use some intermediate PillData struct with only what we really need (which would be only 3 strings so it will be easily codable/decodable for free)

I will make that change then

Copy link
Member

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍

@aringenbach aringenbach merged commit b145b2e into develop May 12, 2022
@aringenbach aringenbach deleted the aringenbach/3526_user_pills branch May 12, 2022 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants