forked from github/szkolny
[Messages/Compose] Fix when adding duplicated recipient.
This commit is contained in:
parent
1553173300
commit
52ef24ae7b
@ -275,8 +275,10 @@ class MessagesComposeFragment : Fragment(), CoroutineScope {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
b.recipients.allChips.forEach {
|
b.recipients.allChips.forEach {
|
||||||
if (it.data == data)
|
if (it.data == data) {
|
||||||
|
Toast.makeText(activity, R.string.messages_compose_recipient_exists, Toast.LENGTH_SHORT).show()
|
||||||
return null
|
return null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
val chipSpan = ChipSpan(context, data.fullName, BitmapDrawable(context.resources, data.image), data)
|
val chipSpan = ChipSpan(context, data.fullName, BitmapDrawable(context.resources, data.image), data)
|
||||||
chipSpan.setIconBackgroundColor(Colors.stringToMaterialColor(data.fullName))
|
chipSpan.setIconBackgroundColor(Colors.stringToMaterialColor(data.fullName))
|
||||||
|
@ -1146,4 +1146,5 @@
|
|||||||
<string name="compose">Napisz</string>
|
<string name="compose">Napisz</string>
|
||||||
<string name="messages_reply">Odpowiedz</string>
|
<string name="messages_reply">Odpowiedz</string>
|
||||||
<string name="error_unknown_format">Kod błędu: %d (w %s)</string>
|
<string name="error_unknown_format">Kod błędu: %d (w %s)</string>
|
||||||
|
<string name="messages_compose_recipient_exists">Ten odbiorca został już wybrany</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user