Messaging: Finish after no more contacts are blocked
The view doesn't have a "no items available" element and it doesn't make sense to have one since the menu item is only visible once a contact is blocked - so after removing the last blocked contact, simply return back to the conversation list Change-Id: I3372e26361f6919502cac6fd27ae849d559a4c05
This commit is contained in:
@@ -75,6 +75,7 @@ public class BlockedParticipantsFragment extends Fragment
|
|||||||
* An adapter to display ParticipantListItemView based on ParticipantData.
|
* An adapter to display ParticipantListItemView based on ParticipantData.
|
||||||
*/
|
*/
|
||||||
private class BlockedParticipantListAdapter extends CursorAdapter {
|
private class BlockedParticipantListAdapter extends CursorAdapter {
|
||||||
|
|
||||||
public BlockedParticipantListAdapter(final Context context, final Cursor cursor) {
|
public BlockedParticipantListAdapter(final Context context, final Cursor cursor) {
|
||||||
super(context, cursor, 0);
|
super(context, cursor, 0);
|
||||||
}
|
}
|
||||||
@@ -96,5 +97,8 @@ public class BlockedParticipantsFragment extends Fragment
|
|||||||
@Override
|
@Override
|
||||||
public void onBlockedParticipantsCursorUpdated(Cursor cursor) {
|
public void onBlockedParticipantsCursorUpdated(Cursor cursor) {
|
||||||
mAdapter.swapCursor(cursor);
|
mAdapter.swapCursor(cursor);
|
||||||
|
if (mAdapter.getCount() == 0) {
|
||||||
|
requireActivity().finish();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user