mirror of
https://github.com/tuskyapp/Tusky
synced 2025-01-06 13:57:43 +01:00
fix statuses collapsing when faving/boosting in ViewThreadFragment (#1047)
This commit is contained in:
parent
fcc67c6918
commit
d371074d2a
@ -270,15 +270,15 @@ public final class ViewThreadFragment extends SFragment implements
|
|||||||
private void updateStatus(int position, Status status) {
|
private void updateStatus(int position, Status status) {
|
||||||
if(position >= 0 && position < statuses.size()) {
|
if(position >= 0 && position < statuses.size()) {
|
||||||
|
|
||||||
statuses.set(position, status);
|
StatusViewData.Concrete viewData = new StatusViewData.Builder(statuses.getPairedItem(position))
|
||||||
|
.setReblogged(status.getReblogged())
|
||||||
|
.setReblogsCount(status.getReblogsCount())
|
||||||
|
.setFavourited(status.getFavourited())
|
||||||
|
.setFavouritesCount(status.getFavouritesCount())
|
||||||
|
.createStatusViewData();
|
||||||
|
statuses.setPairedItem(position, viewData);
|
||||||
|
|
||||||
if(position == statusIndex && card != null) {
|
adapter.setItem(position, viewData, true);
|
||||||
StatusViewData.Concrete viewData = new StatusViewData.Builder(statuses.getPairedItem(position))
|
|
||||||
.setCard(card)
|
|
||||||
.createStatusViewData();
|
|
||||||
statuses.setPairedItem(position, viewData);
|
|
||||||
}
|
|
||||||
adapter.setItem(position, statuses.getPairedItem(position), true);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user