mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-01 08:26:48 +01:00
do not allow creating contacts under Signal or Telegram accounts
This commit is contained in:
parent
241f57658d
commit
c17e7ff47e
@ -62,8 +62,13 @@ fun SimpleActivity.startCall(contact: Contact) {
|
|||||||
|
|
||||||
fun SimpleActivity.showContactSourcePicker(currentSource: String, callback: (newSource: String) -> Unit) {
|
fun SimpleActivity.showContactSourcePicker(currentSource: String, callback: (newSource: String) -> Unit) {
|
||||||
ContactsHelper(this).getContactSources {
|
ContactsHelper(this).getContactSources {
|
||||||
|
val ignoredTypes = arrayListOf(
|
||||||
|
"org.thoughtcrime.securesms", // Signal
|
||||||
|
"org.telegram.messenger" // Telegram
|
||||||
|
)
|
||||||
|
|
||||||
val items = ArrayList<RadioItem>()
|
val items = ArrayList<RadioItem>()
|
||||||
val sources = it.map { it.name }
|
val sources = it.filter { !ignoredTypes.contains(it.type) }.map { it.name }
|
||||||
var currentSourceIndex = -1
|
var currentSourceIndex = -1
|
||||||
sources.forEachIndexed { index, account ->
|
sources.forEachIndexed { index, account ->
|
||||||
var publicAccount = account
|
var publicAccount = account
|
||||||
|
Loading…
x
Reference in New Issue
Block a user