refactor(Emoji.java): add back Moshidon specific constructors and getUrl method

This commit is contained in:
LucasGGamerM
2025-04-19 11:27:40 -03:00
parent d07a1c80e7
commit 21cd4c3c36

View File

@@ -33,6 +33,20 @@ public class Emoji extends BaseModel{
*/
public String category;
public Emoji() {}
public Emoji(String shortcode, String url, String staticUrl) {
this.shortcode = shortcode.replaceAll(":", "");
this.url = url;
this.staticUrl = staticUrl;
}
public String getUrl(boolean playGifs){
String idealUrl=playGifs ? url : staticUrl;
if(idealUrl==null) return url==null ? staticUrl : url;
return idealUrl;
}
@Override
public String toString(){
return "Emoji{"+