From 9b3483457f7997ca39017508c319919daaff8419 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 6 Sep 2022 15:53:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=81=AE=E7=BD=A9=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/dialog/InstructorOperationDialog.java | 2 +- .../common/event/InstructorOperationEvent.java | 1 + .../common/manager/NoviceInstructorManager.java | 13 +++++++++---- .../live/activity/PDLiveConversationActivity.java | 2 +- .../com/yunbao/main/activity/MainActivity.java | 1 + .../activity/PDLiveConversationListActivity.java | 14 ++++++++++++-- 6 files changed, 25 insertions(+), 8 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/dialog/InstructorOperationDialog.java b/common/src/main/java/com/yunbao/common/dialog/InstructorOperationDialog.java index 4edf92f3e..c7dc2c6aa 100644 --- a/common/src/main/java/com/yunbao/common/dialog/InstructorOperationDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/InstructorOperationDialog.java @@ -102,7 +102,7 @@ public class InstructorOperationDialog extends AbsDialogFragment { ImgLoader.display(mContext,home_zdy_img_cn, to_msg); } - NoviceInstructorManager.get(getActivity()).setHomeZdyPop(""); + mRootView.findViewById(R.id.to_msg).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/common/src/main/java/com/yunbao/common/event/InstructorOperationEvent.java b/common/src/main/java/com/yunbao/common/event/InstructorOperationEvent.java index 15e3934f3..b5c0910ea 100644 --- a/common/src/main/java/com/yunbao/common/event/InstructorOperationEvent.java +++ b/common/src/main/java/com/yunbao/common/event/InstructorOperationEvent.java @@ -6,4 +6,5 @@ import com.yunbao.common.bean.BaseModel; * 新人面向指导员的跳转弹窗 */ public class InstructorOperationEvent extends BaseModel { + } diff --git a/common/src/main/java/com/yunbao/common/manager/NoviceInstructorManager.java b/common/src/main/java/com/yunbao/common/manager/NoviceInstructorManager.java index 31f83484d..9bbaa942a 100644 --- a/common/src/main/java/com/yunbao/common/manager/NoviceInstructorManager.java +++ b/common/src/main/java/com/yunbao/common/manager/NoviceInstructorManager.java @@ -45,6 +45,11 @@ public class NoviceInstructorManager extends BaseCacheManager { return this; } + + public String getHomeZdyPop() { + return homeZdyPop; + } + /** * 呼出指导员引导弹窗 * @@ -52,7 +57,7 @@ public class NoviceInstructorManager extends BaseCacheManager { */ public NoviceInstructorManager setHomeZdyPop(String homeZdyPop) { this.homeZdyPop = homeZdyPop; - netHandler.post(instructorOperationOpenRunnable); + netHandler.postDelayed(instructorOperationOpenRunnable,800); return this; } @@ -61,7 +66,7 @@ public class NoviceInstructorManager extends BaseCacheManager { */ public void checktHomeZdyPop() { if (!TextUtils.isEmpty(homeZdyPop) && TextUtils.equals(homeZdyPop, "1") && !isFrist) { - netHandler.post(instructorOperationOpenRunnable); + netHandler.postDelayed(instructorOperationOpenRunnable,800); } } @@ -87,7 +92,7 @@ public class NoviceInstructorManager extends BaseCacheManager { model = new Gson().fromJson(getString(KEY_NOVICE_INSTRUCTOR), NoviceInstructorModel.class); } else { - netHandler.post(instructorOperationRunnable); + netHandler.postDelayed(instructorOperationRunnable, 1000); } return model; } @@ -142,7 +147,7 @@ public class NoviceInstructorManager extends BaseCacheManager { model = new Gson().fromJson(info, NoviceInstructorModel.class); setNoviceInstructor(model); if (model != null) { - netHandler.post(instructorOperationRunnable); + netHandler.postDelayed(instructorOperationRunnable, 800); } } catch (JsonSyntaxException ignored) { } diff --git a/live/src/main/java/com/yunbao/live/activity/PDLiveConversationActivity.java b/live/src/main/java/com/yunbao/live/activity/PDLiveConversationActivity.java index a7e3fa643..d34ffcaa2 100644 --- a/live/src/main/java/com/yunbao/live/activity/PDLiveConversationActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/PDLiveConversationActivity.java @@ -264,7 +264,7 @@ public class PDLiveConversationActivity extends AbsActivity implements View.OnCl RongIMClient.getInstance().getTextMessageDraft(Conversation.ConversationType.PRIVATE, targetId, new RongIMClient.ResultCallback() { @Override public void onSuccess(String s) { - if (!TextUtils.isEmpty(inputPanel.getPresetInformation())) + if (!TextUtils.isEmpty(s)) inputPanel.setPresetInformation(s); } diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index 1db750513..64f5dbbc6 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -1286,6 +1286,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene Bundle bundle = new Bundle(); bundle.putInt(PDLiveConversationListActivity.MESSAGENUMBER, messageNumber); bundle.putInt(PDLiveConversationListActivity.NUMBERME, numberMe); + bundle.putString(PDLiveConversationListActivity.POP, NoviceInstructorManager.get(this).getHomeZdyPop()); ConversationIMListManager.get(mContext).jumpConversationList(bundle); } diff --git a/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java b/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java index 00eeb2ed8..963dc7931 100644 --- a/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java @@ -40,6 +40,7 @@ import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.manager.NoviceInstructorManager; import com.yunbao.common.manager.imrongcloud.MessageIMManager; import com.yunbao.common.utils.DeviceUtils; import com.yunbao.common.utils.DialogUitl; @@ -81,7 +82,7 @@ import static com.yunbao.common.CommonAppContext.isReady; public class PDLiveConversationListActivity extends AbsActivity implements View.OnClickListener { //菜单 private TabButtonGroup mTabButtonGroup; - public static String CLASSNAME = "PDLiveConversationListActivity", MESSAGENUMBER = "messageNumber", NUMBERME = "numberMe"; + public static String CLASSNAME = "PDLiveConversationListActivity", MESSAGENUMBER = "messageNumber", NUMBERME = "numberMe", POP = "pop"; private PDLiveConversationListActivity mContext; private ConversationListFragment conversationListFragment; private FrameLayout container; @@ -199,9 +200,15 @@ public class PDLiveConversationListActivity extends AbsActivity implements View. container.post(new Runnable() { @Override public void run() { -// showGuideView(); + String homeZdyPop = getIntent().getStringExtra(POP); + if (TextUtils.equals(homeZdyPop, "1")) { + showGuideView(); + NoviceInstructorManager.get(mContext).setHomeZdyPop(""); + } + } }); + } private void showStartDialog() { @@ -591,6 +598,7 @@ public class PDLiveConversationListActivity extends AbsActivity implements View. MessageIMManager.get(mContext).setSystemNumber(systemNumber); } + @Subscribe(threadMode = ThreadMode.MAIN) public void onRecommendLiveRoomEvent(RecommendLiveRoomEvent event) { LiveHttpUtil.getLiveInfo(event.getLiveuid(), new HttpCallback() { @@ -611,4 +619,6 @@ public class PDLiveConversationListActivity extends AbsActivity implements View. } }); } + + }