mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-01-07 00:20:08 +02:00
Fix issue #471 - Fix counter issue for fab/boost with remote instances
This commit is contained in:
parent
4b106ffba4
commit
c72b888078
1 changed files with 19 additions and 2 deletions
|
@ -281,9 +281,26 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
statusToDeal.favourited = statusReturned.favourited;
|
statusToDeal.favourited = statusReturned.favourited;
|
||||||
statusToDeal.reblogged = statusReturned.reblogged;
|
statusToDeal.reblogged = statusReturned.reblogged;
|
||||||
statusToDeal.bookmarked = statusReturned.bookmarked;
|
statusToDeal.bookmarked = statusReturned.bookmarked;
|
||||||
|
|
||||||
|
if (!remote) {
|
||||||
statusToDeal.reblogs_count = statusReturned.reblogs_count;
|
statusToDeal.reblogs_count = statusReturned.reblogs_count;
|
||||||
statusToDeal.favourites_count = statusReturned.favourites_count;
|
statusToDeal.favourites_count = statusReturned.favourites_count;
|
||||||
|
} else {
|
||||||
|
switch (typeOfAction) {
|
||||||
|
case REBLOG_ACTION:
|
||||||
|
statusToDeal.reblogs_count++;
|
||||||
|
break;
|
||||||
|
case FAVOURITE_ACTION:
|
||||||
|
statusToDeal.favourites_count++;
|
||||||
|
break;
|
||||||
|
case UNREBLOG_ACTION:
|
||||||
|
statusToDeal.reblogs_count--;
|
||||||
|
break;
|
||||||
|
case UNFAVOURITE_ACTION:
|
||||||
|
statusToDeal.favourites_count--;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//Update status in cache if not a remote instance
|
//Update status in cache if not a remote instance
|
||||||
if (!remote) {
|
if (!remote) {
|
||||||
|
|
Loading…
Reference in a new issue