mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
properly show the public contact source on all visible places
This commit is contained in:
@ -54,7 +54,12 @@ fun SimpleActivity.showContactSourcePicker(currentSource: String, callback: (new
|
||||
val sources = it.map { it.name }
|
||||
var currentSourceIndex = -1
|
||||
sources.forEachIndexed { index, account ->
|
||||
items.add(RadioItem(index, account))
|
||||
var publicAccount = account
|
||||
if (account == config.localAccountName) {
|
||||
publicAccount = getString(com.simplemobiletools.contacts.R.string.phone_storage)
|
||||
}
|
||||
|
||||
items.add(RadioItem(index, publicAccount))
|
||||
if (account == currentSource) {
|
||||
currentSourceIndex = index
|
||||
}
|
||||
@ -68,6 +73,8 @@ fun SimpleActivity.showContactSourcePicker(currentSource: String, callback: (new
|
||||
}
|
||||
}
|
||||
|
||||
fun SimpleActivity.getPublicContactSource(source: String) = if (source == config.localAccountName) getString(com.simplemobiletools.contacts.R.string.phone_storage) else source
|
||||
|
||||
fun BaseSimpleActivity.shareContacts(contacts: ArrayList<Contact>) {
|
||||
val file = getTempFile()
|
||||
if (file == null) {
|
||||
|
Reference in New Issue
Block a user