mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-04-29 03:06:57 -04:00
Extract isDownloading check into method of status class.
This is also going to be used elsewhere.
This commit is contained in:
@@ -691,8 +691,7 @@ public class AppDetails2 extends AppCompatActivity implements ShareChooserDialog
|
||||
|
||||
@Override
|
||||
public boolean isAppDownloading() {
|
||||
return currentStatus != null &&
|
||||
(currentStatus.status == AppUpdateStatusManager.Status.PendingDownload || currentStatus.status == AppUpdateStatusManager.Status.Downloading);
|
||||
return currentStatus != null && currentStatus.isDownloading();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -184,6 +184,10 @@ public final class AppUpdateStatusManager {
|
||||
copy.progressMax = progressMax;
|
||||
return copy;
|
||||
}
|
||||
|
||||
public boolean isDownloading() {
|
||||
return status == Status.Downloading || status == Status.PendingDownload;
|
||||
}
|
||||
}
|
||||
|
||||
private final Context context;
|
||||
|
||||
Reference in New Issue
Block a user