mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Prevent double tap send on camera first flow.
Defensive array list copies where used in builders and Intent#putParcelableArrayListExtra. Spelling.
This commit is contained in:
@@ -217,7 +217,7 @@ final class ManageGroupRepository {
|
||||
return selectionLimits.getHardLimit() - members.size();
|
||||
}
|
||||
|
||||
public @NonNull ArrayList<RecipientId> getMembersWithoutSelf() {
|
||||
public @NonNull List<RecipientId> getMembersWithoutSelf() {
|
||||
ArrayList<RecipientId> recipientIds = new ArrayList<>(members.size());
|
||||
RecipientId selfId = Recipient.self().getId();
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ import org.thoughtcrime.securesms.util.Util;
|
||||
import org.thoughtcrime.securesms.util.livedata.LiveDataUtil;
|
||||
import org.thoughtcrime.securesms.util.views.SimpleProgressDialog;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ManageGroupViewModel extends ViewModel {
|
||||
@@ -332,7 +333,7 @@ public class ManageGroupViewModel extends ViewModel {
|
||||
intent.putExtra(AddMembersActivity.GROUP_ID, getGroupId().toString());
|
||||
intent.putExtra(ContactSelectionListFragment.DISPLAY_MODE, ContactsCursorLoader.DisplayMode.FLAG_PUSH);
|
||||
intent.putExtra(ContactSelectionListFragment.SELECTION_LIMITS, new SelectionLimits(capacity.getSelectionWarning(), capacity.getSelectionLimit()));
|
||||
intent.putParcelableArrayListExtra(ContactSelectionListFragment.CURRENT_SELECTION, capacity.getMembersWithoutSelf());
|
||||
intent.putParcelableArrayListExtra(ContactSelectionListFragment.CURRENT_SELECTION, new ArrayList<>(capacity.getMembersWithoutSelf()));
|
||||
fragment.startActivityForResult(intent, resultCode);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user