Skip to content

Commit

Permalink
Merge pull request #505 from FineFindus/fix/scheduled-status-quote-crash
Browse files Browse the repository at this point in the history
fix(StatusDisplayItem): check if account is null before adding quote
  • Loading branch information
LucasGGamerM authored Aug 11, 2024
2 parents 13545fd + 42c55d5 commit b07789b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public static ArrayList<StatusDisplayItem> buildItems(BaseStatusListFragment<?>
if(!statusForContent.mediaAttachments.isEmpty() && statusForContent.poll==null) // add spacing if immediately preceded by attachment
contentItems.add(new DummyStatusDisplayItem(parentID, fragment));
contentItems.addAll(buildItems(fragment, statusForContent.quote, accountID, parentObject, knownAccounts, filterContext, FLAG_NO_FOOTER|FLAG_INSET|FLAG_NO_EMOJI_REACTIONS|FLAG_IS_FOR_QUOTE));
} else if((flags & FLAG_INSET)==0 && statusForContent.mediaAttachments.isEmpty()){
} else if((flags & FLAG_INSET)==0 && statusForContent.mediaAttachments.isEmpty() && statusForContent.account!=null){
tryAddNonOfficialQuote(statusForContent, fragment, accountID, filterContext);
}
if(contentItems!=items && statusForContent.spoilerRevealed){
Expand Down Expand Up @@ -431,6 +431,7 @@ private static void tryAddNonOfficialQuote(Status status, BaseStatusListFragment
return;
String quoteURL=matcher.group();

// account may be null for scheduled posts
if (!UiUtils.looksLikeFediverseUrl(quoteURL))
return;

Expand Down

0 comments on commit b07789b

Please sign in to comment.