fix(ui): address code review findings
- Fix event handler leak in TaskDetailView.OnDataContextChanged (unsubscribe from previous ViewModel before subscribing to new one) - Move FormatFile call off UI thread with Task.Run to prevent freeze on large log files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -90,7 +90,7 @@ public partial class TaskDetailViewModel : ViewModelBase
|
||||
&& File.Exists(task.LogPath))
|
||||
{
|
||||
_formatter = new StreamLineFormatter();
|
||||
LiveText = _formatter.FormatFile(task.LogPath);
|
||||
LiveText = await Task.Run(() => _formatter.FormatFile(task.LogPath));
|
||||
}
|
||||
StatusText = task.Status.ToString().ToLowerInvariant();
|
||||
StatusChoice = task.Status.ToString();
|
||||
|
||||
Reference in New Issue
Block a user