diff --git a/app/src/main/java/com/shayu/phonelive/AppContext.java b/app/src/main/java/com/shayu/phonelive/AppContext.java
index 8708a0a1f..3faf890ec 100644
--- a/app/src/main/java/com/shayu/phonelive/AppContext.java
+++ b/app/src/main/java/com/shayu/phonelive/AppContext.java
@@ -30,11 +30,17 @@ import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
import com.yunbao.common.http.CommonHttpUtil;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.utils.L;
+import com.yunbao.live.socket.SocketRyClient;
import com.yunbao.live.utils.LiveImDeletUtil;
import java.io.File;
import java.io.IOException;
+import io.rong.imlib.IRongCoreListener;
+import io.rong.imlib.RongIMClient;
+import io.rong.imlib.model.Conversation;
+import io.rong.message.TextMessage;
+
import static com.yunbao.live.socket.SocketClient.mSocketHandler;
//import cn.tillusory.sdk.TiSDK;
@@ -134,7 +140,7 @@ public class AppContext extends CommonAppContext {
CommonHttpUtil.setAdvertisingChannels("p7igfz", new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
- if(code == 0) {
+ if (code == 0) {
//谷歌激活
mFirebaseAnalytics.logEvent("FS_complete_1st_loading", null);
//FB激活
@@ -146,8 +152,7 @@ public class AppContext extends CommonAppContext {
//初始化 AndroidUtilCode
Utils.init(this);
liveImDeletUtil = new LiveImDeletUtil();
- //
- RongcloudIMManager.addRongcloudIMOnReceiveMessageListener();
+
//初始化融云
RongcloudIMManager.initRongIM(this);
diff --git a/common/src/main/java/com/yunbao/common/CommonAppContext.java b/common/src/main/java/com/yunbao/common/CommonAppContext.java
index 8ea1fc54f..bb44c594c 100644
--- a/common/src/main/java/com/yunbao/common/CommonAppContext.java
+++ b/common/src/main/java/com/yunbao/common/CommonAppContext.java
@@ -36,6 +36,7 @@ public class CommonAppContext extends MultiDexApplication {
public static String lang = "chinese";
public static FirebaseAnalytics mFirebaseAnalytics;
public static AppEventsLogger logger;
+ public static boolean isReady = false;
@Override
public void onCreate() {
diff --git a/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java b/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java
index d781963dc..5dd0b4e13 100644
--- a/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java
+++ b/common/src/main/java/com/yunbao/common/manager/imrongcloud/RongcloudIMManager.java
@@ -10,6 +10,7 @@ import androidx.annotation.NonNull;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.CircleCrop;
import com.bumptech.glide.request.RequestOptions;
+import com.yunbao.common.Constants;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.bean.BaseModel;
import com.yunbao.common.bean.IMLoginModel;
@@ -26,6 +27,10 @@ import io.rong.imlib.RongCoreClient;
import io.rong.imlib.RongIMClient;
import io.rong.imlib.model.Conversation;
import io.rong.imlib.model.Message;
+import io.rong.message.TextMessage;
+
+import static com.yunbao.common.CommonAppContext.Ingroup;
+import static com.yunbao.common.CommonAppContext.isReady;
/**
* 会话列表
@@ -33,7 +38,7 @@ import io.rong.imlib.model.Message;
*/
public class RongcloudIMManager {
//融云开发者平台注册app唯一识别符
- private static final String RONG_IM_KEY = "uwd1c0sxu1p71";
+ public static final String RONG_IM_KEY = "uwd1c0sxu1p71";
private static final String CLASSNAME = "RongcloudIMManager";
/**
@@ -48,17 +53,13 @@ public class RongcloudIMManager {
initPhotoGlide();
}
- private static RongIMClient.OnReceiveMessageWrapperListener listener = new RongIMClient.OnReceiveMessageWrapperListener() {
- @Override
- public boolean onReceived(Message message, int left, boolean hasPackage, boolean offline) {
- return false;
- }
- };
+ private static RongIMClient.OnReceiveMessageWrapperListener mListener ;
/**
* 设置消息接受监听器
*/
- public static void addRongcloudIMOnReceiveMessageListener() {
+ public static void addRongcloudIMOnReceiveMessageListener(RongIMClient.OnReceiveMessageWrapperListener listener) {
+ mListener = listener;
IMCenter.getInstance().addOnReceiveMessageListener(listener);
}
@@ -66,7 +67,8 @@ public class RongcloudIMManager {
* 移除消息接受监听器
*/
public static void removeRongcloudIMOnReceiveMessageListener() {
- IMCenter.getInstance().removeOnReceiveMessageListener(listener);
+ if (null!=mListener)
+ IMCenter.getInstance().removeOnReceiveMessageListener(mListener);
}
/**
@@ -113,6 +115,7 @@ public class RongcloudIMManager {
public void onSuccess(String s) {
//连接成功,如果 onDatabaseOpened() 时没有页面跳转,也可在此时进行跳转。
Log.e(CLASSNAME, "onSuccess:" + s);
+ isReady = true;
//添加融云连接状态监听
RongcloudIMManager.setIMStatusListener();
}
diff --git a/config.gradle b/config.gradle
index 53e2161f5..eddca7244 100644
--- a/config.gradle
+++ b/config.gradle
@@ -9,9 +9,9 @@ ext {
]
manifestPlaceholders = [
//正式
-// serverHost : "https://napi.yaoulive.com",
+ serverHost : "https://napi.yaoulive.com",
//測試
- serverHost : "https://ceshi.yaoulive.com",
+// serverHost : "https://ceshi.yaoulive.com",
//腾讯地图
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",
diff --git a/live/src/main/AndroidManifest.xml b/live/src/main/AndroidManifest.xml
index e0f0cc711..4c61ad7ce 100644
--- a/live/src/main/AndroidManifest.xml
+++ b/live/src/main/AndroidManifest.xml
@@ -67,7 +67,7 @@
android:name=".activity.MedalQuestionWebViewActivity"
android:screenOrientation="portrait" />
task = GoogleSignIn.getSignedInAccountFromIntent(data);
-// handleSignInResult( task);
-// }
-// }
-
-
-// private static void handleSignInResult(@NonNull Task completedTask) {
-// try {
-// GoogleSignInAccount account = completedTask.getResult(ApiException.class);
-// String idToken = account.getIdToken();
-// Log.e("tag111", idToken+"token"+account.getPhotoUrl());
-//
-// } catch (ApiException e) {
-// e.printStackTrace();
-// }
-// }
public void Get_hash_key() {
PackageInfo info;
try {
@@ -283,25 +218,6 @@ public class EntryActivity extends AppCompatActivity {
}
});
-
-// MobSDK.submitPolicyGrantResult(true, new OperationCallback() {
-// @Override
-// public void onComplete(Void aVoid) {
-//// ToastUtil.show("onComplete: c成功");
-// }
-//
-// @Override
-// public void onFailure(Throwable throwable) {
-//// ToastUtil.show("隐私协议授权结果提交:失败");
-// }
-// });
-
- //gpp模式判断
-// boolean gppVer = MobSDK.isGppVer();
-// Log.i("tag", "onCreate: gppVer: " + gppVer);
-// Boolean gpAvailable = MobSDK.isGpAvailable();
-// Log.i("tag", "onCreate: gpAvailable: " + gpAvailable);
-
getPromoCode();
getUuidDevice();
AdjustEvent adjustEvent2 = new AdjustEvent("tyqsyf");
@@ -340,33 +256,17 @@ public class EntryActivity extends AppCompatActivity {
lt_btn_facebook.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
-// final Dialog dialog = DialogUitl.loginAuthDialog(activity);
-// dialog.show();
-// mLoginUtil.execute("facebook", new MobCallback() {
-// @Override
-// public void onSuccess(Object data) {
-// if (data != null) {
-// loginBuyThird((LoginData) data);
-// }
-// }
-//
-// @Override
-// public void onError() {
-//
-// }
-//
-// @Override
-// public void onCancel() {
-//
-// }
-//
-// @Override
-// public void onFinish() {
-// if (dialog != null) {
-// dialog.dismiss();
-// }
-// }
-// });
+ AdjustEvent adjustEvent = new AdjustEvent("umk7ri");
+ Adjust.trackEvent(adjustEvent);
+ CommonHttpUtil.setAdvertisingChannels("umk7ri", new HttpCallback() {
+ @Override
+ public void onSuccess(int code, String msg, String[] info) {
+ if(code == 0) {
+ mFirebaseAnalytics.logEvent("FS_click_fb", null);
+ logger.logEvent("FB_click_fb");
+ }
+ }
+ });
LoginManager.getInstance().logInWithReadPermissions(EntryActivity.this, Arrays.asList("public_profile"));
}
});
@@ -395,6 +295,17 @@ public class EntryActivity extends AppCompatActivity {
btn_google.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
+ AdjustEvent adjustEvent = new AdjustEvent("iqd6b7");
+ Adjust.trackEvent(adjustEvent);
+ CommonHttpUtil.setAdvertisingChannels("iqd6b7", new HttpCallback() {
+ @Override
+ public void onSuccess(int code, String msg, String[] info) {
+ if(code == 0) {
+ mFirebaseAnalytics.logEvent("FS_click_google", null);
+ logger.logEvent("FB_click_google");
+ }
+ }
+ });
Intent signInIntent = mGoogleSignInClient.getSignInIntent();
startActivityForResult(signInIntent, 1002);
}
@@ -403,6 +314,17 @@ public class EntryActivity extends AppCompatActivity {
lt_btn_twitter.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
+ AdjustEvent adjustEvent = new AdjustEvent("le2qca");
+ Adjust.trackEvent(adjustEvent);
+ CommonHttpUtil.setAdvertisingChannels("le2qca", new HttpCallback() {
+ @Override
+ public void onSuccess(int code, String msg, String[] info) {
+ if(code == 0) {
+ mFirebaseAnalytics.logEvent("FS_click_twitter", null);
+ logger.logEvent("FB_click_twitter");
+ }
+ }
+ });
tt_login_button.performClick();
}
});
@@ -428,22 +350,7 @@ public class EntryActivity extends AppCompatActivity {
loginBuyThird(data);
-// Call user = TwitterCore.getInstance().getApiClient().getAccountService().verifyCredentials(false, true, false);
-// user.enqueue(new Callback() {
-// @Override
-// public void success(Result result) {
-// User userInfo = result.data;
-// String email = userInfo.email;
-// String description = userInfo.description;
-// String imageProfileUrl = userInfo.profileImageUrl;
-// String profileUrl = imageProfileUrl.replace("_normal", "");
-// }
-//
-// @Override
-// public void failure(TwitterException exception) {
-// Log.i("Log", "TwitterException = " + exception);
-// }
-// });
+
}
@Override
@@ -456,6 +363,17 @@ public class EntryActivity extends AppCompatActivity {
@Override
public void onClick(View view) {
try {
+ AdjustEvent adjustEvent = new AdjustEvent("gev462");
+ Adjust.trackEvent(adjustEvent);
+ CommonHttpUtil.setAdvertisingChannels("gev462", new HttpCallback() {
+ @Override
+ public void onSuccess(int code, String msg, String[] info) {
+ if(code == 0) {
+ mFirebaseAnalytics.logEvent("FS_click_line", null);
+ logger.logEvent("FB_click_line");
+ }
+ }
+ });
// App-to-app login
Intent loginIntent = LineLoginApi.getLoginIntent(
view.getContext(),
@@ -737,6 +655,11 @@ public class EntryActivity extends AppCompatActivity {
@Override
public void callback(UserBean bean) {
if (mFirstLogin) {
+ //绑定广告渠道用户
+ AdjustEvent adjustEvent = new AdjustEvent("s1or0t");
+ adjustEvent.addCallbackParameter("userid", "bar");
+ Adjust.trackEvent(adjustEvent);
+
//完成第三方登录
if(mLoginType.equals("twitter")){
AdjustEvent adjustEvent1 = new AdjustEvent("ea6lld");
@@ -790,7 +713,6 @@ public class EntryActivity extends AppCompatActivity {
}
}
});
-
}
if (CommonAppConfig.IS_GOOGLE_PLAY == true) {
EntryActivity.this.startActivity(new Intent(EntryActivity.this, OneLoginActivity.class));
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 de627156a..e4464243e 100644
--- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java
+++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java
@@ -12,6 +12,7 @@ import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
+import android.os.Message;
import android.text.TextUtils;
import android.util.Log;
import android.view.Display;
@@ -53,7 +54,7 @@ import com.yunbao.common.event.UpdateTablePointMe;
import com.yunbao.common.http.CommonHttpConsts;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.interfaces.CommonCallback;
-import com.yunbao.common.manager.IMLoginManager;
+import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.GifCacheUtil;
@@ -74,6 +75,7 @@ import com.yunbao.live.bean.LiveBean;
import com.yunbao.live.bean.LiveKsyConfigBean;
import com.yunbao.live.http.LiveHttpConsts;
import com.yunbao.live.http.LiveHttpUtil;
+import com.yunbao.live.socket.SocketRyClient;
import com.yunbao.live.utils.LiveStorge;
import com.yunbao.live.views.ChatListViewHolder;
import com.yunbao.main.R;
@@ -107,6 +109,15 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
+import cn.rongcloud.rtc.api.RCRTCConfig;
+import cn.rongcloud.rtc.api.RCRTCEngine;
+import io.rong.imlib.RongIMClient;
+import io.rong.imlib.model.Conversation;
+import io.rong.message.TextMessage;
+
+import static com.yunbao.common.CommonAppContext.Ingroup;
+import static com.yunbao.common.CommonAppContext.isReady;
+
public class MainActivity extends AbsActivity implements MainAppBarLayoutListener {
public static RelativeLayout rt_main_tab;
@@ -136,7 +147,6 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
private long mLastClickBackTime;//上次点击back键的时间
private HttpCallback mGetLiveSdkCallback;
private String mUrlCsd;
- private boolean isReady = false;
private TextView v_table_redpoint;
private View v_table_redpoint_me;
@@ -247,6 +257,11 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
Display mDisplay = getWindowManager().getDefaultDisplay();
Height = mDisplay.getHeight();
+ // IMLib 初始化
+ RongIMClient.init(this, RongcloudIMManager.RONG_IM_KEY);
+ // RTCLib 初始化
+ RCRTCConfig.Builder config = RCRTCConfig.Builder.create();
+ RCRTCEngine.getInstance().init(MainActivity.this, config.build());
boolean showInvite = getIntent().getBooleanExtra(Constants.SHOW_INVITE, false);
mRootView = (ViewGroup) findViewById(R.id.rootView);
@@ -342,6 +357,26 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
initTXIM();
mViewPager.setCurrentItem(0);
mTabButtonGroup.setCurPosition(0);
+ isInstructor();
+ RongcloudIMManager.addRongcloudIMOnReceiveMessageListener(new RongIMClient.OnReceiveMessageWrapperListener() {
+ @Override
+ public boolean onReceived(io.rong.imlib.model.Message message, int i, boolean b, boolean b1) {
+ Log.e("wewe",message.getConversationType() +"112121");
+ //融云直播间聊天
+ Message msg = Message.obtain();
+ msg.what = Constants.SOCKET_WHAT_BROADCAST;
+ if (!"".equals(message.getContent()) && message.getContent() != null) {
+ TextMessage content = (TextMessage) message.getContent();
+ if(content.getContent().contains("_method_")) {
+ msg.obj = content.getContent();
+ if (SocketRyClient.mSocketHandler != null) {
+ SocketRyClient.mSocketHandler.sendMessage(msg);
+ }
+ }
+ }
+ return false;
+ }
+ });
}
@@ -383,7 +418,6 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
@Override
public void onKickedOffline() {
super.onKickedOffline();
- IMLoginManager.get(mContext).logout();
CommonAppConfig.getInstance().clearLoginInfo();
LoginActivity.forward();
@@ -1033,7 +1067,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
}
//消息中心
- @Subscribe(threadMode = ThreadMode.MAIN)
+ @Subscribe(threadMode = ThreadMode.MAIN, sticky = true)
public void onMessageIMEvent(MessageIMEvent event) {
messageNumber = event.getNumber();
if (event.getNumber() > 0) {
diff --git a/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java b/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java
index 0feb0a29b..aad01ed6f 100644
--- a/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java
+++ b/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java
@@ -7,6 +7,7 @@ import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Handler;
+import android.os.Looper;
import android.provider.MediaStore;
import androidx.annotation.RequiresApi;
@@ -251,9 +252,11 @@ public class MyWebViewActivity extends AbsActivity {
@JavascriptInterface
public void androidCommunityGift(String postsId) {
Constants.nowPostsId = postsId;
+ new Handler(Looper.getMainLooper()).post(new Runnable() {
+ public void run() {
EncourageDialog fragment = new EncourageDialog();
fragment.show(((MyWebViewActivity) mContext).getSupportFragmentManager(), "EncourageDialog");
- }
+ }});}
@JavascriptInterface
public void reportCommunity(String info) {
diff --git a/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity2.java b/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity2.java
index 6e956e8d1..1e9881157 100644
--- a/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity2.java
+++ b/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity2.java
@@ -6,6 +6,8 @@ import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
+import android.os.Handler;
+import android.os.Looper;
import android.provider.MediaStore;
import androidx.annotation.RequiresApi;
import android.text.TextUtils;
@@ -222,8 +224,11 @@ public class MyWebViewActivity2 extends AbsActivity {
@JavascriptInterface
public void androidCommunityGift(String postsId) {
Constants.nowPostsId = postsId;
+ new Handler(Looper.getMainLooper()).post(new Runnable() {
+ public void run() {
EncourageDialog fragment = new EncourageDialog();
fragment.show(((MyWebViewActivity2) mContext).getSupportFragmentManager(), "EncourageDialog");
+ }});
}
@JavascriptInterface
diff --git a/main/src/main/java/com/yunbao/main/activity/OneLoginActivity.java b/main/src/main/java/com/yunbao/main/activity/OneLoginActivity.java
index a170affcf..464b3c477 100644
--- a/main/src/main/java/com/yunbao/main/activity/OneLoginActivity.java
+++ b/main/src/main/java/com/yunbao/main/activity/OneLoginActivity.java
@@ -6,6 +6,8 @@ import android.view.View;
import android.widget.Button;
import android.widget.EditText;
+import com.adjust.sdk.Adjust;
+import com.adjust.sdk.AdjustEvent;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.makeramen.roundedimageview.RoundedImageView;
@@ -16,6 +18,7 @@ import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.bean.UserBean;
import com.yunbao.common.glide.ImgLoader;
+import com.yunbao.common.http.CommonHttpUtil;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.interfaces.ImageResultCallback;
import com.yunbao.common.utils.DialogUitl;
@@ -27,6 +30,9 @@ import com.yunbao.main.http.MainHttpUtil;
import java.io.File;
+import static com.yunbao.common.CommonAppContext.logger;
+import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
+
public class OneLoginActivity extends AbsActivity {
RoundedImageView avatar;
@@ -121,6 +127,17 @@ public class OneLoginActivity extends AbsActivity {
btn_enter.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
+ AdjustEvent adjustEvent = new AdjustEvent("xgt0h2");
+ Adjust.trackEvent(adjustEvent);
+ CommonHttpUtil.setAdvertisingChannels("xgt0h2", new HttpCallback() {
+ @Override
+ public void onSuccess(int code, String msg, String[] info) {
+ if(code == 0) {
+ mFirebaseAnalytics.logEvent("FS_binding_click", null);
+ logger.logEvent("FB_binding_click");
+ }
+ }
+ });
OneLoginDialog fragment = new OneLoginDialog();
Bundle bundle = new Bundle();
bundle.putString("name", edit_user.getText().toString()+"");
diff --git a/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java b/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java
index 06da89c3e..906eb901b 100644
--- a/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java
+++ b/main/src/main/java/com/yunbao/main/dialog/OneLoginDialog.java
@@ -10,10 +10,13 @@ import android.view.WindowManager;
import android.widget.Button;
import android.widget.TextView;
+import com.adjust.sdk.Adjust;
+import com.adjust.sdk.AdjustEvent;
import com.makeramen.roundedimageview.RoundedImageView;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.dialog.AbsDialogFragment;
import com.yunbao.common.glide.ImgLoader;
+import com.yunbao.common.http.CommonHttpUtil;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.HttpClient;
import com.yunbao.common.utils.ToastUtil;
@@ -21,6 +24,9 @@ import com.yunbao.common.utils.WordUtil;
import com.yunbao.main.R;
import com.yunbao.main.activity.MainActivity;
+import static com.yunbao.common.CommonAppContext.logger;
+import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
+
public class OneLoginDialog extends AbsDialogFragment {
@@ -87,6 +93,17 @@ public class OneLoginDialog extends AbsDialogFragment {
@Override
public void onSuccess(int code, String msg, String[] info) {
if(code == 0){
+ AdjustEvent adjustEvent = new AdjustEvent("neb317");
+ Adjust.trackEvent(adjustEvent);
+ CommonHttpUtil.setAdvertisingChannels("neb317", new HttpCallback() {
+ @Override
+ public void onSuccess(int code, String msg, String[] info) {
+ if(code == 0) {
+ mFirebaseAnalytics.logEvent("FS_binding_success", null);
+ logger.logEvent("FB_binding_success");
+ }
+ }
+ });
MainActivity.forward(getContext(), false);
}else{
if(msg.contains("暱稱重複,請重新輸入")){
diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java
index 1af2818f6..bb1d5c868 100644
--- a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java
+++ b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java
@@ -6,6 +6,8 @@ import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
+import android.os.Handler;
+import android.os.Looper;
import android.provider.MediaStore;
import androidx.annotation.RequiresApi;
import android.text.TextUtils;
@@ -220,10 +222,14 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl
@JavascriptInterface
public void androidCommunityGift(String postsId) {
Constants.nowPostsId = postsId;
- EncourageDialog fragment = new EncourageDialog();
- if (mContext instanceof MainActivity) {
- fragment.show(((MainActivity) mContext).getSupportFragmentManager(), "EncourageDialog");
- }
+ new Handler(Looper.getMainLooper()).post(new Runnable() {
+ public void run() {
+ EncourageDialog fragment = new EncourageDialog();
+ if (mContext instanceof MainActivity) {
+ fragment.show(((MainActivity) mContext).getSupportFragmentManager(), "EncourageDialog");
+ }
+ }
+ });
}
@JavascriptInterface
diff --git a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java
index 54d3abdff..60ec87c5a 100644
--- a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java
+++ b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java
@@ -508,9 +508,9 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
} else if (i == R.id.rt_setting) {
forwardSetting();
} else if (i == R.id.lt_noble) {
- Constants.isTitle = true;
+ Constants.isTitle = false;
UserBean u = CommonAppConfig.getInstance().getUserBean();
- String url = CommonAppConfig.HOST + "/h5/Nobility.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid();
+ String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid();
ZhuangBanActivity.forward(mContext, url, false);
}
diff --git a/main/src/main/res/layout/activity_zhuang_ban.xml b/main/src/main/res/layout/activity_zhuang_ban.xml
index dca04a356..e9e2cdbbb 100644
--- a/main/src/main/res/layout/activity_zhuang_ban.xml
+++ b/main/src/main/res/layout/activity_zhuang_ban.xml
@@ -7,7 +7,7 @@