Move logic into updateDisplay.

This commit is contained in:
Huo Yaoyuan 2017-01-04 02:12:18 +08:00
parent 794e4663d8
commit 6690d1bd72
1 changed files with 2 additions and 4 deletions

View File

@ -235,9 +235,7 @@ protected override void Update()
void preferUnicode_changed(object sender, EventArgs e)
{
if (current != null)
updateDisplay(current, TransformDirection.None);
//else: we can show something in correspond laguage
updateDisplay(current, TransformDirection.None);
}
private void workingChanged(object sender = null, EventArgs e = null)
@ -320,7 +318,7 @@ private void updateDisplay(WorkingBeatmap beatmap, TransformDirection direction)
{
Task.Run(() =>
{
if (beatmap.Beatmap == null)
if (beatmap?.Beatmap == null)
//todo: we may need to display some default text here (currently in the constructor).
return;