fix problem with spark buttons behaving weirdly
This commit is contained in:
parent
bf4d0bb722
commit
7cc1ed9844
4 changed files with 6 additions and 6 deletions
|
@ -204,7 +204,7 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
|
||||||
public void updateItemWithNotify(int position, NotificationViewData notification,
|
public void updateItemWithNotify(int position, NotificationViewData notification,
|
||||||
boolean notifyAdapter) {
|
boolean notifyAdapter) {
|
||||||
notifications.set(position, notification);
|
notifications.set(position, notification);
|
||||||
if (notifyAdapter) notifyDataSetChanged();
|
if (notifyAdapter) notifyItemChanged(position);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addItems(List<NotificationViewData> newNotifications) {
|
public void addItems(List<NotificationViewData> newNotifications) {
|
||||||
|
|
|
@ -122,7 +122,7 @@ public class TimelineAdapter extends RecyclerView.Adapter {
|
||||||
|
|
||||||
public void changeItem(int position, StatusViewData newData, boolean notifyAdapter) {
|
public void changeItem(int position, StatusViewData newData, boolean notifyAdapter) {
|
||||||
statuses.set(position, newData);
|
statuses.set(position, newData);
|
||||||
if (notifyAdapter) notifyDataSetChanged();
|
if (notifyAdapter) notifyItemChanged(position);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clear() {
|
public void clear() {
|
||||||
|
|
|
@ -288,7 +288,7 @@ public class NotificationsFragment extends SFragment implements
|
||||||
|
|
||||||
notifications.setPairedItem(position, newViewData);
|
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);
|
notifications.setPairedItem(position, newViewData);
|
||||||
|
|
||||||
adapter.updateItemWithNotify(position, newViewData, true);
|
adapter.updateItemWithNotify(position, newViewData, false);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -312,7 +312,7 @@ public class TimelineFragment extends SFragment implements
|
||||||
.setReblogged(reblog)
|
.setReblogged(reblog)
|
||||||
.createStatusViewData();
|
.createStatusViewData();
|
||||||
statuses.setPairedItem(actual.second, newViewData);
|
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)
|
.setFavourited(favourite)
|
||||||
.createStatusViewData();
|
.createStatusViewData();
|
||||||
statuses.setPairedItem(actual.second, newViewData);
|
statuses.setPairedItem(actual.second, newViewData);
|
||||||
adapter.changeItem(actual.second, newViewData, true);
|
adapter.changeItem(actual.second, newViewData, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue