Merge pull request #332 from KryptKode/feat/group_msgs_as_mms
add setting for sending group message as MMS
This commit is contained in:
commit
0d3c87a67b
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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, true)
|
||||
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()
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -281,6 +281,22 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_send_group_message_mms_holder"
|
||||
style="@style/SettingsHolderCheckboxStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ripple_background">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||
android:id="@+id/settings_send_group_message_mms"
|
||||
style="@style/SettingsCheckboxStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/group_message_mms" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_mms_file_size_limit_holder"
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Reference in New Issue