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

This commit is contained in:
kehaoyuan
2019-02-27 16:23:01 +08:00
4 changed files with 10 additions and 4 deletions

View File

@ -93,6 +93,13 @@ class GHUmengNotificationService : UmengMessageService() {
return
}
// 用户未登录的情况下不生成消息中心通知,避免用户掉登录了还收到跳转至消息中心的通知
if (data != null
&& data.link?.target == "system"
&& !UserManager.getInstance().isLoggedIn) {
return
}
val clickIntent = Intent()
val removeIntent = Intent()

View File

@ -334,8 +334,6 @@ public class ConcernFragment extends NormalFragment implements SwipeRefreshLayou
// 关注事件
@Subscribe(threadMode = ThreadMode.MAIN)
public void onEventMainThread(EBConcernChanged changed) {
mConcernRecommendAdapter.concernGame(changed.getGameId());
if (!isResumed()) {
refresh();
} else {
@ -348,6 +346,7 @@ public class ConcernFragment extends NormalFragment implements SwipeRefreshLayou
});
}
}
mConcernRecommendAdapter.concernGame(changed.getGameId());
}
// 登录事件

View File

@ -586,6 +586,7 @@ public class AnswerDetailFragment extends NormalFragment {
public void onMenuItemClick(MenuItem menuItem) {
switch (menuItem.getItemId()) {
case R.id.menu_more:
if (mDetailEntity == null) return;
showMoreItemDialog();
break;
case R.id.menu_collect:
@ -644,7 +645,7 @@ public class AnswerDetailFragment extends NormalFragment {
}
private void showMoreItemDialog() {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED) || mDetailEntity != null) {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) {
View view = LayoutInflater.from(getContext()).inflate(R.layout.menu_answer_detail_more, null);
Dialog dialog = new Dialog(getActivity());
dialog.setContentView(view);

View File

@ -40,7 +40,6 @@ class UmengMessageReceiver : BroadcastReceiver() {
// 记录该推送通知被点击
UTrack.getInstance(context).trackMsgClick(msgObject)
// TODO 记录点击了推送
val msgId = intent.getStringExtra(GHUmengNotificationService.MESSAGE_ID)
val pushId = intent.getStringExtra(GHUmengNotificationService.PUSH_ID)