Skip to content

Commit

Permalink
fix(mobile): reverse log message numbering
Browse files Browse the repository at this point in the history
Previously, the items in the log page were numbered starting with `#0`
and increasing from top to bottom. Being new to the app, this confused
me because I would have expected that newer messages have a higher
number than older messages.

Initially, I had planned to just start counting from the bottom (i.e. the
oldest message would be `#0`), but I guess the auto-increment ID of the
message would be even better as it isn't reused after clearing the logs.
That is, if a number is needed at all...

Since the numbers are no longer related to the total log count, I
removed the same from the title. Instead, I added the message ID to the
details page title.
  • Loading branch information
rovo89 committed Feb 2, 2024
1 parent 2d278d9 commit a600da2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mobile/lib/shared/views/app_log_detail_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class AppLogDetailPage extends HookConsumerWidget {

return Scaffold(
appBar: AppBar(
title: const Text("Log Detail"),
title: Text("Log Detail #${logMessage.id}"),
),
body: SafeArea(
child: ListView(
Expand Down
6 changes: 3 additions & 3 deletions mobile/lib/shared/views/app_log_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class AppLogPage extends HookConsumerWidget {

return Scaffold(
appBar: AppBar(
title: Text(
"Logs - ${logMessages.value.length}",
title: const Text(
"Logs",
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16.0,
Expand Down Expand Up @@ -139,7 +139,7 @@ class AppLogPage extends HookConsumerWidget {
TextSpan(
children: [
TextSpan(
text: "#$index ",
text: "#${logMessage.id} ",
style: TextStyle(
color: isDarkTheme ? Colors.white70 : Colors.grey[600],
fontSize: 14.0,
Expand Down

0 comments on commit a600da2

Please sign in to comment.