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:
@ -55,6 +55,6 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:d62d81ca97'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:915bda1e40'
|
||||||
implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61'
|
implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61'
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ class RecentCallsAdapter(
|
|||||||
findItem(R.id.cab_block_number).isVisible = isNougatPlus()
|
findItem(R.id.cab_block_number).isVisible = isNougatPlus()
|
||||||
findItem(R.id.cab_add_number).isVisible = isOneItemSelected
|
findItem(R.id.cab_add_number).isVisible = isOneItemSelected
|
||||||
findItem(R.id.cab_copy_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_block_number -> askConfirmBlock()
|
||||||
R.id.cab_add_number -> addNumberToContact()
|
R.id.cab_add_number -> addNumberToContact()
|
||||||
R.id.cab_send_sms -> sendSMS()
|
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_copy_number -> copyNumber()
|
||||||
R.id.cab_remove -> askConfirmRemove()
|
R.id.cab_remove -> askConfirmRemove()
|
||||||
R.id.cab_select_all -> selectAll()
|
R.id.cab_select_all -> selectAll()
|
||||||
@ -179,7 +179,7 @@ class RecentCallsAdapter(
|
|||||||
activity.launchSendSMSIntent(recipient)
|
activity.launchSendSMSIntent(recipient)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showGroupedCalls() {
|
private fun showCallDetails() {
|
||||||
val recentCall = getSelectedItems().firstOrNull() ?: return
|
val recentCall = getSelectedItems().firstOrNull() ?: return
|
||||||
val callIds = recentCall.neighbourIDs.map { it }.toMutableList() as ArrayList<Int>
|
val callIds = recentCall.neighbourIDs.map { it }.toMutableList() as ArrayList<Int>
|
||||||
callIds.add(recentCall.id)
|
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>
|
val recents = allRecents.filter { callIds.contains(it.id) }.toMutableList() as ArrayList<RecentCall>
|
||||||
activity.runOnUiThread {
|
activity.runOnUiThread {
|
||||||
RecentCallsAdapter(activity as SimpleActivity, recents, select_grouped_calls_list, null) {
|
RecentCallsAdapter(activity as SimpleActivity, recents, select_grouped_calls_list, null) {
|
||||||
|
|
||||||
}.apply {
|
}.apply {
|
||||||
select_grouped_calls_list.adapter = this
|
select_grouped_calls_list.adapter = this
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:padding="@dimen/activity_margin"
|
android:overScrollMode="never"
|
||||||
android:scrollbars="none"
|
android:scrollbars="none"
|
||||||
app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager" />
|
app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager" />
|
||||||
|
|
||||||
|
@ -68,13 +68,14 @@
|
|||||||
android:id="@+id/item_recents_type"
|
android:id="@+id/item_recents_type"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignStart="@+id/item_recents_name"
|
||||||
android:layout_alignTop="@+id/item_recents_date_time"
|
android:layout_alignTop="@+id/item_recents_date_time"
|
||||||
android:layout_alignBottom="@+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:layout_toEndOf="@+id/item_recents_sim_image"
|
||||||
android:alpha="0.6"
|
android:alpha="0.6"
|
||||||
android:paddingTop="@dimen/tiny_margin"
|
android:paddingTop="@dimen/one_dp"
|
||||||
android:paddingBottom="@dimen/tiny_margin"
|
android:paddingBottom="@dimen/one_dp"
|
||||||
|
android:scaleType="fitStart"
|
||||||
android:src="@drawable/ic_incoming_call_vector" />
|
android:src="@drawable/ic_incoming_call_vector" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -32,8 +32,8 @@
|
|||||||
android:title="@string/block_number"
|
android:title="@string/block_number"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/cab_show_grouped_calls"
|
android:id="@+id/cab_show_call_details"
|
||||||
android:title="@string/show_grouped_calls"
|
android:title="@string/show_call_details"
|
||||||
app:showAsAction="never" />
|
app:showAsAction="never" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/cab_copy_number"
|
android:id="@+id/cab_copy_number"
|
||||||
|
Reference in New Issue
Block a user