private async Task MarkAsRead(PieceOfInformation value) { if (value == null) return; await Task.Delay(1000); if (value != Piece) return; if (Application.Current.MainWindow?.IsActive == true) { value.MarkAsRead(); } }
private void OnPieceChanged(PieceOfInformation newValue) { MarkAsRead(newValue).Forget(); }