mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 12:38:33 +00:00
Fix NPE when operating on multiple conversations in batch mode.
This commit is contained in:
@@ -20,6 +20,7 @@ import org.thoughtcrime.securesms.mms.GlideRequests;
|
|||||||
import org.thoughtcrime.securesms.util.CachedInflater;
|
import org.thoughtcrime.securesms.util.CachedInflater;
|
||||||
import org.thoughtcrime.securesms.util.ViewUtil;
|
import org.thoughtcrime.securesms.util.ViewUtil;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@@ -210,7 +211,7 @@ class ConversationListAdapter extends ListAdapter<Conversation, RecyclerView.Vie
|
|||||||
}
|
}
|
||||||
|
|
||||||
Collection<Conversation> getBatchSelection() {
|
Collection<Conversation> getBatchSelection() {
|
||||||
return batchSet.values();
|
return new ArrayList<>(batchSet.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -233,7 +234,7 @@ class ConversationListAdapter extends ListAdapter<Conversation, RecyclerView.Vie
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NonNull Set<Long> getBatchSelectionIds() {
|
@NonNull Set<Long> getBatchSelectionIds() {
|
||||||
return batchSet.keySet();
|
return new HashSet<>(batchSet.keySet());
|
||||||
}
|
}
|
||||||
|
|
||||||
void selectAllThreads() {
|
void selectAllThreads() {
|
||||||
|
|||||||
Reference in New Issue
Block a user