From f75eb6bc435b5f8ab07b1c4faf32c067d89a5a43 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 5 Apr 2017 18:39:27 +0200 Subject: [PATCH] unread badge: show >999 as infinity symbol --- .../eu/siacs/conversations/ui/widget/UnreadCountCustomView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/widget/UnreadCountCustomView.java b/src/main/java/eu/siacs/conversations/ui/widget/UnreadCountCustomView.java index 36284546..24ece8ef 100644 --- a/src/main/java/eu/siacs/conversations/ui/widget/UnreadCountCustomView.java +++ b/src/main/java/eu/siacs/conversations/ui/widget/UnreadCountCustomView.java @@ -61,7 +61,7 @@ public class UnreadCountCustomView extends View { float textOffset = canvas.getWidth() / 6.0f; textPaint.setTextSize(0.95f * radius); canvas.drawCircle(midx, midy, radius * 0.94f, paint); - canvas.drawText(String.valueOf(unreadCount), midx, midy + textOffset, textPaint); + canvas.drawText(unreadCount > 999 ? "\u221E" : String.valueOf(unreadCount), midx, midy + textOffset, textPaint); }