mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
Updated simple-commons
This commit is contained in:
@@ -12,7 +12,7 @@ if (keystorePropertiesFile.exists()) {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 33
|
||||
compileSdk 33
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.simplemobiletools.dialer"
|
||||
@@ -47,7 +47,7 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "variants"
|
||||
flavorDimensions = ["variants"]
|
||||
productFlavors {
|
||||
core {}
|
||||
fdroid {}
|
||||
|
@@ -75,7 +75,12 @@ class MainActivity : SimpleActivity() {
|
||||
|
||||
handleNotificationPermission { granted ->
|
||||
if (!granted) {
|
||||
PermissionRequiredDialog(this, R.string.allow_notifications_incoming_calls)
|
||||
PermissionRequiredDialog(this,
|
||||
textId = R.string.allow_notifications_incoming_calls,
|
||||
positiveActionCallback = {
|
||||
openNotificationSettings()
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -213,11 +218,11 @@ class MainActivity : SimpleActivity() {
|
||||
RadioItem(it, resources.getQuantityString(R.plurals.column_counts, it, it))
|
||||
}
|
||||
|
||||
val currentColumnCount = config.contactsGridColumnCnt
|
||||
val currentColumnCount = config.contactsGridColumnCount
|
||||
RadioGroupDialog(this, ArrayList(items), currentColumnCount) {
|
||||
val newColumnCount = it as Int
|
||||
if (currentColumnCount != newColumnCount) {
|
||||
config.contactsGridColumnCnt = newColumnCount
|
||||
config.contactsGridColumnCount = newColumnCount
|
||||
favorites_fragment.updateListAdapter()
|
||||
}
|
||||
}
|
||||
@@ -559,6 +564,7 @@ class MainActivity : SimpleActivity() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun showFilterDialog() {
|
||||
FilterContactSourcesDialog(this) {
|
||||
favorites_fragment?.refreshItems {
|
||||
@@ -573,13 +579,14 @@ class MainActivity : SimpleActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
recents_fragment?.refreshItems{
|
||||
recents_fragment?.refreshItems {
|
||||
if (main_menu.isSearchOpen) {
|
||||
getCurrentFragment()?.onSearchQueryChanged(main_menu.getCurrentQuery())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun cacheContacts(contacts: List<Contact>) {
|
||||
try {
|
||||
cachedContacts.clear()
|
||||
|
@@ -126,7 +126,7 @@ class FavoritesFragment(context: Context, attributeSet: AttributeSet) : MyViewPa
|
||||
}
|
||||
|
||||
onSpanCountListener = { newSpanCount ->
|
||||
context.config.contactsGridColumnCnt = newSpanCount
|
||||
context.config.contactsGridColumnCount = newSpanCount
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ class FavoritesFragment(context: Context, attributeSet: AttributeSet) : MyViewPa
|
||||
}
|
||||
|
||||
private fun setViewType(viewType: Int) {
|
||||
val spanCount = context.config.contactsGridColumnCnt
|
||||
val spanCount = context.config.contactsGridColumnCount
|
||||
|
||||
val layoutManager = if (viewType == VIEW_TYPE_GRID) {
|
||||
letter_fastscroller.beGone()
|
||||
|
Reference in New Issue
Block a user