fix problem with spark buttons behaving weirdly

main
Conny Duck 7 years ago
parent be7762988f
commit e8fe52561a
  1. 2
      app/src/main/java/com/keylesspalace/tusky/adapter/NotificationsAdapter.java
  2. 2
      app/src/main/java/com/keylesspalace/tusky/adapter/TimelineAdapter.java
  3. 4
      app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.java
  4. 4
      app/src/main/java/com/keylesspalace/tusky/fragment/TimelineFragment.java

@ -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) {

@ -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() {

@ -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);
}
}

@ -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);
}
}

Loading…
Cancel
Save