Waits until a condition is true (runs on UI thread).
public Task<bool> UntilOnUIThreadAsync(Func<bool> condition, string? message = null)
The condition to check on UI thread.
Optional message for timeout exception.