fix problem with spark buttons behaving weirdly

This commit is contained in:
Conny Duck 2017-12-01 22:13:47 +01:00
parent bf4d0bb722
commit 7cc1ed9844
4 changed files with 6 additions and 6 deletions

View file

@ -204,7 +204,7 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
public void updateItemWithNotify(int position, NotificationViewData notification,
boolean notifyAdapter) {
notifications.set(position, notification);
if (notifyAdapter) notifyDataSetChanged();
if (notifyAdapter) notifyItemChanged(position);
}
public void addItems(List<NotificationViewData> newNotifications) {

View file

@ -122,7 +122,7 @@ public class TimelineAdapter extends RecyclerView.Adapter {
public void changeItem(int position, StatusViewData newData, boolean notifyAdapter) {
statuses.set(position, newData);
if (notifyAdapter) notifyDataSetChanged();
if (notifyAdapter) notifyItemChanged(position);
}
public void clear() {

View file

@ -288,7 +288,7 @@ public class NotificationsFragment extends SFragment implements
notifications.setPairedItem(position, newViewData);
adapter.updateItemWithNotify(position, newViewData, true);
adapter.updateItemWithNotify(position, newViewData, false);
}
}
@ -325,7 +325,7 @@ public class NotificationsFragment extends SFragment implements
notifications.setPairedItem(position, newViewData);
adapter.updateItemWithNotify(position, newViewData, true);
adapter.updateItemWithNotify(position, newViewData, false);
}
}

View file

@ -312,7 +312,7 @@ public class TimelineFragment extends SFragment implements
.setReblogged(reblog)
.createStatusViewData();
statuses.setPairedItem(actual.second, newViewData);
adapter.changeItem(actual.second, newViewData, true);
adapter.changeItem(actual.second, newViewData, false);
}
}
@ -347,7 +347,7 @@ public class TimelineFragment extends SFragment implements
.setFavourited(favourite)
.createStatusViewData();
statuses.setPairedItem(actual.second, newViewData);
adapter.changeItem(actual.second, newViewData, true);
adapter.changeItem(actual.second, newViewData, false);
}
}