mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
fix #147, add a Show call details button at all recent calls, not just grouped
This commit is contained in:
@ -61,7 +61,7 @@ class RecentCallsAdapter(
|
||||
findItem(R.id.cab_block_number).isVisible = isNougatPlus()
|
||||
findItem(R.id.cab_add_number).isVisible = isOneItemSelected
|
||||
findItem(R.id.cab_copy_number).isVisible = isOneItemSelected
|
||||
findItem(R.id.cab_show_grouped_calls).isVisible = isOneItemSelected && selectedItems.first().neighbourIDs.isNotEmpty()
|
||||
findItem(R.id.cab_show_call_details).isVisible = isOneItemSelected
|
||||
}
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ class RecentCallsAdapter(
|
||||
R.id.cab_block_number -> askConfirmBlock()
|
||||
R.id.cab_add_number -> addNumberToContact()
|
||||
R.id.cab_send_sms -> sendSMS()
|
||||
R.id.cab_show_grouped_calls -> showGroupedCalls()
|
||||
R.id.cab_show_call_details -> showCallDetails()
|
||||
R.id.cab_copy_number -> copyNumber()
|
||||
R.id.cab_remove -> askConfirmRemove()
|
||||
R.id.cab_select_all -> selectAll()
|
||||
@ -179,7 +179,7 @@ class RecentCallsAdapter(
|
||||
activity.launchSendSMSIntent(recipient)
|
||||
}
|
||||
|
||||
private fun showGroupedCalls() {
|
||||
private fun showCallDetails() {
|
||||
val recentCall = getSelectedItems().firstOrNull() ?: return
|
||||
val callIds = recentCall.neighbourIDs.map { it }.toMutableList() as ArrayList<Int>
|
||||
callIds.add(recentCall.id)
|
||||
|
@ -21,7 +21,6 @@ class ShowGroupedCallsDialog(val activity: BaseSimpleActivity, callIds: ArrayLis
|
||||
val recents = allRecents.filter { callIds.contains(it.id) }.toMutableList() as ArrayList<RecentCall>
|
||||
activity.runOnUiThread {
|
||||
RecentCallsAdapter(activity as SimpleActivity, recents, select_grouped_calls_list, null) {
|
||||
|
||||
}.apply {
|
||||
select_grouped_calls_list.adapter = this
|
||||
}
|
||||
|
Reference in New Issue
Block a user