diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/SettingsActivity.kt index dfc2dab7..fe85f50b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/SettingsActivity.kt @@ -39,6 +39,7 @@ class SettingsActivity : SimpleActivity() { setupUseSimpleCharacters() setupEnableDeliveryReports() setupSendLongMessageAsMMS() + setupGroupMessageAsMMS() setupLockScreenVisibility() setupMMSFileSizeLimit() updateTextColors(settings_scrollview) @@ -184,6 +185,14 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupGroupMessageAsMMS() { + settings_send_group_message_mms.isChecked = config.sendGroupMessageMMS + settings_send_group_message_mms_holder.setOnClickListener { + settings_send_group_message_mms.toggle() + config.sendGroupMessageMMS = settings_send_group_message_mms.isChecked + } + } + private fun setupLockScreenVisibility() { settings_lock_screen_visibility.text = getLockScreenVisibilityText() settings_lock_screen_visibility_holder.setOnClickListener { diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt index e29cb15b..4f120ab5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt @@ -969,5 +969,6 @@ fun Context.getSendMessageSettings(): Settings { settings.deliveryReports = config.enableDeliveryReports settings.sendLongAsMms = config.sendLongMessageMMS settings.sendLongAsMmsAfter = 1 + settings.group = config.sendGroupMessageMMS return settings } diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Config.kt index 79d4c398..4f7ff450 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Config.kt @@ -32,6 +32,10 @@ class Config(context: Context) : BaseConfig(context) { get() = prefs.getBoolean(SEND_LONG_MESSAGE_MMS, false) set(sendLongMessageMMS) = prefs.edit().putBoolean(SEND_LONG_MESSAGE_MMS, sendLongMessageMMS).apply() + var sendGroupMessageMMS: Boolean + get() = prefs.getBoolean(SEND_GROUP_MESSAGE_MMS, false) + set(sendGroupMessageMMS) = prefs.edit().putBoolean(SEND_GROUP_MESSAGE_MMS, sendGroupMessageMMS).apply() + var lockScreenVisibilitySetting: Int get() = prefs.getInt(LOCK_SCREEN_VISIBILITY, LOCK_SCREEN_SENDER_MESSAGE) set(lockScreenVisibilitySetting) = prefs.edit().putInt(LOCK_SCREEN_VISIBILITY, lockScreenVisibilitySetting).apply() diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt index 8359b33b..6e46f4c9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/Constants.kt @@ -17,6 +17,7 @@ const val USE_SIMPLE_CHARACTERS = "use_simple_characters" const val LOCK_SCREEN_VISIBILITY = "lock_screen_visibility" const val ENABLE_DELIVERY_REPORTS = "enable_delivery_reports" const val SEND_LONG_MESSAGE_MMS = "send_long_message_mms" +const val SEND_GROUP_MESSAGE_MMS = "send_group_message_mms" const val MMS_FILE_SIZE_LIMIT = "mms_file_size_limit" const val PINNED_CONVERSATIONS = "pinned_conversations" const val LAST_EXPORT_PATH = "last_export_path" diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 9e26cbd7..b7147f6b 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -281,6 +281,22 @@ + + + + + +