mirror of
https://github.com/Dark98/SliceBeam.git
synced 2026-07-02 16:49:02 +00:00
Hide cloud if levels is empty
This commit is contained in:
@@ -15,6 +15,7 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import cz.msebera.android.httpclient.Header;
|
||||
import ru.ytkab0bp.slicebeam.cloud.CloudController;
|
||||
import ru.ytkab0bp.slicebeam.events.BeamServerDataUpdatedEvent;
|
||||
import ru.ytkab0bp.slicebeam.utils.Prefs;
|
||||
|
||||
@@ -46,7 +47,7 @@ public class BeamServerData {
|
||||
}
|
||||
|
||||
public static boolean isCloudAvailable() {
|
||||
return isBoostyAvailable();
|
||||
return isBoostyAvailable() && CloudController.hasAccountFeatures();
|
||||
}
|
||||
|
||||
public static void load() {
|
||||
|
||||
@@ -257,6 +257,10 @@ public class CloudController {
|
||||
return userFeatures;
|
||||
}
|
||||
|
||||
public static boolean hasAccountFeatures() {
|
||||
return userFeatures != null && !userFeatures.levels.isEmpty();
|
||||
}
|
||||
|
||||
public static boolean isSyncAvailable() {
|
||||
return Prefs.getCloudAPIToken() != null && userInfo != null && userFeatures != null && userInfo.currentLevel >= userFeatures.syncRequiredLevel;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user