mirror of
https://github.com/accelforce/Yuito
synced 2024-12-22 21:28:08 +01:00
fix boost/fav count resetting after boosting a detailed status
This commit is contained in:
parent
83dc45be35
commit
88ce1a1d79
@ -254,7 +254,6 @@ public final class ViewThreadFragment extends SFragment implements
|
||||
public void onFavourite(final boolean favourite, final int position) {
|
||||
final Status status = statuses.get(position);
|
||||
|
||||
|
||||
timelineCases.favourite(statuses.get(position), favourite)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.as(autoDisposable(from(this)))
|
||||
@ -270,11 +269,13 @@ public final class ViewThreadFragment extends SFragment implements
|
||||
private void updateStatus(int position, Status status) {
|
||||
if(position >= 0 && position < statuses.size()) {
|
||||
|
||||
Status actionableStatus = status.getActionableStatus();
|
||||
|
||||
StatusViewData.Concrete viewData = new StatusViewData.Builder(statuses.getPairedItem(position))
|
||||
.setReblogged(status.getReblogged())
|
||||
.setReblogsCount(status.getReblogsCount())
|
||||
.setFavourited(status.getFavourited())
|
||||
.setFavouritesCount(status.getFavouritesCount())
|
||||
.setReblogged(actionableStatus.getReblogged())
|
||||
.setReblogsCount(actionableStatus.getReblogsCount())
|
||||
.setFavourited(actionableStatus.getFavourited())
|
||||
.setFavouritesCount(actionableStatus.getFavouritesCount())
|
||||
.createStatusViewData();
|
||||
statuses.setPairedItem(position, viewData);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user