And again

This commit is contained in:
Grishka 2023-06-24 10:43:28 +03:00
parent 74a5e970d9
commit c9e467ac2f
2 changed files with 5 additions and 4 deletions

View File

@ -29,12 +29,12 @@ public class SpoilerStatusDisplayItem extends StatusDisplayItem{
private final CustomEmojiHelper emojiHelper; private final CustomEmojiHelper emojiHelper;
private final Type type; private final Type type;
public SpoilerStatusDisplayItem(String parentID, BaseStatusListFragment parentFragment, String title, Status status, Type type){ public SpoilerStatusDisplayItem(String parentID, BaseStatusListFragment parentFragment, String title, Status status, Status statusForContent, Type type){
super(parentID, parentFragment); super(parentID, parentFragment);
this.status=status; this.status=status;
this.type=type; this.type=type;
if(TextUtils.isEmpty(title)){ if(TextUtils.isEmpty(title)){
parsedTitle=HtmlParser.parseCustomEmoji(status.spoilerText, status.emojis); parsedTitle=HtmlParser.parseCustomEmoji(statusForContent.spoilerText, statusForContent.emojis);
emojiHelper=new CustomEmojiHelper(); emojiHelper=new CustomEmojiHelper();
emojiHelper.setText(parsedTitle); emojiHelper.setText(parsedTitle);
}else{ }else{

View File

@ -119,14 +119,15 @@ public abstract class StatusDisplayItem{
ArrayList<StatusDisplayItem> contentItems; ArrayList<StatusDisplayItem> contentItems;
if(filtered){ if(filtered){
SpoilerStatusDisplayItem spoilerItem=new SpoilerStatusDisplayItem(parentID, fragment, fragment.getString(R.string.post_matches_filter_x, status.filtered.get(0).filter.title), status, Type.FILTER_SPOILER); SpoilerStatusDisplayItem spoilerItem=new SpoilerStatusDisplayItem(parentID, fragment, fragment.getString(R.string.post_matches_filter_x, status.filtered.get(0).filter.title), status, statusForContent, Type.FILTER_SPOILER);
items.add(spoilerItem); items.add(spoilerItem);
contentItems=spoilerItem.contentItems; contentItems=spoilerItem.contentItems;
status.spoilerRevealed=false; status.spoilerRevealed=false;
}else if(!TextUtils.isEmpty(statusForContent.spoilerText) && AccountSessionManager.get(accountID).getLocalPreferences().showCWs){ }else if(!TextUtils.isEmpty(statusForContent.spoilerText) && AccountSessionManager.get(accountID).getLocalPreferences().showCWs){
SpoilerStatusDisplayItem spoilerItem=new SpoilerStatusDisplayItem(parentID, fragment, null, status, Type.SPOILER); SpoilerStatusDisplayItem spoilerItem=new SpoilerStatusDisplayItem(parentID, fragment, null, status, statusForContent, Type.SPOILER);
items.add(spoilerItem); items.add(spoilerItem);
contentItems=spoilerItem.contentItems; contentItems=spoilerItem.contentItems;
status.spoilerRevealed=false;
}else{ }else{
contentItems=items; contentItems=items;
} }