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 {
|
android {
|
||||||
compileSdkVersion 33
|
compileSdk 33
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.simplemobiletools.dialer"
|
applicationId "com.simplemobiletools.dialer"
|
||||||
@@ -47,7 +47,7 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
flavorDimensions "variants"
|
flavorDimensions = ["variants"]
|
||||||
productFlavors {
|
productFlavors {
|
||||||
core {}
|
core {}
|
||||||
fdroid {}
|
fdroid {}
|
||||||
|
@@ -75,7 +75,12 @@ class MainActivity : SimpleActivity() {
|
|||||||
|
|
||||||
handleNotificationPermission { granted ->
|
handleNotificationPermission { granted ->
|
||||||
if (!granted) {
|
if (!granted) {
|
||||||
PermissionRequiredDialog(this, R.string.allow_notifications_incoming_calls)
|
PermissionRequiredDialog(this,
|
||||||
|
textId = R.string.allow_notifications_incoming_calls,
|
||||||
|
positiveActionCallback = {
|
||||||
|
openNotificationSettings()
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -213,11 +218,11 @@ class MainActivity : SimpleActivity() {
|
|||||||
RadioItem(it, resources.getQuantityString(R.plurals.column_counts, it, it))
|
RadioItem(it, resources.getQuantityString(R.plurals.column_counts, it, it))
|
||||||
}
|
}
|
||||||
|
|
||||||
val currentColumnCount = config.contactsGridColumnCnt
|
val currentColumnCount = config.contactsGridColumnCount
|
||||||
RadioGroupDialog(this, ArrayList(items), currentColumnCount) {
|
RadioGroupDialog(this, ArrayList(items), currentColumnCount) {
|
||||||
val newColumnCount = it as Int
|
val newColumnCount = it as Int
|
||||||
if (currentColumnCount != newColumnCount) {
|
if (currentColumnCount != newColumnCount) {
|
||||||
config.contactsGridColumnCnt = newColumnCount
|
config.contactsGridColumnCount = newColumnCount
|
||||||
favorites_fragment.updateListAdapter()
|
favorites_fragment.updateListAdapter()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -559,6 +564,7 @@ class MainActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showFilterDialog() {
|
private fun showFilterDialog() {
|
||||||
FilterContactSourcesDialog(this) {
|
FilterContactSourcesDialog(this) {
|
||||||
favorites_fragment?.refreshItems {
|
favorites_fragment?.refreshItems {
|
||||||
@@ -580,6 +586,7 @@ class MainActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun cacheContacts(contacts: List<Contact>) {
|
fun cacheContacts(contacts: List<Contact>) {
|
||||||
try {
|
try {
|
||||||
cachedContacts.clear()
|
cachedContacts.clear()
|
||||||
|
@@ -126,7 +126,7 @@ class FavoritesFragment(context: Context, attributeSet: AttributeSet) : MyViewPa
|
|||||||
}
|
}
|
||||||
|
|
||||||
onSpanCountListener = { newSpanCount ->
|
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) {
|
private fun setViewType(viewType: Int) {
|
||||||
val spanCount = context.config.contactsGridColumnCnt
|
val spanCount = context.config.contactsGridColumnCount
|
||||||
|
|
||||||
val layoutManager = if (viewType == VIEW_TYPE_GRID) {
|
val layoutManager = if (viewType == VIEW_TYPE_GRID) {
|
||||||
letter_fastscroller.beGone()
|
letter_fastscroller.beGone()
|
||||||
|
Reference in New Issue
Block a user