多余语适配:去掉部分常量

This commit is contained in:
max
2024-05-13 19:07:13 +08:00
parent bf3098d5c3
commit 9be483de4b
11 changed files with 26 additions and 41 deletions

View File

@@ -1,6 +1,5 @@
package com.chwl.core;
import com.chwl.library.utils.ResUtil;
/**
* Created by MadisonRong on 09/08/2018.
@@ -53,29 +52,9 @@ public class XConstants {
* 賽事消息UID
*/
public static final String MATCH_UID = BuildConfig.DEBUG ? "1296314" : "904772";
public static final String ROOM_INTRODUCTION = ResUtil.getString(R.string.yizhuan_xchat_android_constants_xchatconstants_08);
public static final String DATING_TIPS_OPEN = ResUtil.getString(R.string.yizhuan_xchat_android_constants_xchatconstants_09);
//僅開頭提示文案,這個tips消息我們服務端發的
public static final String DATING_TIPS_NEW = ResUtil.getString(R.string.yizhuan_xchat_android_constants_xchatconstants_010);
public static final String DATING_TIPS_IN = ResUtil.getString(R.string.yizhuan_xchat_android_constants_xchatconstants_011);
public static final String DATING_TIPS_PUBLIC = ResUtil.getString(R.string.yizhuan_xchat_android_constants_xchatconstants_012);
public static final String SHOW = "show";
public static final String HIDE = "hide";
public static final String UPDATE_VERSION_TIPS = ResUtil.getString(R.string.yizhuan_xchat_android_constants_xchatconstants_013);
public static final String NET_ERROR = ResUtil.getString(R.string.yizhuan_xchat_android_constants_xchatconstants_014);
public static final String UNKOWN_ERROR = ResUtil.getString(R.string.yizhuan_xchat_android_constants_xchatconstants_015);
/**
* 當布局記錄為空時的提示,比如禮物,充值
*/
public static final String EMPTY_RECORD_AND_THREE_MONTHS_TIPSS = ResUtil.getString(R.string.yizhuan_xchat_android_constants_xchatconstants_017);
// 舉報入口標識
public static final String REPORT_TYPE_CHAT = "chat"; // 私聊
public static final String REPORT_TYPE_PERSONAL = "personal"; // 個人中心

View File

@@ -2907,7 +2907,7 @@ public final class IMNetEaseManager {
public Publisher<?> apply(Throwable throwable) throws Exception {
String error = throwable.getMessage();
if (TextUtils.isEmpty(error)) {
error = XConstants.UNKOWN_ERROR;
error = ResUtil.getString(R.string.yizhuan_xchat_android_constants_xchatconstants_015);
}
if (listener != null) {
listener.onFailed(retryChatRoomMessage.getRetryCount(), error);
@@ -3640,7 +3640,7 @@ public final class IMNetEaseManager {
addMessagesImmediately(message);
}
content = XConstants.ROOM_INTRODUCTION;
content = ResUtil.getString(R.string.yizhuan_xchat_android_constants_xchatconstants_08);
message = ChatRoomMessageBuilder.createTipMessage(content);
message.setContent(content);
addMessagesImmediately(message);

View File

@@ -2,7 +2,9 @@ package com.chwl.core.utils.net;
import android.text.TextUtils;
import com.chwl.core.R;
import com.chwl.core.XConstants;
import com.chwl.library.utils.ResUtil;
import java.net.UnknownHostException;
@@ -41,10 +43,10 @@ public abstract class DontWarnObserver<T> implements SingleObserver<T> {
error = e.getMessage();
}
if (e instanceof UnknownHostException) {
error = XConstants.NET_ERROR;
error = ResUtil.getString(R.string.yizhuan_xchat_android_constants_xchatconstants_014);
}
if (TextUtils.isEmpty(error)) {
error = XConstants.NET_ERROR;
error = ResUtil.getString(R.string.yizhuan_xchat_android_constants_xchatconstants_014);
}
accept(null, error);
acceptThrowable(null, e);