do not allow creating contacts under Signal or Telegram accounts

This commit is contained in:
tibbi 2018-09-28 14:42:15 +02:00
parent 241f57658d
commit c17e7ff47e
1 changed files with 6 additions and 1 deletions

View File

@ -62,8 +62,13 @@ fun SimpleActivity.startCall(contact: Contact) {
fun SimpleActivity.showContactSourcePicker(currentSource: String, callback: (newSource: String) -> Unit) {
ContactsHelper(this).getContactSources {
val ignoredTypes = arrayListOf(
"org.thoughtcrime.securesms", // Signal
"org.telegram.messenger" // Telegram
)
val items = ArrayList<RadioItem>()
val sources = it.map { it.name }
val sources = it.filter { !ignoredTypes.contains(it.type) }.map { it.name }
var currentSourceIndex = -1
sources.forEachIndexed { index, account ->
var publicAccount = account