Prevent progress bar from flickering
This commit is contained in:
parent
b5cd4584b2
commit
e0df69beb6
@ -181,8 +181,10 @@ public class ListHabitsRootView extends BaseRootView
|
||||
private void updateProgressBar()
|
||||
{
|
||||
postDelayed(() -> {
|
||||
progressBar.setVisibility(
|
||||
runner.getActiveTaskCount() > 0 ? VISIBLE : GONE);
|
||||
int activeTaskCount = runner.getActiveTaskCount();
|
||||
int newVisibility = activeTaskCount > 0 ? VISIBLE : GONE;
|
||||
if (progressBar.getVisibility() != newVisibility)
|
||||
progressBar.setVisibility(newVisibility);
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user