fix bug
This commit is contained in:
@@ -8,7 +8,7 @@ import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.module.apps.applaunch.AppLaunchFilter;
|
||||
import com.mogo.module.apps.applaunch.AppLauncher;
|
||||
import com.mogo.module.apps.applaunch.CardAppLauncher;
|
||||
import com.mogo.module.apps.applaunch.GuideShowLauncher111;
|
||||
import com.mogo.module.apps.applaunch.GuideShowLauncher;
|
||||
import com.mogo.module.apps.model.AppInfo;
|
||||
import com.mogo.module.apps.model.AppsModel;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
@@ -45,7 +45,7 @@ public class AppsPresenter extends Presenter<AppsView> {
|
||||
super(view);
|
||||
mCardManager = (IMogoCardManager) ARouter.getInstance().build(MogoServicePaths.PATH_CARD_MANAGER).navigation(getContext());
|
||||
CardAppLauncher cardAppLauncher = new CardAppLauncher(this, mCardManager);
|
||||
cardAppLauncher.setNext(new GuideShowLauncher111());
|
||||
cardAppLauncher.setNext(new GuideShowLauncher());
|
||||
cardAppLauncher.setNext(new AppLauncher());
|
||||
mLauncher = cardAppLauncher;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ public class AppsPresenter extends Presenter<AppsView> {
|
||||
result.put(result.size(), new ArrayList<>());
|
||||
}
|
||||
// 添加逻辑
|
||||
result.get(result.size() - 1).add(new AppInfo(GuideShowLauncher111.Companion.getAPP_INFO_NAME_GUIDE_SHOW(), getContext().getPackageName(), null, 0, null, R.drawable.module_apps_ic_guide_show));
|
||||
result.get(result.size() - 1).add(new AppInfo(GuideShowLauncher.APP_INFO_NAME_GUIDE_SHOW, getContext().getPackageName(), null, 0, null, R.drawable.module_apps_ic_guide_show));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,17 +2,24 @@ package com.mogo.module.apps.applaunch;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.mogo.module.apps.AppServiceHandler;
|
||||
import com.mogo.module.apps.model.AppInfo;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import kotlin.Unit;
|
||||
|
||||
public class GuideShowLauncher extends BaseAppLauncher {
|
||||
|
||||
public static final String TAG = "GuideShowLauncher";
|
||||
public static final String APP_INFO_NAME_GUIDE_SHOW = "APP_INFO_NAME_GUIDE_SHOW";
|
||||
public static final String APP_INFO_NAME_GUIDE_SHOW = "新手引导";
|
||||
|
||||
@Override
|
||||
public void launch(Context context, AppInfo appInfo) {
|
||||
if (appInfo != null && APP_INFO_NAME_GUIDE_SHOW.equals(appInfo.getName())) {
|
||||
// AppServiceHandler.getMogoGuideShow().playGuideVideo(s -> );
|
||||
AppServiceHandler.getMogoGuideShow().playGuideVideo((s) -> {
|
||||
Logger.d(TAG, s);
|
||||
return Unit.INSTANCE;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.mogo.module.apps.applaunch
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.module.apps.AppServiceHandler
|
||||
import com.mogo.module.apps.R
|
||||
import com.mogo.module.apps.model.AppInfo
|
||||
import com.mogo.utils.TipToast
|
||||
import com.mogo.utils.logger.Logger
|
||||
|
||||
class GuideShowLauncher111 : BaseAppLauncher() {
|
||||
|
||||
companion object {
|
||||
const val TAG = "GuideShowLauncher111"
|
||||
val APP_INFO_NAME_GUIDE_SHOW = "APP_INFO_NAME_GUIDE_SHOW"
|
||||
}
|
||||
|
||||
override fun launch(context: Context, appInfo: AppInfo) {
|
||||
if (appInfo != null && APP_INFO_NAME_GUIDE_SHOW == appInfo.name) {
|
||||
try {
|
||||
AppServiceHandler.getMogoGuideShow().playGuideVideo {
|
||||
Logger.e(TAG, it)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Logger.e(TAG, e, "error.")
|
||||
TipToast.shortTip(R.string.module_apps_str_no_guide_show)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun destroy() {
|
||||
if (next != null) {
|
||||
next.destroy()
|
||||
next = null
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user