some setting UI tweak, lets show textual values below their labels
This commit is contained in:
parent
938ba2b20c
commit
081c979535
4 changed files with 56 additions and 13 deletions
|
|
@ -771,6 +771,14 @@ fun Context.showMessageNotification(address: String, body: String, threadId: Lon
|
|||
notificationManager.notify(threadId.hashCode(), builder.build())
|
||||
}
|
||||
|
||||
fun Context.getLockScreenVisibilityText(type: Int) = getString(
|
||||
when (type) {
|
||||
LOCK_SCREEN_SENDER_MESSAGE -> R.string.sender_and_message
|
||||
LOCK_SCREEN_SENDER -> R.string.sender_only
|
||||
else -> R.string.nothing
|
||||
}
|
||||
)
|
||||
|
||||
fun Context.removeDiacriticsIfNeeded(text: String): String {
|
||||
return if (config.useSimpleCharacters) text.normalizeString() else text
|
||||
}
|
||||
|
|
@ -846,6 +854,18 @@ 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} = ?"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue