Place new reaction where server specified it
This commit is contained in:
parent
309d27242d
commit
5d411e842e
|
@ -276,7 +276,11 @@ public class EmojiReactionsStatusDisplayItem extends StatusDisplayItem {
|
|||
item.createRequest(emoji, existing==null ? 1 : existing.count, false, null, (status)->{
|
||||
resetBtn.run();
|
||||
if(finalExisting==null){
|
||||
int pos=item.status.reactions.size();
|
||||
int pos=status.reactions.stream()
|
||||
.filter(r->r.name.equals(info!=null ? info.shortcode : emoji))
|
||||
.findFirst()
|
||||
.map(r->status.reactions.indexOf(r))
|
||||
.orElse(item.status.reactions.size());
|
||||
boolean previouslyEmpty=item.status.reactions.isEmpty();
|
||||
item.status.reactions.add(pos, info!=null ? EmojiReaction.of(info, me) : EmojiReaction.of(emoji, me));
|
||||
if(previouslyEmpty)
|
||||
|
|
Loading…
Reference in New Issue