Merge pull request #731 from FineFindus/fix/edit-history-crash

fix: edit history crash
This commit is contained in:
Gregory K 2023-11-08 22:00:48 +03:00 committed by GitHub
commit ef7136cb81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -26,6 +26,11 @@ public class GetStatusEditHistory extends MastodonAPIRequest<List<Status>>{
s.visibility=StatusPrivacy.PUBLIC;
s.mentions=Collections.emptyList();
s.tags=Collections.emptyList();
if(s.poll!=null){
s.poll.id="fakeID"+i;
s.poll.emojis=Collections.emptyList();
s.poll.ownVotes=Collections.emptyList();
}
i++;
}
super.validateAndPostprocessResponse(respObj, httpResponse);

View File

@ -93,7 +93,7 @@ public class InsetStatusItemDecoration extends RecyclerView.ItemDecoration{
outRect.left=outRect.right=V.dp(8);
if(!bottomSiblingInset)
outRect.bottom=V.dp(16);
if(!topSiblingInset && displayItems.get(pos-1) instanceof NotificationHeaderStatusDisplayItem)
if(!topSiblingInset && pos > 1 && displayItems.get(pos-1) instanceof NotificationHeaderStatusDisplayItem)
outRect.top=V.dp(-8);
}
}