Emoji Reactions Support (#645)
* Display Pleroma emoji reactions * Interact with existing Pleroma emoji reactions * Setting for emoji reaction support * Setting for displaying reactions in timelines * More horizontal padding on reactions display item * List accounts who reacted * Arbitrary emoji reaction from status footer * Hide custom emoji keyboard when emoji is selected * Clear preferences before applying All preferences get written anyways so nothing will be lost * Reset react visibility state on bind * Fix custom emoji turning black when reacting * Load reactions when a new one is added * Emoji reactions grid * Load custom emoji in reactions list fragment * New reaction toast messages and Unicode emoji regex * Make custom emoji picker for reactions scrollable * Scroll down to show custom emoji picker when reacting * Divider after reaction custom emoji picker * Animate react button opacity back in * fix plural strings * re-implement reactions using horizontal recycler view * update reactions with event * tweak emoji font size * tweak button styles (a tiny bit) * change footer react button behavior * fix emoji reaction status item padding * move emoji reactions below content items * add content description and tooltip * use custom emoji keyboard to enter unicode emoji * fix reactions clearing on status counter updates * fix space next to emoji reactions not clickable * make compatible with glitch-soc * Remove now unused EmojiReactionsView class * improve handling of reaction padding --------- Co-authored-by: sk <sk22@mailbox.org>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package org.joinmastodon.android.model;
|
||||
|
||||
import org.parceler.Parcel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Parcel
|
||||
public class EmojiReaction {
|
||||
public List<Account> accounts;
|
||||
public List<String> accountIds;
|
||||
public int count;
|
||||
public boolean me;
|
||||
public String name;
|
||||
public String url;
|
||||
public String staticUrl;
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import org.parceler.Parcel;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Parcel
|
||||
@@ -74,6 +75,9 @@ public class Status extends BaseModel implements DisplayItemsParent, Searchable{
|
||||
|
||||
public Status quote; // can be boolean in calckey
|
||||
|
||||
public List<EmojiReaction> reactions;
|
||||
protected List<EmojiReaction> emojiReactions; // akkoma
|
||||
|
||||
public transient boolean filterRevealed;
|
||||
public transient boolean spoilerRevealed;
|
||||
public transient boolean sensitiveRevealed;
|
||||
@@ -110,10 +114,12 @@ public class Status extends BaseModel implements DisplayItemsParent, Searchable{
|
||||
for(FilterResult fr:filtered)
|
||||
fr.postprocess();
|
||||
|
||||
if (!TextUtils.isEmpty(spoilerText)) sensitive = true;
|
||||
if(!TextUtils.isEmpty(spoilerText)) sensitive=true;
|
||||
spoilerRevealed=TextUtils.isEmpty(spoilerText);
|
||||
sensitiveRevealed=!sensitive;
|
||||
if (visibility.equals(StatusPrivacy.LOCAL)) localOnly = true;
|
||||
if(visibility.equals(StatusPrivacy.LOCAL)) localOnly=true;
|
||||
if(emojiReactions!=null) reactions=emojiReactions;
|
||||
if(reactions==null) reactions=new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -169,6 +175,8 @@ public class Status extends BaseModel implements DisplayItemsParent, Searchable{
|
||||
reblogged=ev.reblogged;
|
||||
bookmarked=ev.bookmarked;
|
||||
pinned=ev.pinned;
|
||||
reactions.clear();
|
||||
reactions.addAll(ev.reactions);
|
||||
}
|
||||
|
||||
public Status getContentStatus(){
|
||||
|
||||
Reference in New Issue
Block a user