Merge branch 'dev' of gitlab.ghzhushou.com:halo/assistant-android into dev

# 请输入一个提交信息以解释此合并的必要性,尤其是将一个更新后的上游分支
# 合并到主题分支。
#
# 以 '#' 开头的行将被忽略,而且空提交说明将会终止提交。
This commit is contained in:
kehaoyuan
2018-10-28 18:46:59 +08:00
parent ccc367a376
commit ee3b06d4aa
11 changed files with 69 additions and 46 deletions

View File

@ -1,5 +1,6 @@
package com.gh.gamecenter;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
@ -7,7 +8,9 @@ import android.text.TextUtils;
import com.gh.base.BaseActivity;
import com.gh.common.util.DirectUtils;
import com.gh.common.util.PlatformUtils;
import com.gh.common.util.RunningUtils;
import com.gh.gamecenter.entity.CommunityEntity;
import com.gh.gamecenter.manager.UserManager;
import com.lightgame.config.CommonDebug;
import com.lightgame.utils.Utils;
@ -85,7 +88,20 @@ public class SkipActivity extends BaseActivity {
DirectUtils.directToQuestionDetail(this, id, ENTRANCE_BROWSER, "浏览器");
break;
case HOST_COMMUNITY:
DirectUtils.directToCommunity(this, new CommunityEntity(id, name));
Intent intent;
UserManager.getInstance().setCommunityData(new CommunityEntity(id, name));
// 把切换放到 MainActivity 处理
if (RunningUtils.isRunning(this)
&& MainActivity.class.getName().equals(RunningUtils.getBaseActivity(this))) {
intent = new Intent(this, MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.putExtra(MainActivity.SWITCH_TO_COMMUNITY, true);
} else {
Bundle bundle = new Bundle();
bundle.putBoolean(MainActivity.SWITCH_TO_COMMUNITY, true);
intent = SplashScreenActivity.getSplashScreenIntent(this, bundle);
}
startActivity(intent);
break;
case HOST_COMMUNITY_ARTICLE:
DirectUtils.directToCommunityArticle(this, uri.getQueryParameter("articleId"), uri.getQueryParameter("communityId"), ENTRANCE_BROWSER);