adding a crashfix
This commit is contained in:
parent
f65a4a9a8c
commit
9a7d56d0e8
2 changed files with 4 additions and 4 deletions
|
|
@ -63,7 +63,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:a85f77a67f'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:d0ea181610'
|
||||||
implementation 'org.greenrobot:eventbus:3.3.1'
|
implementation 'org.greenrobot:eventbus:3.3.1'
|
||||||
implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61'
|
implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61'
|
||||||
implementation 'com.github.tibbi:android-smsmms:33fcaf94d9'
|
implementation 'com.github.tibbi:android-smsmms:33fcaf94d9'
|
||||||
|
|
|
||||||
|
|
@ -59,14 +59,14 @@ class ConversationsAdapter(
|
||||||
override fun prepareActionMode(menu: Menu) {
|
override fun prepareActionMode(menu: Menu) {
|
||||||
val selectedItems = getSelectedItems()
|
val selectedItems = getSelectedItems()
|
||||||
val isSingleSelection = isOneItemSelected()
|
val isSingleSelection = isOneItemSelected()
|
||||||
val selectedConversation = selectedItems.firstOrNull()
|
val selectedConversation = selectedItems.firstOrNull() ?: return
|
||||||
val isGroupConversation = selectedConversation?.isGroupConversation == true
|
val isGroupConversation = selectedConversation.isGroupConversation
|
||||||
|
|
||||||
menu.apply {
|
menu.apply {
|
||||||
findItem(R.id.cab_block_number).title = activity.addLockedLabelIfNeeded(R.string.block_number)
|
findItem(R.id.cab_block_number).title = activity.addLockedLabelIfNeeded(R.string.block_number)
|
||||||
findItem(R.id.cab_block_number).isVisible = isNougatPlus()
|
findItem(R.id.cab_block_number).isVisible = isNougatPlus()
|
||||||
findItem(R.id.cab_add_number_to_contact).isVisible = isSingleSelection && !isGroupConversation
|
findItem(R.id.cab_add_number_to_contact).isVisible = isSingleSelection && !isGroupConversation
|
||||||
findItem(R.id.cab_dial_number).isVisible = isSingleSelection && !isGroupConversation && !isShortCodeWithLetters(selectedConversation!!.phoneNumber)
|
findItem(R.id.cab_dial_number).isVisible = isSingleSelection && !isGroupConversation && !isShortCodeWithLetters(selectedConversation.phoneNumber)
|
||||||
findItem(R.id.cab_copy_number).isVisible = isSingleSelection && !isGroupConversation
|
findItem(R.id.cab_copy_number).isVisible = isSingleSelection && !isGroupConversation
|
||||||
findItem(R.id.cab_rename_conversation).isVisible = isSingleSelection && isGroupConversation
|
findItem(R.id.cab_rename_conversation).isVisible = isSingleSelection && isGroupConversation
|
||||||
findItem(R.id.cab_mark_as_read).isVisible = selectedItems.any { !it.read }
|
findItem(R.id.cab_mark_as_read).isVisible = selectedItems.any { !it.read }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue