mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Fix UI thread issues
This commit is contained in:
@@ -647,7 +647,15 @@ namespace RedBookPlayer.GUI.ViewModels
|
|||||||
ApplyDeEmphasis = _player.ApplyDeEmphasis;
|
ApplyDeEmphasis = _player.ApplyDeEmphasis;
|
||||||
Volume = _player.Volume;
|
Volume = _player.Volume;
|
||||||
|
|
||||||
Dispatcher.UIThread.InvokeAsync(() =>
|
UpdateDigits();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update UI
|
||||||
|
/// </summary>
|
||||||
|
private void UpdateDigits()
|
||||||
|
{
|
||||||
|
Dispatcher.UIThread.Post(() =>
|
||||||
{
|
{
|
||||||
string digitString = GenerateDigitString() ?? string.Empty.PadLeft(20, '-');
|
string digitString = GenerateDigitString() ?? string.Empty.PadLeft(20, '-');
|
||||||
for(int i = 0; i < _digits.Length; i++)
|
for(int i = 0; i < _digits.Length; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user