removing the file size limit label from the app settings

This commit is contained in:
tibbi 2021-11-15 14:47:14 +01:00
parent 3f83c69324
commit 938ba2b20c
5 changed files with 2 additions and 26 deletions

View File

@ -56,7 +56,7 @@ android {
}
dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:a8c7dfd635'
implementation 'com.github.SimpleMobileTools:Simple-Commons:c615eda325'
implementation 'org.greenrobot:eventbus:3.2.0'
implementation 'com.klinkerapps:android-smsmms:5.2.6'
implementation 'com.github.tibbi:IndicatorFastScroll:c3de1d040a'

View File

@ -13,7 +13,6 @@ import com.simplemobiletools.commons.helpers.*
import com.simplemobiletools.commons.models.RadioItem
import com.simplemobiletools.smsmessenger.R
import com.simplemobiletools.smsmessenger.extensions.config
import com.simplemobiletools.smsmessenger.extensions.getMMSFileLimitText
import com.simplemobiletools.smsmessenger.helpers.*
import kotlinx.android.synthetic.main.activity_settings.*
import java.util.*
@ -191,7 +190,6 @@ class SettingsActivity : SimpleActivity() {
}
private fun setupMMSFileSizeLimit() {
settings_mms_file_size_limit.text = getMMSFileLimitText(config.mmsFileSizeLimit)
settings_mms_file_size_limit_holder.setOnClickListener {
val items = arrayListOf(
RadioItem(1, getString(R.string.mms_file_size_limit_100kb), FILE_SIZE_100_KB),
@ -206,7 +204,6 @@ class SettingsActivity : SimpleActivity() {
val checkedItemId = items.find { it.value == config.mmsFileSizeLimit }?.id ?: 7
RadioGroupDialog(this@SettingsActivity, items, checkedItemId) {
config.mmsFileSizeLimit = it as Long
settings_mms_file_size_limit.text = getMMSFileLimitText(config.mmsFileSizeLimit)
}
}
}

View File

@ -846,18 +846,6 @@ fun Context.deleteSmsDraft(threadId: Long) {
}
}
fun Context.getMMSFileLimitText(size: Long) = getString(
when (size) {
FILE_SIZE_100_KB -> R.string.mms_file_size_limit_100kb
FILE_SIZE_200_KB -> R.string.mms_file_size_limit_200kb
FILE_SIZE_300_KB -> R.string.mms_file_size_limit_300kb
FILE_SIZE_600_KB -> R.string.mms_file_size_limit_600kb
FILE_SIZE_1_MB -> R.string.mms_file_size_limit_1mb
FILE_SIZE_2_MB -> R.string.mms_file_size_limit_2mb
else -> R.string.mms_file_size_limit_none
}
)
fun Context.updateLastConversationMessage(threadId: Long) {
val uri = Threads.CONTENT_URI
val selection = "${Threads._ID} = ?"

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/settings_scrollview"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -271,14 +270,6 @@
android:layout_height="wrap_content"
android:text="@string/mms_file_size_limit" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_mms_file_size_limit"
style="@style/SettingsRightTextualValueStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toEndOf="@+id/settings_mms_file_size_limit_label"
tools:text="@string/mms_file_size_limit_none" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>

View File

@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.5.30'
ext.kotlin_version = '1.5.31'
repositories {
google()
jcenter()