mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-13 16:19:36 +01:00
Initialize delayed visibility
This commit is contained in:
@@ -28,6 +28,7 @@ import androidx.annotation.Nullable;
|
||||
|
||||
public class ContentLoadingProgressBar extends ProgressBar {
|
||||
private int visibility = VISIBLE;
|
||||
private boolean init = false;
|
||||
private boolean delaying = false;
|
||||
|
||||
private static final int VISIBILITY_DELAY = 1500; // milliseconds
|
||||
@@ -53,8 +54,9 @@ public class ContentLoadingProgressBar extends ProgressBar {
|
||||
this.visibility = visibility;
|
||||
|
||||
if (visibility == VISIBLE) {
|
||||
if (delaying || super.getVisibility() == VISIBLE)
|
||||
if (delaying || (init && super.getVisibility() == VISIBLE))
|
||||
return;
|
||||
init = true;
|
||||
delaying = true;
|
||||
super.setVisibility(INVISIBLE);
|
||||
ApplicationEx.getMainHandler().postDelayed(delayedShow, VISIBILITY_DELAY);
|
||||
|
||||
Reference in New Issue
Block a user