mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-02-14 18:40:46 +01:00
fix #147, add a Show call details button at all recent calls, not just grouped
This commit is contained in:
parent
f3e23f5b89
commit
f57888ab13
@ -55,6 +55,6 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:d62d81ca97'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:915bda1e40'
|
||||
implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61'
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
android:padding="@dimen/activity_margin"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none"
|
||||
app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager" />
|
||||
|
||||
|
@ -68,13 +68,14 @@
|
||||
android:id="@+id/item_recents_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignStart="@+id/item_recents_name"
|
||||
android:layout_alignTop="@+id/item_recents_date_time"
|
||||
android:layout_alignBottom="@+id/item_recents_date_time"
|
||||
android:layout_marginEnd="@dimen/tiny_margin"
|
||||
android:layout_toEndOf="@+id/item_recents_sim_image"
|
||||
android:alpha="0.6"
|
||||
android:paddingTop="@dimen/tiny_margin"
|
||||
android:paddingBottom="@dimen/tiny_margin"
|
||||
android:paddingTop="@dimen/one_dp"
|
||||
android:paddingBottom="@dimen/one_dp"
|
||||
android:scaleType="fitStart"
|
||||
android:src="@drawable/ic_incoming_call_vector" />
|
||||
|
||||
<TextView
|
||||
|
@ -32,8 +32,8 @@
|
||||
android:title="@string/block_number"
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
android:id="@+id/cab_show_grouped_calls"
|
||||
android:title="@string/show_grouped_calls"
|
||||
android:id="@+id/cab_show_call_details"
|
||||
android:title="@string/show_call_details"
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/cab_copy_number"
|
||||
|
Loading…
x
Reference in New Issue
Block a user