- In Android 10+ use picker to choose TLS Certificate and TLS CA Files
- Ask confirmation to reset settings to factory defaults - Replaced downloadsPath companion variable with Utils function call - Fixed several Kotlin lint warnings
This commit is contained in:
@@ -65,12 +65,10 @@ class Account(val accp: String) {
|
||||
|
||||
fun print() : String {
|
||||
|
||||
var res: String
|
||||
|
||||
if (displayName != "")
|
||||
res = "\"${displayName}\" "
|
||||
var res = if (displayName != "")
|
||||
"\"${displayName}\" "
|
||||
else
|
||||
res = ""
|
||||
""
|
||||
|
||||
res = "$res<$luri>"
|
||||
|
||||
@@ -112,10 +110,10 @@ class Account(val accp: String) {
|
||||
|
||||
if (preferIPv6Media) res += ";mediaaf=ipv6"
|
||||
|
||||
if (vmUri == "")
|
||||
res = "$res;mwi=no"
|
||||
res = if (vmUri == "")
|
||||
"$res;mwi=no"
|
||||
else
|
||||
res = "$res;mwi=yes;vm_uri=\"$vmUri\""
|
||||
"$res;mwi=yes;vm_uri=\"$vmUri\""
|
||||
|
||||
if (answerMode == Api.ANSWERMODE_AUTO)
|
||||
res += ";answermode=auto"
|
||||
@@ -134,29 +132,35 @@ class Account(val accp: String) {
|
||||
}
|
||||
|
||||
fun vmMessages(cxt: Context) : String {
|
||||
var new = ""
|
||||
var old = ""
|
||||
if (vmNew > 0)
|
||||
|
||||
val new = if (vmNew > 0) {
|
||||
if (vmNew == 1)
|
||||
new = cxt.getString(R.string.one_new_message)
|
||||
cxt.getString(R.string.one_new_message)
|
||||
else
|
||||
new = "$vmNew ${cxt.getString(R.string.new_messages)}"
|
||||
if (vmOld > 0)
|
||||
"$vmNew ${cxt.getString(R.string.new_messages)}"
|
||||
} else
|
||||
""
|
||||
|
||||
val old = if (vmOld > 0) {
|
||||
if (vmOld == 1)
|
||||
old = cxt.getString(R.string.one_old_message)
|
||||
cxt.getString(R.string.one_old_message)
|
||||
else
|
||||
old = "$vmOld ${cxt.getString(R.string.old_messages)}"
|
||||
"$vmOld ${cxt.getString(R.string.old_messages)}"
|
||||
} else
|
||||
""
|
||||
|
||||
var msg = cxt.getString(R.string.you_have)
|
||||
if (new != "") {
|
||||
msg = "$msg $new"
|
||||
if (old != "") msg = "$msg ${cxt.getString(R.string.and)} $old"
|
||||
} else {
|
||||
if (old != "")
|
||||
msg = "$msg $old"
|
||||
msg = if (old != "")
|
||||
"$msg $old"
|
||||
else
|
||||
msg = cxt.getString(R.string.no_messages)
|
||||
cxt.getString(R.string.no_messages)
|
||||
}
|
||||
return "$msg."
|
||||
|
||||
return "$msg."
|
||||
}
|
||||
|
||||
fun host() : String {
|
||||
@@ -166,7 +170,7 @@ class Account(val accp: String) {
|
||||
private fun removeAudioCodecsStartingWith(prefix: String) {
|
||||
val newCodecs = ArrayList<String>()
|
||||
for (acSpec in audioCodec)
|
||||
if (!acSpec.toLowerCase(Locale.ROOT).startsWith(prefix)) newCodecs.add(acSpec)
|
||||
if (!acSpec.lowercase(Locale.ROOT).startsWith(prefix)) newCodecs.add(acSpec)
|
||||
audioCodec = newCodecs
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user