|
|
|
@ -16,10 +16,11 @@ |
|
|
|
|
package com.keylesspalace.tusky.viewdata; |
|
|
|
|
|
|
|
|
|
import android.os.Build; |
|
|
|
|
import androidx.annotation.Nullable; |
|
|
|
|
import android.text.SpannableStringBuilder; |
|
|
|
|
import android.text.Spanned; |
|
|
|
|
|
|
|
|
|
import androidx.annotation.Nullable; |
|
|
|
|
|
|
|
|
|
import com.keylesspalace.tusky.entity.Attachment; |
|
|
|
|
import com.keylesspalace.tusky.entity.Card; |
|
|
|
|
import com.keylesspalace.tusky.entity.Emoji; |
|
|
|
@ -87,6 +88,7 @@ public abstract class StatusViewData { |
|
|
|
|
private final Status.Application application; |
|
|
|
|
private final List<Emoji> statusEmojis; |
|
|
|
|
private final List<Emoji> accountEmojis; |
|
|
|
|
private final List<Emoji> rebloggedByAccountEmojis; |
|
|
|
|
@Nullable |
|
|
|
|
private final Card card; |
|
|
|
|
private final boolean isCollapsible; /** Whether the status meets the requirement to be collapse */ |
|
|
|
@ -108,7 +110,7 @@ public abstract class StatusViewData { |
|
|
|
|
boolean isShowingContent, String userFullName, String nickname, String avatar, |
|
|
|
|
Date createdAt, int reblogsCount, int favouritesCount, @Nullable String inReplyToId, |
|
|
|
|
@Nullable String inReplyToAccountAcct, @Nullable Status.Mention[] mentions, String senderId, boolean rebloggingEnabled, |
|
|
|
|
Status.Application application, List<Emoji> statusEmojis, List<Emoji> accountEmojis, @Nullable Card card, |
|
|
|
|
Status.Application application, List<Emoji> statusEmojis, List<Emoji> accountEmojis, List<Emoji> rebloggedByAccountEmojis, @Nullable Card card, |
|
|
|
|
boolean isCollapsible, boolean isCollapsed, @Nullable PollViewData poll, boolean isBot, boolean isMuted, boolean isThreadMuted, |
|
|
|
|
boolean isUserMuted, int conversationId, @Nullable List<EmojiReaction> emojiReactions, boolean parentVisible) { |
|
|
|
|
|
|
|
|
@ -146,6 +148,7 @@ public abstract class StatusViewData { |
|
|
|
|
this.application = application; |
|
|
|
|
this.statusEmojis = statusEmojis; |
|
|
|
|
this.accountEmojis = accountEmojis; |
|
|
|
|
this.rebloggedByAccountEmojis = rebloggedByAccountEmojis; |
|
|
|
|
this.card = card; |
|
|
|
|
this.isCollapsible = isCollapsible; |
|
|
|
|
this.isCollapsed = isCollapsed; |
|
|
|
@ -281,6 +284,10 @@ public abstract class StatusViewData { |
|
|
|
|
return parentVisible; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public List<Emoji> getRebloggedByAccountEmojis() { |
|
|
|
|
return rebloggedByAccountEmojis; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Nullable |
|
|
|
|
public Card getCard() { |
|
|
|
|
return card; |
|
|
|
@ -365,6 +372,7 @@ public abstract class StatusViewData { |
|
|
|
|
Objects.equals(application, concrete.application) && |
|
|
|
|
Objects.equals(statusEmojis, concrete.statusEmojis) && |
|
|
|
|
Objects.equals(accountEmojis, concrete.accountEmojis) && |
|
|
|
|
Objects.equals(rebloggedByAccountEmojis, concrete.rebloggedByAccountEmojis) && |
|
|
|
|
Objects.equals(card, concrete.card) && |
|
|
|
|
Objects.equals(poll, concrete.poll) && |
|
|
|
|
isCollapsed == concrete.isCollapsed && |
|
|
|
@ -476,6 +484,7 @@ public abstract class StatusViewData { |
|
|
|
|
private Status.Application application; |
|
|
|
|
private List<Emoji> statusEmojis; |
|
|
|
|
private List<Emoji> accountEmojis; |
|
|
|
|
private List<Emoji> rebloggedByAccountEmojis; |
|
|
|
|
private Card card; |
|
|
|
|
private boolean isCollapsible; /** Whether the status meets the requirement to be collapsed */ |
|
|
|
|
private boolean isCollapsed; /** Whether the status is shown partially or fully */ |
|
|
|
@ -673,6 +682,10 @@ public abstract class StatusViewData { |
|
|
|
|
|
|
|
|
|
public Builder setParentVisible(boolean parentVisible) { |
|
|
|
|
this.parentVisible = parentVisible; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Builder setRebloggedByEmojis(List<Emoji> emojis) { |
|
|
|
|
this.rebloggedByAccountEmojis = emojis; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -744,7 +757,7 @@ public abstract class StatusViewData { |
|
|
|
|
visibility, attachments, rebloggedByUsername, rebloggedAvatar, isSensitive, isExpanded, |
|
|
|
|
isShowingContent, userFullName, nickname, avatar, createdAt, reblogsCount, |
|
|
|
|
favouritesCount, inReplyToId, inReplyToAccountAcct, mentions, senderId, rebloggingEnabled, application, |
|
|
|
|
statusEmojis, accountEmojis, card, isCollapsible, isCollapsed, poll, isBot, isMuted, isThreadMuted, |
|
|
|
|
statusEmojis, accountEmojis, rebloggedByAccountEmojis, card, isCollapsible, isCollapsed, poll, isBot, isMuted, isThreadMuted, |
|
|
|
|
isUserMuted, conversationId, emojiReactions, parentVisible); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|