Skip to content

Commit

Permalink
fix(mobile): remove log message counter (immich-app#6865)
Browse files Browse the repository at this point in the history
* fix(mobile): remove log message counter

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.

Removing the counter completely because it doesn't add any value -
log messages are identified by their timestamp, text and other details.

* Switch timestamp and context in log overview
  • Loading branch information
rovo89 authored Feb 24, 2024
1 parent bc39790 commit 5775829
Showing 1 changed file with 9 additions and 23 deletions.
32 changes: 9 additions & 23 deletions mobile/lib/shared/views/app_log_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ class AppLogPage extends HookConsumerWidget {

return Scaffold(
appBar: AppBar(
title: Text(
"Logs - ${logMessages.value.length}",
style: const TextStyle(
title: const Text(
"Logs",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16.0,
),
Expand Down Expand Up @@ -135,29 +135,15 @@ class AppLogPage extends HookConsumerWidget {
dense: true,
tileColor: getTileColor(logMessage.level),
minLeadingWidth: 10,
title: Text.rich(
TextSpan(
children: [
TextSpan(
text: "#$index ",
style: TextStyle(
color: isDarkTheme ? Colors.white70 : Colors.grey[600],
fontSize: 14.0,
fontWeight: FontWeight.bold,
),
),
TextSpan(
text: truncateLogMessage(logMessage.message, 4),
style: const TextStyle(
fontSize: 14.0,
),
),
],
title: Text(
truncateLogMessage(logMessage.message, 4),
style: const TextStyle(
fontSize: 14.0,
fontFamily: "Inconsolata",
),
style: const TextStyle(fontSize: 14.0, fontFamily: "Inconsolata"),
),
subtitle: Text(
"[${logMessage.context1}] Logged on ${DateFormat("HH:mm:ss.SSS").format(logMessage.createdAt)}",
"at ${DateFormat("HH:mm:ss.SSS").format(logMessage.createdAt)} in ${logMessage.context1}",
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[600],
Expand Down

0 comments on commit 5775829

Please sign in to comment.