修复测试反馈问题
This commit is contained in:
parent
479a7b8d33
commit
0d52db8edb
@ -236,7 +236,7 @@
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${packageName}.fileprovider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.shayu.onetoone.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
@ -17,6 +18,8 @@ import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.utils.AppManager;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
@ -31,6 +34,7 @@ public class EndCallActivity extends AbsOTOActivity {
|
||||
private Button applyButton;
|
||||
private UserBean user;
|
||||
private String timer;
|
||||
private final String TAG="EndCallActivity";
|
||||
|
||||
|
||||
@Override
|
||||
@ -56,6 +60,9 @@ public class EndCallActivity extends AbsOTOActivity {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
if(StringUtil.isEmpty(timer)){
|
||||
timer=WordUtil.getNewString(R.string.call_time) + "00:00";
|
||||
}
|
||||
ImgLoader.display(mContext, user.getUser().getAvatar(), avatar);
|
||||
ImgLoader.displayBlur(mContext, user.getUser().getAvatar(), findViewById(R.id.bg), 85);
|
||||
usernameView.setText(user.getUser().getUserNicename());
|
||||
@ -68,7 +75,24 @@ public class EndCallActivity extends AbsOTOActivity {
|
||||
});
|
||||
|
||||
cancelButton.setOnClickListener(v -> {
|
||||
OTONetManager.getInstance(mContext)
|
||||
.getTargetUserInfo(user.getUser().getId(), new HttpCallback<UserBean>() {
|
||||
@Override
|
||||
public void onSuccess(UserBean data) {
|
||||
if (data.getInfo().getName_auth() == 2) {
|
||||
RouteManager.forwardActivity(extras.getString("path"), extras);
|
||||
} else {
|
||||
ToastUtil.show(R.string.end_resume_call_not_auth);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e(TAG, "onError: " + error);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
applyButton.setOnClickListener(v -> {
|
||||
});
|
||||
|
@ -91,7 +91,7 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
View mInputPanel;
|
||||
View numLayout;
|
||||
EditText mEditText;
|
||||
ImageView img, call, video, gift,mEmojiToggleBtn;
|
||||
ImageView img, call, video, gift, mEmojiToggleBtn;
|
||||
ProcessImageUtil cameraUtil;
|
||||
String targetId;
|
||||
Conversation.ConversationType conversationType = Conversation.ConversationType.PRIVATE;
|
||||
@ -129,7 +129,7 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
initBtn();
|
||||
initChat();
|
||||
initPriceBean();
|
||||
cameraUtil = new ProcessImageUtil(getActivity(), "${packageName}.fileprovider");
|
||||
cameraUtil = new ProcessImageUtil(getActivity(), mContext.getPackageName() + ".fileprovider");
|
||||
|
||||
mRongExtension.setVisibility(View.VISIBLE);
|
||||
// img.setOnClickListener(v -> cameraUtil.getImageByCamera());
|
||||
@ -214,9 +214,9 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
field.setAccessible(true);
|
||||
mInputPanel = (View) field.get(mRongExtension.getInputPanel());
|
||||
assert mInputPanel != null;
|
||||
field=mRongExtension.getInputPanel().getClass().getDeclaredField("mExtensionViewModel");
|
||||
field = mRongExtension.getInputPanel().getClass().getDeclaredField("mExtensionViewModel");
|
||||
field.setAccessible(true);
|
||||
mExtensionViewModel= (RongExtensionViewModel) field.get(mRongExtension.getInputPanel());
|
||||
mExtensionViewModel = (RongExtensionViewModel) field.get(mRongExtension.getInputPanel());
|
||||
mSendBtn = mInputPanel.getRootView().findViewById(R.id.send_btn);
|
||||
img = mInputPanel.getRootView().findViewById(R.id.input_panel_image_btn);
|
||||
video = mInputPanel.getRootView().findViewById(R.id.input_panel_video_btn);
|
||||
@ -250,11 +250,11 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
giftPanel.show();
|
||||
});
|
||||
mEmojiToggleBtn.setOnClickListener(v -> {
|
||||
if(mExtensionViewModel.getInputModeLiveData().getValue()==InputMode.TextInput){
|
||||
if (mExtensionViewModel.getInputModeLiveData().getValue() == InputMode.TextInput) {
|
||||
audio.hide();
|
||||
giftPanel.hide();
|
||||
mExtensionViewModel.getInputModeLiveData().setValue(InputMode.EmoticonMode);
|
||||
}else{
|
||||
} else {
|
||||
mExtensionViewModel.getInputModeLiveData().setValue(InputMode.TextInput);
|
||||
}
|
||||
});
|
||||
@ -303,9 +303,9 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
@Override
|
||||
public void onError(int status, String msg) {
|
||||
super.onError(status, msg);
|
||||
if(status==1) {
|
||||
if (status == 1) {
|
||||
sendAuthRequest();
|
||||
}else if(!StringUtil.isEmpty(msg)){
|
||||
} else if (!StringUtil.isEmpty(msg)) {
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
}
|
||||
@ -354,9 +354,9 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
@Override
|
||||
public void onError(int status, String msg) {
|
||||
super.onError(status, msg);
|
||||
if(status==1) {
|
||||
if (status == 1) {
|
||||
sendAuthRequest();
|
||||
}else if(!StringUtil.isEmpty(msg)){
|
||||
} else if (!StringUtil.isEmpty(msg)) {
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
}
|
||||
@ -412,10 +412,12 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
public void onSuccess(UserBean data) {
|
||||
if (data.getInfo().getName_auth() == 2) {
|
||||
listener.onSuccess("", null);
|
||||
} else if(data.getInfo().getName_auth() == 3){
|
||||
} else if (data.getInfo().getName_auth() == 3) {
|
||||
listener.onError(data.getInfo().getName_auth(), "當前正在審核中,請耐心等待");
|
||||
}
|
||||
// listener.onSuccess("", null);
|
||||
AppManager.runDebugCode(()->{
|
||||
listener.onSuccess("", null);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -602,6 +604,11 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
video.setImageResource(R.mipmap.ic_msg_video_lock);
|
||||
call.setTag("true");
|
||||
}
|
||||
AppManager.runDebugCode(()->{
|
||||
call.setTag(null);
|
||||
call.setImageResource(R.mipmap.ic_msg_call);
|
||||
video.setImageResource(R.mipmap.ic_msg_video);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -691,9 +698,9 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
Uri uri;
|
||||
//判断安卓版本小于10
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
||||
uri= FileProvider.getUriForFile(mContext,mContext.getPackageName()+".fileprovider",new File(item.getPath()));
|
||||
}else{
|
||||
uri=Uri.parse(item.getPath());
|
||||
uri = FileProvider.getUriForFile(mContext, mContext.getPackageName() + ".fileprovider", new File(item.getPath()));
|
||||
} else {
|
||||
uri = Uri.parse(item.getPath());
|
||||
}
|
||||
ImageMessage imageMessage = ImageMessage.obtain(uri, sendOrigin);
|
||||
Message message = Message.obtain(targetId, conversationType, imageMessage);
|
||||
|
@ -12,6 +12,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@ -25,9 +26,12 @@ import com.shayu.onetoone.event.MessageMsgBusEvent;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.yanzhenjie.recyclerview.OnItemMenuClickListener;
|
||||
import com.yanzhenjie.recyclerview.OnItemMenuStateListener;
|
||||
import com.yanzhenjie.recyclerview.SwipeMenu;
|
||||
import com.yanzhenjie.recyclerview.SwipeMenuBridge;
|
||||
import com.yanzhenjie.recyclerview.SwipeMenuCreator;
|
||||
import com.yanzhenjie.recyclerview.SwipeMenuItem;
|
||||
import com.yanzhenjie.recyclerview.SwipeMenuLayout;
|
||||
import com.yanzhenjie.recyclerview.SwipeMenuView;
|
||||
import com.yanzhenjie.recyclerview.SwipeRecyclerView;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
@ -108,16 +112,17 @@ public class MsgMessageFragment extends BaseFragment implements BaseAdapter.OnIt
|
||||
}
|
||||
|
||||
private class SwipeRunnable {
|
||||
private int menuPosition;
|
||||
private SwipeMenuBridge bridge;
|
||||
private int adapterPosition;
|
||||
|
||||
public SwipeRunnable(int menuPosition, int adapterPosition) {
|
||||
this.menuPosition = menuPosition;
|
||||
public SwipeRunnable(SwipeMenuBridge bridge, int adapterPosition) {
|
||||
this.bridge = bridge;
|
||||
this.adapterPosition = adapterPosition;
|
||||
}
|
||||
}
|
||||
|
||||
private SwipeRunnable swipeRunnable = null;
|
||||
SwipeMenuCreator creator;
|
||||
|
||||
@Override
|
||||
public void initView(View itemView) {
|
||||
@ -127,14 +132,16 @@ public class MsgMessageFragment extends BaseFragment implements BaseAdapter.OnIt
|
||||
mAdapter = new MsgMessageRecyclerViewAdapter(mList);
|
||||
list = new ArrayList<>();
|
||||
mList.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
||||
mList.setSwipeMenuCreator(initSwipeMenuCreator());
|
||||
creator = initSwipeMenuCreator();
|
||||
mList.setSwipeMenuCreator(creator);
|
||||
mList.setHasFixedSize(true);
|
||||
mList.setAutoMarginEnabled(true);
|
||||
mList.setOnItemMenuClickListener(new OnItemMenuClickListener() {
|
||||
@Override
|
||||
public void onItemClick(SwipeMenuBridge menuBridge, int adapterPosition) {
|
||||
swipeRunnable = new SwipeRunnable(menuBridge.getPosition(), adapterPosition);
|
||||
swipeRunnable = new SwipeRunnable(menuBridge, adapterPosition);
|
||||
menuBridge.closeMenu();
|
||||
|
||||
}
|
||||
});
|
||||
mList.setOnItemMenuStateListener(new OnItemMenuStateListener() {
|
||||
@ -144,11 +151,9 @@ public class MsgMessageFragment extends BaseFragment implements BaseAdapter.OnIt
|
||||
if (menuState == CLOSED && swipeRunnable != null) {
|
||||
mHandler.postDelayed(() -> {
|
||||
BaseUiConversation conversation = mAdapter.getData().get(swipeRunnable.adapterPosition);
|
||||
if (swipeRunnable.menuPosition == 0) {
|
||||
if (swipeRunnable.bridge.getPosition() == 0) {
|
||||
topItem(conversation, swipeRunnable.adapterPosition);
|
||||
top.setText(R.string.untop);
|
||||
} else {
|
||||
top.setText(R.string.top);
|
||||
removeItem(conversation, swipeRunnable.adapterPosition);
|
||||
}
|
||||
swipeRunnable = null;
|
||||
@ -353,6 +358,7 @@ public class MsgMessageFragment extends BaseFragment implements BaseAdapter.OnIt
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
initSystemNotice();
|
||||
updateUserInfo();
|
||||
if (this.mConversationListViewModel != null) {
|
||||
mConversationListViewModel.getConversationList(false, true, 0L);
|
||||
this.mConversationListViewModel.clearAllNotification();
|
||||
@ -504,15 +510,17 @@ public class MsgMessageFragment extends BaseFragment implements BaseAdapter.OnIt
|
||||
return false;
|
||||
}
|
||||
|
||||
SwipeMenuItem top=null;
|
||||
SwipeMenuItem del=null;
|
||||
private SwipeMenuCreator initSwipeMenuCreator() {
|
||||
SwipeMenuCreator creator = (leftMenu, rightMenu, position) -> {
|
||||
top = new SwipeMenuItem(getContext());
|
||||
del = new SwipeMenuItem(getContext());
|
||||
SwipeMenuItem top = new SwipeMenuItem(getContext());
|
||||
SwipeMenuItem del = new SwipeMenuItem(getContext());
|
||||
top.setBackgroundColor(Color.parseColor("#D9D9D9"));
|
||||
del.setBackgroundColor(Color.parseColor("#FE5268"));
|
||||
if(mAdapter.getItem(position).mCore.isTop()) {
|
||||
top.setText(R.string.untop);
|
||||
}else{
|
||||
top.setText(R.string.top);
|
||||
}
|
||||
del.setText(R.string.delete);
|
||||
top.setHeight(ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
top.setWidth(DpUtil.dp2px(71));
|
||||
@ -521,7 +529,6 @@ public class MsgMessageFragment extends BaseFragment implements BaseAdapter.OnIt
|
||||
|
||||
rightMenu.addMenuItem(top);
|
||||
rightMenu.addMenuItem(del);
|
||||
|
||||
};
|
||||
return creator;
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ public class CompleteActivity extends AbsOTOActivity {
|
||||
}
|
||||
|
||||
private void initCamera() {
|
||||
cameraUtil = new ProcessImageUtil(this, "${packageName}.fileprovider");
|
||||
cameraUtil = new ProcessImageUtil(this, getPackageName()+".fileprovider");
|
||||
cameraUtil.setImageResultCallback(new ImageResultCallback() {
|
||||
@Override
|
||||
public void beforeCamera() {
|
||||
|
@ -124,8 +124,8 @@ public class CallVideoActivity extends AbsOTOActivity {
|
||||
});
|
||||
}
|
||||
initButton(buttonView);
|
||||
if (!StringUtil.isEmpty(callId)) {
|
||||
CallClientManager.getManager().callVideo(callId);
|
||||
if (!StringUtil.isEmpty(targetId)) {
|
||||
CallClientManager.getManager().callVideo(targetId);
|
||||
initWaitView();
|
||||
}
|
||||
}
|
||||
@ -259,7 +259,7 @@ public class CallVideoActivity extends AbsOTOActivity {
|
||||
|
||||
private void accept() {
|
||||
callLayout.setVisibility(View.GONE);
|
||||
CallClientManager.getManager().acceptCall(targetId);
|
||||
CallClientManager.getManager().acceptCall(callId);
|
||||
}
|
||||
|
||||
private void closeCamera() {
|
||||
@ -464,17 +464,19 @@ public class CallVideoActivity extends AbsOTOActivity {
|
||||
targetView.addView(CallClientManager.getManager().getLocalVideo());
|
||||
myView.addView(buttonView);
|
||||
}
|
||||
|
||||
//
|
||||
@Override
|
||||
public void onCallEnd() {
|
||||
if(model.equals(CallClientManager.AUDIO_CALL) ||model.equals(CallClientManager.VIDEO_CALL)) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("model", CallClientManager.VIDEO_CALL);
|
||||
bundle.putString("targetId", targetId);
|
||||
bundle.putString("callId", targetId);
|
||||
bundle.putString("callId", callId);
|
||||
bundle.putString("user", JSONObject.toJSONString(userData));
|
||||
bundle.putString("time", callTime.getText().toString());
|
||||
bundle.putString("path", RouteManager.ACTIVITY_CALL_VIDEO);
|
||||
RouteManager.forwardActivity(RouteManager.ACTIVITY_END_CALL, bundle);
|
||||
}
|
||||
finish();
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ public class MsgMoreGreetConfigActivity extends AbsOTOActivity {
|
||||
});
|
||||
apply.setOnClickListener(v -> {
|
||||
adapter.notifyDataSetChanged();
|
||||
new Handler(Looper.getMainLooper()).postDelayed(this::save,100);
|
||||
new Handler(Looper.getMainLooper()).postDelayed(this::save, 100);
|
||||
});
|
||||
cancel.setOnClickListener(v -> clearGreet());
|
||||
recyclerView.setOnClickListener(v -> adapter.notifyDataSetChanged());
|
||||
@ -143,6 +143,8 @@ public class MsgMoreGreetConfigActivity extends AbsOTOActivity {
|
||||
}
|
||||
|
||||
private void clearGreet() {
|
||||
adapter.clear();
|
||||
((ImageView)findViewById(R.id.imageView5)).setImageResource(R.mipmap.ic_msg_more_config_add_image);
|
||||
OTONetManager.getInstance(mContext)
|
||||
.cleanMoreGreetConfig(new HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
@ -152,7 +154,7 @@ public class MsgMoreGreetConfigActivity extends AbsOTOActivity {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
// ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -191,12 +193,12 @@ public class MsgMoreGreetConfigActivity extends AbsOTOActivity {
|
||||
.getMessageMoreGreetConfig(new HttpCallback<List<GreetBean>>() {
|
||||
@Override
|
||||
public void onSuccess(List<GreetBean> data) {
|
||||
List<GreetBean> list=new ArrayList<>();
|
||||
List<GreetBean> list = new ArrayList<>();
|
||||
for (GreetBean item : data) {
|
||||
if(item.getType()==0){
|
||||
if (item.getType() == 0) {
|
||||
list.add(item);
|
||||
}else if(item.getType()==2){
|
||||
ImgLoader.display(mContext,item.getContent(), (ImageView) findViewById(R.id.imageView5));
|
||||
} else if (item.getType() == 2) {
|
||||
ImgLoader.display(mContext, item.getContent(), (ImageView) findViewById(R.id.imageView5));
|
||||
}
|
||||
}
|
||||
adapter.setList(list);
|
||||
|
@ -149,7 +149,7 @@ public class AuthActivity extends AbsActivity {
|
||||
}
|
||||
|
||||
private void initCamera() {
|
||||
cameraUtil = new ProcessImageUtil(this, "${packageName}.fileprovider");
|
||||
cameraUtil = new ProcessImageUtil(this, getPackageName()+".fileprovider");
|
||||
cameraUtil.setImageResultCallback(new ImageResultCallback() {
|
||||
@Override
|
||||
public void beforeCamera() {
|
||||
|
@ -172,7 +172,7 @@ public class AuthBloggerActivity extends AbsActivity {
|
||||
};
|
||||
|
||||
private void initCamera() {
|
||||
cameraUtil = new ProcessImageUtil(this, "${packageName}.fileprovider");
|
||||
cameraUtil = new ProcessImageUtil(this, getPackageName()+".fileprovider");
|
||||
cameraUtil.setImageResultCallback(new ImageResultCallback() {
|
||||
@Override
|
||||
public void beforeCamera() {
|
||||
|
@ -138,7 +138,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
}
|
||||
|
||||
private void initCamera() {
|
||||
cameraUtil = new ProcessImageUtil(this, "${packageName}.fileprovider");
|
||||
cameraUtil = new ProcessImageUtil(this, getPackageName()+".fileprovider");
|
||||
cameraUtil.setImageResultCallback(new ImageResultCallback() {
|
||||
@Override
|
||||
public void beforeCamera() {
|
||||
|
@ -148,7 +148,6 @@ public class HomeRecommendListAdapter extends RecyclerView.Adapter<HomeRecommend
|
||||
ToastUtil.showDebug("跳充值页面");
|
||||
}
|
||||
})
|
||||
.setCancelText(WordUtil.getNewString(R.string.money_cancel))
|
||||
.showDialog();
|
||||
} else {
|
||||
new TipsDialog(mContext)
|
||||
|
@ -2,6 +2,7 @@ package com.shayu.onetoone.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.Editable;
|
||||
import android.text.InputFilter;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
@ -80,6 +81,11 @@ public class MsgGreetConfigAdapter extends RecyclerView.Adapter<MsgGreetConfigAd
|
||||
notifyItemChanged(getItemCount() - 1);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
mList.clear();
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
private EditText editText;
|
||||
private View edit;
|
||||
@ -116,7 +122,7 @@ public class MsgGreetConfigAdapter extends RecyclerView.Adapter<MsgGreetConfigAd
|
||||
editText.setText(bean.getContent());
|
||||
editText.setEnabled(false);
|
||||
}
|
||||
|
||||
editText.setFilters(new InputFilter[]{new InputFilter.LengthFilter(50)});
|
||||
editText.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
|
@ -57,7 +57,7 @@ public class MsgMessageRecyclerViewAdapter extends ConversationListAdapter {
|
||||
List<BaseUiConversation> top = new ArrayList<>();
|
||||
List<BaseUiConversation> data2 = new ArrayList<>();
|
||||
for (BaseUiConversation datum : data) {
|
||||
System.out.println("接收到的Tid="+datum.mCore.getTargetId());
|
||||
System.out.println("接收到的Tid=" + datum.mCore.getTargetId());
|
||||
try {
|
||||
int parseInt = Integer.parseInt(datum.mCore.getTargetId());
|
||||
if (parseInt < 100) {
|
||||
@ -68,10 +68,10 @@ public class MsgMessageRecyclerViewAdapter extends ConversationListAdapter {
|
||||
continue;
|
||||
}
|
||||
if (datum.mCore.getConversationType() == Conversation.ConversationType.PRIVATE || datum.mCore.getConversationType() == Conversation.ConversationType.SYSTEM) {
|
||||
if(datum.mCore.getLatestMessage() instanceof MessageChatGiftContent){
|
||||
datum.mConversationContent=new SpannableString(WordUtil.getNewString(R.string.gift));
|
||||
}else if(datum.mCore.getLatestMessage() instanceof MessageChatAuthContent){
|
||||
datum.mConversationContent=new SpannableString(WordUtil.getNewString(R.string.authentication));
|
||||
if (datum.mCore.getLatestMessage() instanceof MessageChatGiftContent) {
|
||||
datum.mConversationContent = new SpannableString(WordUtil.getNewString(R.string.gift));
|
||||
} else if (datum.mCore.getLatestMessage() instanceof MessageChatAuthContent) {
|
||||
datum.mConversationContent = new SpannableString(WordUtil.getNewString(R.string.authentication));
|
||||
}
|
||||
if (datum.mCore.isTop()) {
|
||||
top.add(datum);
|
||||
@ -103,6 +103,10 @@ public class MsgMessageRecyclerViewAdapter extends ConversationListAdapter {
|
||||
return map.get(position);
|
||||
}
|
||||
|
||||
public BaseUiConversation getItem(int position) {
|
||||
return mDataList.get(position);
|
||||
}
|
||||
|
||||
private class ListComparator implements Comparator<BaseUiConversation> {
|
||||
|
||||
@Override
|
||||
|
@ -249,6 +249,7 @@ public class CallClientManager {
|
||||
Handler handler = new Handler(Looper.getMainLooper());
|
||||
|
||||
private String targetId;
|
||||
private String sessionId;
|
||||
private boolean isCallVideo = false;
|
||||
long warningTime;
|
||||
long activeTime;
|
||||
@ -259,6 +260,10 @@ public class CallClientManager {
|
||||
|
||||
@Override
|
||||
public boolean cancel() {
|
||||
if(sessionId.equals(targetId)){
|
||||
System.err.println("接听方不计费 结束");
|
||||
return super.cancel();
|
||||
}
|
||||
long time = getTime(activeTime);
|
||||
time = time % 10;
|
||||
if (time == 0) {
|
||||
@ -282,6 +287,7 @@ public class CallClientManager {
|
||||
}
|
||||
isCallVideo = callSession.getMediaType() == RongCallCommon.CallMediaType.VIDEO;
|
||||
activeTime = callSession.getActiveTime();
|
||||
sessionId=callSession.getCallerUserId();
|
||||
long time = getTime(activeTime);
|
||||
checkTime(time);
|
||||
String extra;
|
||||
@ -313,6 +319,13 @@ public class CallClientManager {
|
||||
if (StringUtil.isEmpty(targetId)) {
|
||||
return;
|
||||
}
|
||||
if(sessionId.equals(targetId)){
|
||||
System.err.println("接听方不计费");
|
||||
return;
|
||||
}
|
||||
if(time==0){
|
||||
return;
|
||||
}
|
||||
time = time % 10;
|
||||
if (time == 0) {
|
||||
time = 10;
|
||||
|
@ -253,9 +253,16 @@ public class OTONetManager {
|
||||
@Override
|
||||
public void accept(ResponseModel<BaseModel> model) throws Exception {
|
||||
if (callback != null) {
|
||||
if (model.isError()) {
|
||||
// {"ret":200,"data":{"code":0,"msg":"操作成功","info":[]},"msg":""}
|
||||
JSONObject json = model.getSrcJSONOBject();
|
||||
callback.onSuccess(new HttpCallbackModel(json.getJSONObject("data").getInteger("code"),
|
||||
json.getJSONObject("data").getString("msg")));
|
||||
} else {
|
||||
callback.onSuccess(new HttpCallbackModel(model.getData().getCode(), model.getData().getMsg()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
@ -457,7 +464,7 @@ public class OTONetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getTargetUserInfo(int toUid, HttpCallback<UserBean> callback) {
|
||||
public void getTargetUserInfo(long toUid, HttpCallback<UserBean> callback) {
|
||||
|
||||
API.get().otoApi(mContext)
|
||||
.getTargetUserInfo(toUid)
|
||||
@ -1401,11 +1408,11 @@ public class OTONetManager {
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(listResponseModel -> {
|
||||
if (listResponseModel.getData().getCode() == 0) {
|
||||
if(callback!=null) {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(new HttpCallbackModel(listResponseModel.getData().getCode(), listResponseModel.getData().getMsg()));
|
||||
}
|
||||
} else {
|
||||
if(callback!=null) {
|
||||
if (callback != null) {
|
||||
callback.onError(listResponseModel.getData().getMsg());
|
||||
}
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ public interface OneToOneApi {
|
||||
Observable<ResponseModel<List<OfficialNoticeBean>>> getLists();
|
||||
|
||||
@GET("/api/public/?service=Friendappinfos.getOtherInfo")
|
||||
Observable<ResponseModel<UserBean>> getTargetUserInfo(@Query("tuid") int id);
|
||||
Observable<ResponseModel<UserBean>> getTargetUserInfo(@Query("tuid") long id);
|
||||
|
||||
@GET("/api/public/?service=Friendappinfos.getOtherList")
|
||||
Observable<ResponseModel<List<TargetUserInfoBean>>> getTargetUserInfoList(@Query("ids") String ids);
|
||||
|
@ -123,6 +123,7 @@ public class MsgInputPanelForAudio extends AbsInputPanel {
|
||||
public void onSuccess(String token, SendConsumeBean bean) {
|
||||
super.onSuccess(token,bean);
|
||||
MsgInputPanelForAudio.this.token = token;
|
||||
ToastUtil.showDebug(token);
|
||||
isAudio = true;
|
||||
onDown(v, mLastTouchY);
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/rc_ext_toggle_voice1" android:state_pressed="true"/>
|
||||
<item android:drawable="@drawable/rc_ext_toggle_voice1"/>
|
||||
</selector>
|
@ -178,7 +178,7 @@
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:tag="all"
|
||||
android:text="@string/layout_screen_tip1"
|
||||
android:text="@string/layout_screen_tip2"
|
||||
android:textColor="@drawable/bg_home_search_text"
|
||||
android:textSize="14sp" />
|
||||
|
||||
|
@ -2,10 +2,10 @@
|
||||
<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="wrap_content"
|
||||
android:layout_width="256dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog_tip"
|
||||
android:minWidth="256dp"
|
||||
android:maxWidth="256dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -14,7 +14,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="19dp"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:layout_marginEnd="19dp"
|
||||
android:layout_marginTop="21dp"
|
||||
android:gravity="center"
|
||||
android:ellipsize="marquee"
|
||||
@ -33,14 +33,14 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="9dp"
|
||||
android:visibility="visible"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:gravity="center"
|
||||
tools:text="" />
|
||||
android:visibility="visible"
|
||||
tools:text="與TA語音聊天每分鐘續消耗999星幣您可通過充值獲取更多星幣以便繼續聊天" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
|
@ -266,4 +266,6 @@
|
||||
<string name="dialog_call_prop_apply">收下獎勵</string>
|
||||
<string name="toast_call_not_unlock">發送任意禮物后即可解鎖</string>
|
||||
<string name="gift_not_money">余额不足,请充值后再进行尝试吧~</string>
|
||||
<string name="end_of_the_call">通话结束</string>
|
||||
<string name="end_resume_call_not_auth">对方未完成真人认证,暂时无法向对方发起通话</string>
|
||||
</resources>
|
@ -266,4 +266,6 @@
|
||||
<string name="dialog_call_prop_apply">收下獎勵</string>
|
||||
<string name="toast_call_not_unlock">發送任意禮物后即可解鎖</string>
|
||||
<string name="gift_not_money">余额不足,请充值后再进行尝试吧~</string>
|
||||
<string name="end_of_the_call">通话结束</string>
|
||||
<string name="end_resume_call_not_auth">对方未完成真人认证,暂时无法向对方发起通话</string>
|
||||
</resources>
|
@ -114,10 +114,6 @@
|
||||
<string name="layout_auth_tips4">身份證背面</string>
|
||||
<string name="layout_auth_tips5">發起審核</string>
|
||||
|
||||
<string name="layout_auth_blogger_tips1">帶*為必填項,為保障您的利益,請如實填寫</string>
|
||||
<string name="layout_auth_blogger_tips2">性別</string>
|
||||
|
||||
|
||||
<string name="layout_auth_blogger_tips1">带*为必填项,為保障您的利益,請如實填寫</string>
|
||||
<string name="layout_auth_blogger_tips2">性别</string>
|
||||
<string name="layout_auth_blogger_tips3">男</string>
|
||||
@ -273,5 +269,5 @@
|
||||
<string name="toast_call_not_unlock">發送任意禮物后即可解鎖</string>
|
||||
<string name="gift_not_money">余额不足,请充值后再进行尝试吧~</string>
|
||||
<string name="end_of_the_call">通话结束</string>
|
||||
<string name="gift_not_money">餘額不足,請充值后再進行嘗試吧~</string>
|
||||
<string name="end_resume_call_not_auth">对方未完成真人认证,暂时无法向对方发起通话</string>
|
||||
</resources>
|
@ -22,6 +22,6 @@ android.enableJetifier=true
|
||||
|
||||
systemProp.http.proxyHost=127.0.0.1
|
||||
systemProp.https.proxyHost=127.0.0.1
|
||||
systemProp.https.proxyPort=49957
|
||||
systemProp.http.proxyPort=49957
|
||||
systemProp.https.proxyPort=10809
|
||||
systemProp.http.proxyPort=10809
|
||||
#android.enableR8.fullMode=true
|
@ -13,7 +13,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginBottom="6.5dp"
|
||||
android:src="@drawable/rc_ext_toggle_voice1"
|
||||
android:src="@drawable/rc_ext_toggle_voice"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user