File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -678,10 +678,16 @@ class _SettingsScreenState extends State<SettingsScreen> {
678678 final wasUploaded = _uploadedFiles.contains (file.path);
679679 // First file (index 0) is the most recent/active log - can't upload
680680 final isCurrentLog = index == 0 ;
681+ // Parse unix timestamp from filename (meshmapper-debug-{timestamp}.txt)
682+ final timestampMatch = RegExp (r'meshmapper-debug-(\d+)\.txt' ).firstMatch (filename);
683+ final fileDate = timestampMatch != null
684+ ? DateTime .fromMillisecondsSinceEpoch (int .parse (timestampMatch.group (1 )! ) * 1000 )
685+ : null ;
686+ final dateStr = fileDate != null ? DateFormat ('MMM d, h:mm a' ).format (fileDate) : filename;
681687
682688 return ListTile (
683689 leading: const Icon (Icons .description, size: 20 ),
684- title: Text (filename , style: const TextStyle (fontSize: 13 )),
690+ title: Text (dateStr , style: const TextStyle (fontSize: 13 )),
685691 subtitle: Text (
686692 isCurrentLog ? '$sizeKb KB (current)' : '$sizeKb KB' ,
687693 style: const TextStyle (fontSize: 11 ),
You can’t perform that action at this time.
0 commit comments