mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-21 12:39:58 +01:00
Merge pull request #2648 from nextcloud/bugfix/2647/fixNpeProcessAutocompleteUserList
avoid NPE in processAutocompleteUserList
This commit is contained in:
commit
528deb1fb4
@ -130,13 +130,12 @@ class ContactsController(args: Bundle) :
|
|||||||
setHasOptionsMenu(true)
|
setHasOptionsMenu(true)
|
||||||
sharedApplication!!.componentApplication.inject(this)
|
sharedApplication!!.componentApplication.inject(this)
|
||||||
|
|
||||||
|
existingParticipants = ArrayList()
|
||||||
if (args.containsKey(BundleKeys.KEY_NEW_CONVERSATION)) {
|
if (args.containsKey(BundleKeys.KEY_NEW_CONVERSATION)) {
|
||||||
isNewConversationView = true
|
isNewConversationView = true
|
||||||
existingParticipants = ArrayList()
|
|
||||||
} else if (args.containsKey(BundleKeys.KEY_ADD_PARTICIPANTS)) {
|
} else if (args.containsKey(BundleKeys.KEY_ADD_PARTICIPANTS)) {
|
||||||
isAddingParticipantsView = true
|
isAddingParticipantsView = true
|
||||||
conversationToken = args.getString(BundleKeys.KEY_TOKEN)
|
conversationToken = args.getString(BundleKeys.KEY_TOKEN)
|
||||||
existingParticipants = ArrayList()
|
|
||||||
if (args.containsKey(BundleKeys.KEY_EXISTING_PARTICIPANTS)) {
|
if (args.containsKey(BundleKeys.KEY_EXISTING_PARTICIPANTS)) {
|
||||||
existingParticipants = args.getStringArrayList(BundleKeys.KEY_EXISTING_PARTICIPANTS)
|
existingParticipants = args.getStringArrayList(BundleKeys.KEY_EXISTING_PARTICIPANTS)
|
||||||
}
|
}
|
||||||
@ -497,8 +496,9 @@ class ContactsController(args: Bundle) :
|
|||||||
val actorTypeConverter = EnumActorTypeConverter()
|
val actorTypeConverter = EnumActorTypeConverter()
|
||||||
val newUserItemList: MutableList<AbstractFlexibleItem<*>> = ArrayList<AbstractFlexibleItem<*>>()
|
val newUserItemList: MutableList<AbstractFlexibleItem<*>> = ArrayList<AbstractFlexibleItem<*>>()
|
||||||
for (autocompleteUser in autocompleteUsersList) {
|
for (autocompleteUser in autocompleteUsersList) {
|
||||||
if (autocompleteUser.id != currentUser!!.userId &&
|
if (autocompleteUser.id != null &&
|
||||||
!existingParticipants!!.contains(autocompleteUser.id!!)
|
autocompleteUser.id != currentUser!!.userId &&
|
||||||
|
!existingParticipants!!.contains(autocompleteUser.id)
|
||||||
) {
|
) {
|
||||||
participant = createParticipant(autocompleteUser, actorTypeConverter)
|
participant = createParticipant(autocompleteUser, actorTypeConverter)
|
||||||
val headerTitle = getHeaderTitle(participant)
|
val headerTitle = getHeaderTitle(participant)
|
||||||
|
Loading…
Reference in New Issue
Block a user