Fix unicode reaction not showing up if no reactions were previsouly present
This commit is contained in:
@@ -277,8 +277,12 @@ public class EmojiReactionsStatusDisplayItem extends StatusDisplayItem {
|
|||||||
resetBtn.run();
|
resetBtn.run();
|
||||||
if(finalExisting==null){
|
if(finalExisting==null){
|
||||||
int pos=item.status.reactions.size();
|
int pos=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));
|
item.status.reactions.add(pos, info!=null ? EmojiReaction.of(info, me) : EmojiReaction.of(emoji, me));
|
||||||
adapter.notifyItemRangeInserted(pos, 1);
|
if(previouslyEmpty)
|
||||||
|
adapter.notifyItemChanged(pos);
|
||||||
|
else
|
||||||
|
adapter.notifyItemInserted(pos);
|
||||||
RecyclerView.SmoothScroller scroller=new LinearSmoothScroller(list.getContext());
|
RecyclerView.SmoothScroller scroller=new LinearSmoothScroller(list.getContext());
|
||||||
scroller.setTargetPosition(pos);
|
scroller.setTargetPosition(pos);
|
||||||
list.getLayoutManager().startSmoothScroll(scroller);
|
list.getLayoutManager().startSmoothScroll(scroller);
|
||||||
|
|||||||
Reference in New Issue
Block a user