Improved display of call history time
This commit is contained in:
@ -407,7 +407,6 @@ private fun Calls(
|
||||
)
|
||||
}
|
||||
}
|
||||
Box(modifier = Modifier.width(56.dp)) {
|
||||
Text(
|
||||
text = Utils.relativeTime(ctx, callRow.stopTime),
|
||||
fontSize = 12.sp,
|
||||
@ -420,7 +419,6 @@ private fun Calls(
|
||||
LocalCustomColors.current.itemText,
|
||||
modifier = Modifier
|
||||
.padding(end = 16.dp)
|
||||
.width(64.dp)
|
||||
.clickable(onClick = {
|
||||
viewModel.selectCallRow(callRow)
|
||||
navController.navigate("call_details")
|
||||
@ -430,7 +428,6 @@ private fun Calls(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadCallHistory(aor: String): MutableList<CallRow> {
|
||||
val res = mutableListOf<CallRow>()
|
||||
|
||||
@ -61,6 +61,7 @@ import javax.crypto.SecretKeyFactory
|
||||
import javax.crypto.spec.IvParameterSpec
|
||||
import javax.crypto.spec.PBEKeySpec
|
||||
import javax.crypto.spec.SecretKeySpec
|
||||
import kotlin.text.replaceFirstChar
|
||||
|
||||
object Utils {
|
||||
|
||||
@ -804,7 +805,8 @@ object Utils {
|
||||
val fmt = DateFormat.getTimeInstance(DateFormat.SHORT)
|
||||
ctx.getString(R.string.today) + "\n" + fmt.format(time.time)
|
||||
} else {
|
||||
val month = time.getDisplayName(Calendar.MONTH, Calendar.SHORT, Locale.getDefault())
|
||||
val month = time.getDisplayName(Calendar.MONTH, Calendar.SHORT, Locale.getDefault())!!
|
||||
.replaceFirstChar { if (it.isLowerCase()) it.titlecase() else it.toString() }
|
||||
val day = time.get(Calendar.DAY_OF_MONTH)
|
||||
val currentYear = Calendar.getInstance().get(Calendar.YEAR)
|
||||
if (time.get(Calendar.YEAR) == currentYear) {
|
||||
|
||||
Reference in New Issue
Block a user