From 51ea5be3071f1ad6ad865ab251b0d74a25f1c2b8 Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Mon, 24 Sep 2018 09:10:31 +0100 Subject: [PATCH] Cap "x events" label at the min bound and add a + to the end Will show "5000+" once it hits 5001 and then stay that way (while the number od actual events in the table will fluctuate between 5000 and 5500 as we batch-truncate the list). --- lib/logging/logging.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/logging/logging.dart b/lib/logging/logging.dart index c418150f624..bf3e6350a65 100644 --- a/lib/logging/logging.dart +++ b/lib/logging/logging.dart @@ -81,7 +81,10 @@ class LoggingScreen extends Screen { void _updateStatus() { final int count = loggingTable.rows.length; - logCountStatus.element.text = '${nf.format(count)} events'; + final String label = count >= kMaxLogItemsLowerBound + ? '${nf.format(kMaxLogItemsLowerBound)}+' + : nf.format(count); + logCountStatus.element.text = '$label events'; } @override