-
Notifications
You must be signed in to change notification settings - Fork 383
Preserve emojis order when adding #2698
base: master
Are you sure you want to change the base?
Conversation
* reactions order in app is defined by array in app (not received order from API) * reactions picker & UI list share the same data structure
| init(models: [ReactionViewModel]) { | ||
| self.models = models | ||
| let reactions = IssueCommentReactionViewModel.allReactions | ||
| let sortedModels = models.sorted { (m1, m2) -> Bool in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
instead of m1, m2, why not lhs, rhs?
additionally for m1Idx, m2Idx, why not lhsContent and rhsContent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lhs & rhs totally makes sense!
Not sure about xContent as it's an index of content in predefined array for order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@viktorasl what is the status of this? 😊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, I thought I've fixed this. On it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So sorry it took so long. Fixed now.
Closes #2403.
When inserting reaction to the middle last cell held UI state applied by
pullOutand that's why that had to be extracted to a separate method which has to be called byconfiguremethod.Not sure if private
Arrayextension is correct implementation in this case.