Ensure only run once

This commit is contained in:
Dean Herbert 2023-11-22 12:03:42 +09:00
parent fe15b26bd2
commit ad6af1d9b7
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ private void load()
apiState.BindValueChanged(state => Schedule(() =>
{
if (state.NewValue == APIState.Online && user != null)
fetchAndSetContent();
Scheduler.AddOnce(fetchAndSetContent);
}));
}
@ -89,7 +89,7 @@ public void ShowUser(IUser userToShow, IRulesetInfo? userRuleset = null)
ruleset = userRuleset;
Show();
fetchAndSetContent();
Scheduler.AddOnce(fetchAndSetContent);
}
private void fetchAndSetContent()