Make sure swiped item will be moved back

This commit is contained in:
M66B 2019-07-18 13:08:40 +02:00
parent 3da3d14a92
commit c474d399e8
1 changed files with 3 additions and 3 deletions

View File

@ -1301,13 +1301,13 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
public void onSwiped(@NonNull RecyclerView.ViewHolder viewHolder, int direction) {
final TupleMessageEx message = getMessage(viewHolder);
if (message == null) {
adapter.notifyItemChanged(viewHolder.getAdapterPosition());
adapter.notifyDataSetChanged();
return;
}
TupleAccountSwipes swipes = accountSwipes.get(message.account);
if (swipes == null) {
adapter.notifyItemChanged(viewHolder.getAdapterPosition());
adapter.notifyDataSetChanged();
return;
}
@ -1348,7 +1348,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
}
private void swipeAsk(final @NonNull TupleMessageEx message, @NonNull RecyclerView.ViewHolder viewHolder) {
adapter.notifyItemChanged(viewHolder.getAdapterPosition());
adapter.notifyDataSetChanged();
PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(getContext(), getViewLifecycleOwner(), viewHolder.itemView);
popupMenu.setGravity(Gravity.RIGHT);