|
|
|
|
@@ -171,6 +171,7 @@ import io.reactivex.rxjava3.disposables.Disposable;
|
|
|
|
|
import io.reactivex.rxjava3.functions.BiFunction;
|
|
|
|
|
import io.reactivex.rxjava3.functions.Function5;
|
|
|
|
|
import io.reactivex.rxjava3.functions.Function6;
|
|
|
|
|
import io.reactivex.rxjava3.functions.Function7;
|
|
|
|
|
import io.reactivex.rxjava3.schedulers.Schedulers;
|
|
|
|
|
import io.reactivex.rxjava3.subjects.BehaviorSubject;
|
|
|
|
|
import okhttp3.Cache;
|
|
|
|
|
@@ -884,13 +885,18 @@ public class NetInterfaceManager {
|
|
|
|
|
.getUpdateApi().getUpdate(PackageNames.BROWSER, JGYUtils.getInstance().checkAppPlatform());
|
|
|
|
|
Observable<BaseResponse<AppUpdateInfo>> learningDesktopObservable = NetInterfaceManager.getInstance()
|
|
|
|
|
.getUpdateApi().getUpdate(PackageNames.LEARNING_DESKTOP, JGYUtils.getInstance().checkAppPlatform());
|
|
|
|
|
Observable<BaseResponse<AppUpdateInfo>> ailogUpdateObservable = NetInterfaceManager.getInstance()
|
|
|
|
|
.getUpdateApi().getUpdate(PackageNames.AILOG, JGYUtils.getInstance().checkAppPlatform());
|
|
|
|
|
|
|
|
|
|
Observable.zip(infoUpdateObservable, storeUpdateObservable, desktopUpdateObservable,
|
|
|
|
|
notifyUpdateObservable, browserUpdateObservable,
|
|
|
|
|
new Function5<BaseResponse<AppUpdateInfo>, BaseResponse<AppUpdateInfo>, BaseResponse<AppUpdateInfo>, BaseResponse<AppUpdateInfo>, BaseResponse<AppUpdateInfo>, List<AppUpdateInfo>>() {
|
|
|
|
|
notifyUpdateObservable, browserUpdateObservable,ailogUpdateObservable,
|
|
|
|
|
new Function6<BaseResponse<AppUpdateInfo>, BaseResponse<AppUpdateInfo>, BaseResponse<AppUpdateInfo>,
|
|
|
|
|
BaseResponse<AppUpdateInfo>, BaseResponse<AppUpdateInfo>,BaseResponse<AppUpdateInfo>,
|
|
|
|
|
List<AppUpdateInfo>>() {
|
|
|
|
|
@Override
|
|
|
|
|
public List<AppUpdateInfo> apply
|
|
|
|
|
(BaseResponse<AppUpdateInfo> appUpdateInfoBaseResponse, BaseResponse<AppUpdateInfo> appUpdateInfoBaseResponse2, BaseResponse<AppUpdateInfo> appUpdateInfoBaseResponse3,
|
|
|
|
|
BaseResponse<AppUpdateInfo> appUpdateInfoBaseResponse4, BaseResponse<AppUpdateInfo> appUpdateInfoBaseResponse5) throws Throwable {
|
|
|
|
|
BaseResponse<AppUpdateInfo> appUpdateInfoBaseResponse4, BaseResponse<AppUpdateInfo> appUpdateInfoBaseResponse5, BaseResponse<AppUpdateInfo> appUpdateInfoBaseResponse6) throws Throwable {
|
|
|
|
|
List<AppUpdateInfo> appUpdateInfos = new ArrayList<>();
|
|
|
|
|
if (appUpdateInfoBaseResponse.code == OK) {
|
|
|
|
|
appUpdateInfos.add(appUpdateInfoBaseResponse.data);
|
|
|
|
|
@@ -907,6 +913,9 @@ public class NetInterfaceManager {
|
|
|
|
|
if (appUpdateInfoBaseResponse5.code == OK) {
|
|
|
|
|
appUpdateInfos.add(appUpdateInfoBaseResponse5.data);
|
|
|
|
|
}
|
|
|
|
|
if (appUpdateInfoBaseResponse6.code == OK) {
|
|
|
|
|
appUpdateInfos.add(appUpdateInfoBaseResponse6.data);
|
|
|
|
|
}
|
|
|
|
|
return appUpdateInfos;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
@@ -963,16 +972,22 @@ public class NetInterfaceManager {
|
|
|
|
|
.getUpdateApi().getUpdate(PackageNames.NOTIFICATIONS, JGYUtils.getInstance().checkAppPlatform());
|
|
|
|
|
Observable<BaseResponse<AppUpdateInfo>> browserUpdateObservable = NetInterfaceManager.getInstance()
|
|
|
|
|
.getUpdateApi().getUpdate(PackageNames.BROWSER, JGYUtils.getInstance().checkAppPlatform());
|
|
|
|
|
Observable<BaseResponse<AppUpdateInfo>> ailogUpdateObservable = NetInterfaceManager.getInstance()
|
|
|
|
|
.getUpdateApi().getUpdate(PackageNames.AILOG, JGYUtils.getInstance().checkAppPlatform());
|
|
|
|
|
String desktop = mMMKV.decodeString(CommonConfig.DEFAULT_DESKTOP_PACKAGE);
|
|
|
|
|
Observable<BaseResponse<AppUpdateInfo>> learningDesktopObservable = NetInterfaceManager.getInstance()
|
|
|
|
|
.getUpdateApi().getUpdate(desktop, JGYUtils.getInstance().checkAppPlatform());
|
|
|
|
|
|
|
|
|
|
Observable.zip(infoUpdateObservable, storeUpdateObservable, desktopUpdateObservable,
|
|
|
|
|
notifyUpdateObservable, browserUpdateObservable, learningDesktopObservable,
|
|
|
|
|
new Function6<BaseResponse<AppUpdateInfo>, BaseResponse<AppUpdateInfo>, BaseResponse<AppUpdateInfo>, BaseResponse<AppUpdateInfo>, BaseResponse<AppUpdateInfo>, BaseResponse<AppUpdateInfo>, List<AppUpdateInfo>>() {
|
|
|
|
|
notifyUpdateObservable, browserUpdateObservable, learningDesktopObservable,ailogUpdateObservable,
|
|
|
|
|
new Function7<BaseResponse<AppUpdateInfo>, BaseResponse<AppUpdateInfo>, BaseResponse<AppUpdateInfo>, BaseResponse<AppUpdateInfo>,
|
|
|
|
|
BaseResponse<AppUpdateInfo>, BaseResponse<AppUpdateInfo>, BaseResponse<AppUpdateInfo>, List<AppUpdateInfo>>() {
|
|
|
|
|
@Override
|
|
|
|
|
public List<AppUpdateInfo> apply
|
|
|
|
|
(BaseResponse<AppUpdateInfo> appUpdateInfoBaseResponse, BaseResponse<AppUpdateInfo> appUpdateInfoBaseResponse2, BaseResponse<AppUpdateInfo> appUpdateInfoBaseResponse3,
|
|
|
|
|
BaseResponse<AppUpdateInfo> appUpdateInfoBaseResponse4, BaseResponse<AppUpdateInfo> appUpdateInfoBaseResponse5, BaseResponse<AppUpdateInfo> appUpdateInfoBaseResponse6) throws Throwable {
|
|
|
|
|
BaseResponse<AppUpdateInfo> appUpdateInfoBaseResponse4, BaseResponse<AppUpdateInfo> appUpdateInfoBaseResponse5, BaseResponse<AppUpdateInfo> appUpdateInfoBaseResponse6,
|
|
|
|
|
BaseResponse<AppUpdateInfo> appUpdateInfoBaseResponse7
|
|
|
|
|
) throws Throwable {
|
|
|
|
|
List<AppUpdateInfo> appUpdateInfos = new ArrayList<>();
|
|
|
|
|
if (appUpdateInfoBaseResponse.code == OK) {
|
|
|
|
|
appUpdateInfos.add(appUpdateInfoBaseResponse.data);
|
|
|
|
|
@@ -992,6 +1007,9 @@ public class NetInterfaceManager {
|
|
|
|
|
if (appUpdateInfoBaseResponse6.code == OK) {
|
|
|
|
|
appUpdateInfos.add(appUpdateInfoBaseResponse6.data);
|
|
|
|
|
}
|
|
|
|
|
if (appUpdateInfoBaseResponse7.code == OK) {
|
|
|
|
|
appUpdateInfos.add(appUpdateInfoBaseResponse7.data);
|
|
|
|
|
}
|
|
|
|
|
return appUpdateInfos;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|