fix: 推广打包后台功能—0330测试-客户端 https://jira.shanqu.cc/browse/GHZS-1874
This commit is contained in:
@ -269,20 +269,23 @@ public class MainWrapperFragment extends BaseFragment_ViewPager_Checkable implem
|
||||
}
|
||||
});
|
||||
|
||||
applyPkgConfig();
|
||||
|
||||
ViewModelProviders.of(this)
|
||||
.get(MessageUnreadViewModel.class)
|
||||
.getUnreadMessageTotalLiveData().observe(this, isShow -> ExtensionsKt.goneIf(mBinding.mainIvMessageHint, !isShow));
|
||||
}
|
||||
|
||||
private void applyPkgConfig() {
|
||||
PkgConfigEntity.PkgLinkEntity pkgLinkEntity = PkgHelper.INSTANCE.getPkgConfig();
|
||||
if (pkgLinkEntity != null && !pkgLinkEntity.isHomeTopTabLink()) {
|
||||
PkgConfigEntity.PkgLinkEntity pkgLinkEntity = PkgHelper.INSTANCE.getPkgConfig(false);
|
||||
if (pkgLinkEntity != null) {
|
||||
String bottomTab = pkgLinkEntity.getHomeBottomTab();
|
||||
|
||||
PkgHelper.INSTANCE.markConfigUsed();
|
||||
if (!TextUtils.isEmpty(bottomTab)) {
|
||||
if (!pkgLinkEntity.getShouldStayAtHomePage()) {
|
||||
// 不停留在首页,执行跳转,标记已用
|
||||
PkgHelper.INSTANCE.markConfigUsed();
|
||||
DirectUtils.directToLinkPage(requireContext(), pkgLinkEntity, "推广包配置", "首页");
|
||||
} else if (!"home".equals(bottomTab)) {
|
||||
// 停留首页,但选中底部 tab 不是首页的,执行选中,标记已用
|
||||
PkgHelper.INSTANCE.markConfigUsed();
|
||||
// TODO 根据具体 tab 来作为跳转的具体位置,避免硬编码
|
||||
int targetIndex = INDEX_HOME;
|
||||
|
||||
@ -304,8 +307,6 @@ public class MainWrapperFragment extends BaseFragment_ViewPager_Checkable implem
|
||||
mViewPager.setCurrentItem(targetIndex);
|
||||
onPageChanged(targetIndex);
|
||||
changeColor(targetIndex);
|
||||
} else {
|
||||
DirectUtils.directToLinkPage(requireContext(), pkgLinkEntity, "推广包配置", "首页");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -393,6 +394,8 @@ public class MainWrapperFragment extends BaseFragment_ViewPager_Checkable implem
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
applyPkgConfig();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user