MessageIndicator: shorten thousands and millions

This commit is contained in:
miruka 2020-05-19 19:48:52 -04:00
parent 4a3320111f
commit c9d5949847

View File

@ -4,7 +4,11 @@ import QtQuick 2.12
import "../Base"
HLabel {
text: unreads
text:
unreads >= 1000000 ? Math.floor(unreads / 1000000) + "M" :
unreads >= 1000 ? Math.floor(unreads / 1000) + "K" :
unreads
font.pixelSize: theme.fontSize.small
verticalAlignment: Qt.AlignVCenter
leftPadding: theme.spacing / 4