版本更新
This commit is contained in:
@@ -47,12 +47,12 @@ android {
|
||||
applicationId = "com.dskj.rbchat"
|
||||
minSdk = 24
|
||||
targetSdk = 34
|
||||
versionCode = 195
|
||||
versionName = "1.9.5"
|
||||
versionCode = 202
|
||||
versionName = "2.0.2"
|
||||
multiDexEnabled = true
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
manifestPlaceholders["IMAPPKEY"] = "c38c8bbebf7d12992d2a361bfceb6c6f" //正式
|
||||
// manifestPlaceholders["IMAPPKEY"] = "4cb6b0998f9e7af9d7673963e429959a" //测试
|
||||
// manifestPlaceholders["IMAPPKEY"] = "4cb6b0998f9e7af9d7673963e429959a" //测试
|
||||
|
||||
manifestPlaceholders["JPUSH_PKGNAME"] = "com.dskj.rbchat"
|
||||
manifestPlaceholders["JPUSH_APPKEY"] = "9041bc22de91e3d9af3cfd23"
|
||||
@@ -62,6 +62,21 @@ android {
|
||||
abiFilters += listOf("armeabi-v7a", "arm64-v8a")
|
||||
}
|
||||
}
|
||||
// flavorDimensions += "version"
|
||||
// productFlavors {
|
||||
//
|
||||
// create("timeGo") {
|
||||
// applicationId = "";
|
||||
// versionNameSuffix = ""
|
||||
// }
|
||||
//
|
||||
// create("mm") {
|
||||
// applicationId = "";
|
||||
// versionNameSuffix = "-mm"
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
|
||||
buildTypes {
|
||||
getByName("release") {
|
||||
@@ -73,6 +88,7 @@ android {
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
isDebuggable = false;
|
||||
|
||||
|
||||
// buildConfigField(
|
||||
// "String",
|
||||
// "HTTPS_BASE_URL",
|
||||
@@ -86,7 +102,7 @@ android {
|
||||
)
|
||||
//正式服
|
||||
manifestPlaceholders["IMAPPKEY"] = "c38c8bbebf7d12992d2a361bfceb6c6f" //正式
|
||||
//manifestPlaceholders["IMAPPKEY"] = "4cb6b0998f9e7af9d7673963e429959a"
|
||||
// manifestPlaceholders["IMAPPKEY"] = "4cb6b0998f9e7af9d7673963e429959a"
|
||||
|
||||
}
|
||||
|
||||
@@ -110,7 +126,7 @@ android {
|
||||
"\"AIzaSyB7P1o1EIA02eWoNP_7QJ9XwWe3WkSZb9k\""
|
||||
)
|
||||
//测试APPKEY
|
||||
// manifestPlaceholders["IMAPPKEY"] = "4cb6b0998f9e7af9d7673963e429959a"
|
||||
// manifestPlaceholders["IMAPPKEY"] = "4cb6b0998f9e7af9d7673963e429959a"
|
||||
manifestPlaceholders["IMAPPKEY"] = "c38c8bbebf7d12992d2a361bfceb6c6f"
|
||||
|
||||
|
||||
@@ -239,7 +255,7 @@ dependencies {
|
||||
implementation("com.aliyun.dpa:oss-android-sdk:2.9.13")
|
||||
implementation("com.github.jenly1314:zxing-lite:2.1.1")
|
||||
implementation("com.blankj:utilcodex:1.31.0")
|
||||
// implementation("com.github.jenly1314.AppUpdater:app-updater:1.1.3")
|
||||
implementation("com.github.jenly1314.AppUpdater:app-updater:1.1.3")
|
||||
implementation("cn.jiguang.sdk:jpush:5.0.7") // 必选,此处以JPush 5.0.7 版本为例,注意:5.0.0 版本开始可以自动拉取 JCore 包,无需另外配置
|
||||
implementation("cn.jiguang.sdk.plugin:fcm:5.0.7")
|
||||
implementation("cn.jiguang.sdk:joperate:2.0.2") // 可选,集成极光分析SDK后,即可支持行为触发推送消息、推送转化率统计,用户行为分析和用户标签等功能
|
||||
@@ -261,4 +277,6 @@ dependencies {
|
||||
// implementation("com.esotericsoftware.spine:spine-libgdx:4.1.00")
|
||||
// implementation("com.esotericsoftware:spine-runtimes:+")
|
||||
|
||||
implementation("com.airbnb.android:lottie:6.0.0") // lottie json动画
|
||||
|
||||
}
|
||||
|
||||
150
app/src/main/java/com/dskj/rbchat/dialog/VersionDialog.java
Normal file
150
app/src/main/java/com/dskj/rbchat/dialog/VersionDialog.java
Normal file
@@ -0,0 +1,150 @@
|
||||
package com.dskj.rbchat.dialog;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.dskj.rbchat.R;
|
||||
import com.dskj.rbchat.databinding.DialogActionVersionBinding;
|
||||
|
||||
/**
|
||||
* 版本弹窗
|
||||
*/
|
||||
public class VersionDialog extends Dialog {
|
||||
private final Context context;
|
||||
String title;
|
||||
String content;
|
||||
String cancel = null;
|
||||
String sure = null;
|
||||
boolean showCancel = true;
|
||||
OnToActionListener onToActionListener;
|
||||
DialogActionVersionBinding actionConfirmBinding;
|
||||
|
||||
public interface OnToActionListener {
|
||||
void toSumbit();
|
||||
|
||||
void toCancel();
|
||||
|
||||
}
|
||||
|
||||
public void setOnToActionListener(OnToActionListener onNextCallListener) {
|
||||
this.onToActionListener = onNextCallListener;
|
||||
}
|
||||
|
||||
public VersionDialog(Context context, String title, String content, boolean showCancel) {
|
||||
super(context, R.style.MaterialDesignDialog);
|
||||
actionConfirmBinding = DialogActionVersionBinding.inflate(getLayoutInflater());
|
||||
setContentView(actionConfirmBinding.getRoot());
|
||||
this.title = title;
|
||||
this.context = context;
|
||||
this.content = content;
|
||||
this.showCancel = showCancel;
|
||||
}
|
||||
|
||||
public VersionDialog(Context context, String content, boolean showCancel) {
|
||||
super(context, R.style.MaterialDesignDialog);
|
||||
actionConfirmBinding = DialogActionVersionBinding.inflate(getLayoutInflater());
|
||||
setContentView(actionConfirmBinding.getRoot());
|
||||
|
||||
this.context = context;
|
||||
this.content = content;
|
||||
this.showCancel = showCancel;
|
||||
}
|
||||
|
||||
public VersionDialog(Context context, String content, String cancel, String sure) {
|
||||
super(context, R.style.MaterialDesignDialog);
|
||||
actionConfirmBinding = DialogActionVersionBinding.inflate(getLayoutInflater());
|
||||
setContentView(actionConfirmBinding.getRoot());
|
||||
|
||||
this.context = context;
|
||||
this.content = content;
|
||||
this.cancel = cancel;
|
||||
this.sure = sure;
|
||||
}
|
||||
|
||||
public VersionDialog(Context context, String title, String content, String cancel, String sure) {
|
||||
super(context, R.style.MaterialDesignDialog);
|
||||
actionConfirmBinding = DialogActionVersionBinding.inflate(getLayoutInflater());
|
||||
setContentView(actionConfirmBinding.getRoot());
|
||||
this.title = title;
|
||||
this.context = context;
|
||||
this.content = content;
|
||||
this.cancel = cancel;
|
||||
this.sure = sure;
|
||||
}
|
||||
|
||||
public VersionDialog(Context context, String title, String content, String cancel, String sure, boolean showCancel) {
|
||||
super(context, R.style.MaterialDesignDialog);
|
||||
actionConfirmBinding = DialogActionVersionBinding.inflate(getLayoutInflater());
|
||||
setContentView(actionConfirmBinding.getRoot());
|
||||
this.title = title;
|
||||
this.context = context;
|
||||
this.content = content;
|
||||
this.cancel = cancel;
|
||||
this.sure = sure;
|
||||
this.showCancel = showCancel;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
actionConfirmBinding.contentTv.setText(content);
|
||||
actionConfirmBinding.contentTv.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
|
||||
@Override
|
||||
public boolean onPreDraw() {
|
||||
//这个监听的回调是异步的,在监听完以后一定要把绘制监听移除,不然这个会一直回调,导致界面错乱
|
||||
actionConfirmBinding.contentTv.getViewTreeObserver().removeOnPreDrawListener(this);
|
||||
int line = actionConfirmBinding.contentTv.getLineCount();
|
||||
if (line > 1) {
|
||||
actionConfirmBinding.contentTv.setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (!TextUtils.isEmpty(title)) {
|
||||
actionConfirmBinding.titleTv.setVisibility(View.VISIBLE);
|
||||
actionConfirmBinding.titleTv.setText(title);
|
||||
}
|
||||
if (!TextUtils.isEmpty(cancel)) {
|
||||
actionConfirmBinding.cancelTv.setText(cancel);
|
||||
}
|
||||
if (!TextUtils.isEmpty(sure)) {
|
||||
actionConfirmBinding.sumbitTv.setText(sure);
|
||||
}
|
||||
if (!showCancel) {
|
||||
actionConfirmBinding.cancelTv.setVisibility(View.GONE);
|
||||
// actionConfirmBinding.lineV.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
actionConfirmBinding.sumbitTv.setOnClickListener(v -> {
|
||||
dismiss();
|
||||
if (onToActionListener != null) {
|
||||
onToActionListener.toSumbit();
|
||||
}
|
||||
});
|
||||
actionConfirmBinding.cancelTv.setOnClickListener(v -> {
|
||||
dismiss();
|
||||
if (onToActionListener != null) {
|
||||
onToActionListener.toCancel();
|
||||
}
|
||||
});
|
||||
|
||||
setCanceledOnTouchOutside(false);
|
||||
Window window = getWindow();
|
||||
WindowManager.LayoutParams wlp = window.getAttributes();
|
||||
wlp.gravity = Gravity.CENTER;
|
||||
wlp.width = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
wlp.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
|
||||
window.setAttributes(wlp);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -70,6 +70,7 @@ import com.dskj.rbchat.dialog.ActionConfirmDialog;
|
||||
import com.dskj.rbchat.dialog.ActionConfirmDialog1;
|
||||
import com.dskj.rbchat.dialog.PayCashDialog;
|
||||
import com.dskj.rbchat.dialog.PayCashFingerDialog;
|
||||
import com.dskj.rbchat.dialog.VersionDialog;
|
||||
import com.dskj.rbchat.game.JsBridgeActivity;
|
||||
import com.dskj.rbchat.main.authorize.AuthorizeActivity;
|
||||
import com.dskj.rbchat.main.chat.ChatConversationFragment;
|
||||
@@ -83,6 +84,7 @@ import com.dskj.rbchat.model.ConfigBean;
|
||||
import com.dskj.rbchat.model.LoginBean;
|
||||
import com.dskj.rbchat.model.MessagefcmBean;
|
||||
import com.dskj.rbchat.model.UserShareBean;
|
||||
import com.dskj.rbchat.model.VersionBean;
|
||||
import com.dskj.rbchat.model.WalletBean;
|
||||
import com.dskj.rbchat.network.Api;
|
||||
import com.dskj.rbchat.network.BaseObserver;
|
||||
@@ -108,6 +110,7 @@ import com.google.gson.JsonObject;
|
||||
import com.huawei.hms.hmsscankit.ScanUtilNew;
|
||||
import com.huawei.hms.ml.scan.HmsScan;
|
||||
import com.huawei.hms.ml.scan.HmsScanAnalyzerOptions;
|
||||
import com.king.app.updater.AppUpdater;
|
||||
import com.king.zxing.util.CodeUtils;
|
||||
import com.netease.lava.nertc.sdk.NERtcOption;
|
||||
import com.netease.nimlib.sdk.NIMClient;
|
||||
@@ -485,9 +488,87 @@ public class MainActivity extends BaseActivity {
|
||||
shareDateUtils.getAllSessionList();
|
||||
}
|
||||
});
|
||||
getVersion();
|
||||
|
||||
}
|
||||
|
||||
VersionBean versionBean;
|
||||
|
||||
|
||||
private void getVersion() {
|
||||
try {
|
||||
Api.getInstance().version(7, DataUtils.getVersionCode(MainActivity.this), IMUIKitConfig.SUBSTATIONID)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<List<VersionBean>> feedbackResp) {
|
||||
if (feedbackResp.data != null && feedbackResp.data.size() > 0) {
|
||||
versionBean = feedbackResp.data.get(0);
|
||||
try {
|
||||
if (versionBean.getVersionNumber() > DataUtils.getVersionCode(MainActivity.this)) {
|
||||
VersionDialog actionDialog = new VersionDialog(MainActivity.this,
|
||||
String.format(getString(R.string.updateversion_txt), versionBean.getVersionName()),
|
||||
getDownloadText(versionBean), getString(R.string.xiacigengxin_txt),
|
||||
getString(R.string.login_form_have_latest_version_update_now), versionBean.getForceDownload() == 0);
|
||||
actionDialog.setOnToActionListener(new VersionDialog.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbit() {
|
||||
checkUpdate(versionBean.getDownloadAddress());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toCancel() {
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
actionDialog.show();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
ToastX.showShortToast(msg);
|
||||
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void checkUpdate(String url) {
|
||||
new AppUpdater(MainActivity.this, url).start();
|
||||
}
|
||||
|
||||
private String getDownloadText(VersionBean versionBean) {
|
||||
String name = "";
|
||||
int loc = DataUtils.get(MainActivity.this, "locale", 1);
|
||||
switch (loc) {
|
||||
case 1:
|
||||
name = versionBean.getUpgradeHintZhCn().replace("\\n","\n");
|
||||
break;
|
||||
case 2:
|
||||
name = versionBean.getUpgradeHintEnUs().replace("\\n","\n");
|
||||
break;
|
||||
case 3:
|
||||
name = versionBean.getUpgradeHintJaJp().replace("\\n","\n");
|
||||
break;
|
||||
default:
|
||||
name = versionBean.getUpgradeHintZhTw().replace("\\n","\n");
|
||||
break;
|
||||
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getNavigationBarHeight(Context context) {
|
||||
Resources resources = context.getResources();
|
||||
int resourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android");
|
||||
|
||||
@@ -790,6 +790,7 @@ public class ContactFragment extends BaseFragment {
|
||||
}
|
||||
binding.tvIndexfmGrouppull.setVisibility(size > 3 ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
teamContactAdapter.sortListByMyTeam(teamContactAdapter.getData());
|
||||
}
|
||||
|
||||
//更新会话数据
|
||||
|
||||
@@ -116,7 +116,7 @@ public class IndexContactAdapter extends RecyclerView.Adapter<IndexContactAdapte
|
||||
return;
|
||||
}
|
||||
dataList.addAll(list);
|
||||
sortListByMyTeam(dataList);
|
||||
// sortListByMyTeam(dataList);
|
||||
notifyDataSetChanged();
|
||||
|
||||
}
|
||||
@@ -152,7 +152,7 @@ public class IndexContactAdapter extends RecyclerView.Adapter<IndexContactAdapte
|
||||
long chattime = teamBean1.getConversationTime() - teamBean2.getConversationTime();
|
||||
return (chattime == 0L ? 0 : (chattime > 0 ? -1 : 1));
|
||||
} else {
|
||||
return teamBean1.data.getCreator().equals(IMKitClient.account()) ? -1 : 0;
|
||||
return teamBean1.data.getCreator().equals(IMKitClient.account()) ? -1 : 1;
|
||||
}
|
||||
} else {
|
||||
result = -1;
|
||||
|
||||
@@ -33,6 +33,7 @@ import com.dskj.rbchat.about.AboutActivity;
|
||||
import com.dskj.rbchat.databinding.FragmentMineBinding;
|
||||
import com.dskj.rbchat.databinding.FragmentMineNewBinding;
|
||||
import com.dskj.rbchat.dialog.ActionConfirmDialog;
|
||||
import com.dskj.rbchat.dialog.VersionDialog;
|
||||
import com.dskj.rbchat.game.JsBridgeActivity;
|
||||
import com.dskj.rbchat.login.PhoneLoginActivity;
|
||||
import com.dskj.rbchat.main.MainActivity;
|
||||
@@ -57,6 +58,7 @@ import com.dskj.rbchat.wallet.PaySettingActivity;
|
||||
import com.dskj.rbchat.wallet.WalletInfoActivity;
|
||||
import com.dskj.rbchat.welcome.WelcomeActivity;
|
||||
//import com.king.app.updater.AppUpdater;
|
||||
import com.king.app.updater.AppUpdater;
|
||||
import com.netease.yunxin.kit.alog.ALog;
|
||||
import com.netease.yunxin.kit.chatkit.ui.common.ChatDataUtils;
|
||||
import com.netease.yunxin.kit.chatkit.ui.data.ChatDatabase;
|
||||
@@ -254,7 +256,8 @@ public class MineFragment extends BaseFragment {
|
||||
intent.putExtra("isGame", true);
|
||||
startActivity(intent);
|
||||
});
|
||||
// binding.versionTv.setOnClickListener((View.OnClickListener) v -> getVersion());
|
||||
binding.versionTv.setOnClickListener((View.OnClickListener) v -> getVersion());
|
||||
binding.versionDescTv.setOnClickListener((View.OnClickListener) v -> getVersion());
|
||||
|
||||
|
||||
}
|
||||
@@ -319,7 +322,7 @@ public class MineFragment extends BaseFragment {
|
||||
|
||||
private void getVersion() {
|
||||
try {
|
||||
Api.getInstance().version(0, DataUtils.getVersionCode(getActivity()), IMUIKitConfig.SUBSTATIONID)
|
||||
Api.getInstance().version(7, DataUtils.getVersionCode(getActivity()), IMUIKitConfig.SUBSTATIONID)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@@ -329,11 +332,11 @@ public class MineFragment extends BaseFragment {
|
||||
versionBean = feedbackResp.data.get(0);
|
||||
try {
|
||||
if (versionBean.getVersionNumber() > DataUtils.getVersionCode(getActivity())) {
|
||||
|
||||
ActionConfirmDialog actionDialog = new ActionConfirmDialog(getActivity(),
|
||||
VersionDialog actionDialog = new VersionDialog(getActivity(),
|
||||
String.format(getString(R.string.updateversion_txt), versionBean.getVersionName()),
|
||||
getDownloadText(versionBean), getString(R.string.xiacigengxin_txt),
|
||||
getString(R.string.login_form_have_latest_version_update_now));
|
||||
actionDialog.setOnToActionListener(new ActionConfirmDialog.OnToActionListener() {
|
||||
getString(R.string.login_form_have_latest_version_update_now),versionBean.getForceDownload()==0);
|
||||
actionDialog.setOnToActionListener(new VersionDialog.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbit() {
|
||||
checkUpdate(versionBean.getDownloadAddress());
|
||||
@@ -341,6 +344,9 @@ public class MineFragment extends BaseFragment {
|
||||
|
||||
@Override
|
||||
public void toCancel() {
|
||||
// if (versionBean.getForceDownload() == 1) { //如果是強制升級
|
||||
// getActivity().finish();
|
||||
// }
|
||||
|
||||
}
|
||||
});
|
||||
@@ -371,9 +377,7 @@ public class MineFragment extends BaseFragment {
|
||||
}
|
||||
|
||||
private void checkUpdate(String url) {
|
||||
|
||||
// new AppUpdater(getActivity(), url).start();
|
||||
|
||||
new AppUpdater(getActivity(), url).start();
|
||||
|
||||
}
|
||||
|
||||
@@ -383,16 +387,16 @@ public class MineFragment extends BaseFragment {
|
||||
int loc = DataUtils.get(getActivity(), "locale", 1);
|
||||
switch (loc) {
|
||||
case 1:
|
||||
name = versionBean.getUpgradeHintZhCn();
|
||||
name = versionBean.getUpgradeHintZhCn().replace("\\n","\n");
|
||||
break;
|
||||
case 2:
|
||||
name = versionBean.getUpgradeHintEnUs();
|
||||
name = versionBean.getUpgradeHintEnUs().replace("\\n","\n");
|
||||
break;
|
||||
case 3:
|
||||
name = versionBean.getUpgradeHintJaJp();
|
||||
name = versionBean.getUpgradeHintJaJp().replace("\\n","\n");
|
||||
break;
|
||||
default:
|
||||
name = versionBean.getUpgradeHintZhTw();
|
||||
name = versionBean.getUpgradeHintZhTw().replace("\\n","\n");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
@@ -208,6 +208,6 @@
|
||||
android:text="@string/userphoto_edit_delete"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:visibility="visible" />
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
109
app/src/main/res/layout/dialog_action_version.xml
Normal file
109
app/src/main/res/layout/dialog_action_version.xml
Normal file
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="285dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_dialog_bg_new"
|
||||
android:minHeight="@dimen/dp_144"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:gravity="center"
|
||||
android:textColor="#2c2c2c"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleupdate_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:text="@string/updateversion_content"
|
||||
android:textColor="#2c2c2c"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title_tv" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_weight="1"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:text="1、功能更新\n2、修复bug"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/titleupdate_tv"
|
||||
app:layout_goneMarginTop="@dimen/dp_30" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginBottom="@dimen/dp_25"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/cancel_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/cornor_stroke_thempink_12dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/cancel_txt"
|
||||
android:textColor="@color/color_themepink"
|
||||
android:textSize="16sp"
|
||||
android:visibility="visible" />
|
||||
|
||||
<View
|
||||
android:id="@+id/line_v"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="@dimen/dp_42" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sumbit_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/cornor_thempink_12dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/sure_txt"
|
||||
android:textColor="@color/colorWhite"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -305,7 +305,9 @@
|
||||
|
||||
<string name="sfrz_txt">Identity authentication</string>
|
||||
<string name="fxxbb_txt">New version found</string>
|
||||
<string name="xiacigengxin_txt">Next update</string>
|
||||
<string name="xiacigengxin_txt">Ignore</string>
|
||||
<string name="updateversion_txt">New version %s found</string>
|
||||
<string name="updateversion_content">Update Content:</string>
|
||||
<string name="login_form_have_latest_version_update_now">Update now</string>
|
||||
<string name="dqyszxbb_txt">This is the latest version</string>
|
||||
<string name="dongtaishezhi_txt">Dynamic settings</string>
|
||||
|
||||
@@ -301,7 +301,9 @@
|
||||
<string name="verification_code_verification_txt">確認コードの確認</string>
|
||||
<string name="sfrz_txt">ID 認証</string>
|
||||
<string name="fxxbb_txt">新しいバージョンが見つかりました</string>
|
||||
<string name="xiacigengxin_txt">次回の更新</string>
|
||||
<string name="xiacigengxin_txt">無視(むし)</string>
|
||||
<string name="updateversion_txt">新しいバージョン%sが見つかりました</string>
|
||||
<string name="updateversion_content">更新内容:</string>
|
||||
<string name="login_form_have_latest_version_update_now">今すぐ更新</string>
|
||||
<string name="dqyszxbb_txt">これが最新バージョンです</string>
|
||||
<string name="dongtaishezhi_txt">動的設定</string>
|
||||
|
||||
@@ -298,9 +298,11 @@
|
||||
<string name="verification_code_verification_txt">驗證碼驗證</string>
|
||||
<string name="sfrz_txt">身分認證</string>
|
||||
<string name="fxxbb_txt">發現新版本</string>
|
||||
<string name="xiacigengxin_txt">下次更新</string>
|
||||
<string name="xiacigengxin_txt">忽略</string>
|
||||
<string name="updateversion_txt">發現新版本%s</string>
|
||||
<string name="updateversion_content">更新內容:</string>
|
||||
<string name="login_form_have_latest_version_update_now">立即更新</string>
|
||||
<string name="dqyszxbb_txt">目前已是最新版本</string>
|
||||
<string name="dqyszxbb_txt">當前已是最新版本</string>
|
||||
<string name="dongtaishezhi_txt">動態設定</string>
|
||||
<string name="nqdyscztdt_txt">你確定要刪除這條動態嗎? </string>
|
||||
<string name="shanchu_chenggong_txt">刪除成功</string>
|
||||
|
||||
@@ -299,7 +299,9 @@
|
||||
<string name="verification_code_verification_txt">验证码验证</string>
|
||||
<string name="sfrz_txt">身份认证</string>
|
||||
<string name="fxxbb_txt">发现新版本</string>
|
||||
<string name="xiacigengxin_txt">下次更新</string>
|
||||
<string name="xiacigengxin_txt">忽略</string>
|
||||
<string name="updateversion_txt">发现新版本%s</string>
|
||||
<string name="updateversion_content">更新內容:</string>
|
||||
<string name="login_form_have_latest_version_update_now">立即更新</string>
|
||||
<string name="dqyszxbb_txt">当前已是最新版本</string>
|
||||
<string name="dongtaishezhi_txt">动态设置</string>
|
||||
|
||||
@@ -299,7 +299,9 @@
|
||||
<string name="verification_code_verification_txt">验证码验证</string>
|
||||
<string name="sfrz_txt">身份认证</string>
|
||||
<string name="fxxbb_txt">发现新版本</string>
|
||||
<string name="xiacigengxin_txt">下次更新</string>
|
||||
<string name="xiacigengxin_txt">忽略</string>
|
||||
<string name="updateversion_txt">发现新版本%s</string>
|
||||
<string name="updateversion_content">更新內容:</string>
|
||||
<string name="login_form_have_latest_version_update_now">立即更新</string>
|
||||
<string name="dqyszxbb_txt">当前已是最新版本</string>
|
||||
<string name="dongtaishezhi_txt">动态设置</string>
|
||||
|
||||
@@ -102,13 +102,15 @@ public class ChatPopActionFactory {
|
||||
actions.add(getCopyAction(message));
|
||||
}
|
||||
actions.add(getReplyAction(message));
|
||||
if (message.getViewType() != MsgTypeEnum.audio.getValue()) {
|
||||
if (message.getViewType() == MsgTypeEnum.audio.getValue()||message.getViewType() == MsgTypeEnum.custom.getValue()) {
|
||||
}else{
|
||||
actions.add(getTransmitAction(message)); //转发
|
||||
actions.add(getMultiSelectAction(message));
|
||||
|
||||
}
|
||||
// if (message.getViewType() != MsgTypeEnum.location.getValue()) {
|
||||
// actions.add(getPinAction(message));
|
||||
// }
|
||||
actions.add(getMultiSelectAction(message));
|
||||
// actions.add(getCollectionAction(message));
|
||||
// actions.add(getDeleteAction(message));
|
||||
|
||||
@@ -119,13 +121,25 @@ public class ChatPopActionFactory {
|
||||
CustomAttachment attachment =
|
||||
(CustomAttachment) imMessage.getAttachment();
|
||||
LogUtils.i("自定义消息的类型", "自定义消息的类型:" + GsonUtils.beanToJSONString(attachment));
|
||||
|
||||
boolean isShowMoreAction = true;
|
||||
if (attachment != null) {
|
||||
if (attachment.getType() == ChatMessageType.CUSTOM_STICKER_TRANSFER_ACCOUNTS
|
||||
|| attachment.getType() == ChatMessageType.CUSTOM_STICKER_RED_ENVELOPE
|
||||
|| attachment.getType() == ChatMessageType.CUSTOM_STICKER_RED_ENVELOPE_GET) {
|
||||
isShowChehui = false;
|
||||
}
|
||||
|
||||
|
||||
if(attachment.getType() == ChatMessageType.CUSTOM_STICKER_RED_ENVELOPE
|
||||
|| attachment.getType() == ChatMessageType.CUSTOM_STICKER_RED_ENVELOPE_GET){
|
||||
isShowMoreAction = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(isShowMoreAction){
|
||||
actions.add(getTransmitAction(message)); //转发
|
||||
actions.add(getMultiSelectAction(message));
|
||||
}
|
||||
}
|
||||
if (isShowChehui) {
|
||||
|
||||
@@ -49,12 +49,12 @@ public interface ApiService {
|
||||
/**
|
||||
* 正式环境
|
||||
*/
|
||||
// String URL = "https://api.letschat2023.com/";
|
||||
String URL = "https://api.letschat2023.com/";
|
||||
|
||||
/**
|
||||
* 测试环境
|
||||
*/
|
||||
String URL = "https://api-test.letschat2023.com/";
|
||||
// String URL = "https://api-test.letschat2023.com/";
|
||||
// String URL = "https://8.217.244.135:8001/";
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user