Added full date-time tooltip
This commit is contained in:
parent
e23181d530
commit
ed55ba2814
@ -31,5 +31,13 @@ fun Date.toSystemString(): String {
|
||||
val locale = Locale(systemLocale)
|
||||
val sdf = DateFormat.getDateInstance(DateFormat.MEDIUM, locale)
|
||||
|
||||
return sdf.format(this)
|
||||
}
|
||||
|
||||
fun Date.toSystemDateTimeString(): String {
|
||||
val systemLocale = System.getProperty("user.language")
|
||||
val locale = Locale(systemLocale)
|
||||
val sdf = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT, locale)
|
||||
|
||||
return sdf.format(this)
|
||||
}
|
@ -145,12 +145,13 @@ fun Author(commit: RevCommit) {
|
||||
authorIdent.`when`.toSmartSystemString()
|
||||
}
|
||||
|
||||
Text(
|
||||
TooltipText(
|
||||
text = date,
|
||||
color = MaterialTheme.colors.secondaryTextColor,
|
||||
maxLines = 1,
|
||||
modifier = Modifier.padding(horizontal = 16.dp),
|
||||
fontSize = 12.sp,
|
||||
tooltipTitle = authorIdent.`when`.toSystemDateTimeString()
|
||||
)
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user