调整关注逻辑
This commit is contained in:
parent
68140c8a3a
commit
c594364574
@ -587,4 +587,9 @@ public class JavascriptInterfaceUtils {
|
||||
}
|
||||
});
|
||||
}
|
||||
@JavascriptInterface
|
||||
public void androidCancelAnchorAttention(){
|
||||
Bus.get().post(new JavascriptInterfaceEvent()
|
||||
.setMethod("androidCancelAnchorAttention"));
|
||||
}
|
||||
}
|
||||
|
@ -752,6 +752,12 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
if (manager != null) {
|
||||
manager.onResume();
|
||||
}
|
||||
if (manager != null && !StringUtil.isEmpty(is_fans)) {
|
||||
if (is_fans.equals("-2")) {
|
||||
manager.setAttention(0);
|
||||
is_fans = "2";
|
||||
}
|
||||
}
|
||||
GiftCacheUtil.getInstance().restart();
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,7 @@ import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.ActivityResultCallback;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.interfaces.ImageResultCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
@ -50,8 +51,11 @@ import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.MicStatusManager;
|
||||
import com.yunbao.common.utils.ProcessImageUtil;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
import com.yunbao.live.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||
@ -261,7 +265,7 @@ public class MyWebViewActivity extends AbsActivity {
|
||||
}
|
||||
if (!"".endsWith(Constants.mStream)) {
|
||||
finish();
|
||||
if(MicStatusManager.getInstance().isMic(liveUid)){
|
||||
if (MicStatusManager.getInstance().isMic(liveUid)) {
|
||||
MicStatusManager.getInstance().showDownMicDialog(mContext);
|
||||
return;
|
||||
}
|
||||
@ -355,7 +359,7 @@ public class MyWebViewActivity extends AbsActivity {
|
||||
intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
|
||||
}
|
||||
intent.setType("image/*");
|
||||
startActivityForResult(Intent.createChooser(intent,mContext.getString(R.string.choose_flie)), CHOOSE);
|
||||
startActivityForResult(Intent.createChooser(intent, mContext.getString(R.string.choose_flie)), CHOOSE);
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
@ -585,9 +589,15 @@ public class MyWebViewActivity extends AbsActivity {
|
||||
} else if (TextUtils.equals(event.getMethod(), "androidCommunityShare")) {
|
||||
JSONObject json = JSONObject.parseObject(event.getData());
|
||||
new SharePopDialog(mContext)
|
||||
.setShareLink(CommonAppConfig.HOST+json.getString("link"))
|
||||
.setShareLink(CommonAppConfig.HOST + json.getString("link"))
|
||||
.setAnchorAvatar(json.getString("avatar"))
|
||||
.showDialog();
|
||||
} else if (TextUtils.equals(event.getMethod(), "androidCancelAnchorAttention")) {
|
||||
if (!StringUtil.isEmpty(LiveAudienceActivity.is_fans)) {
|
||||
LiveAudienceActivity.is_fans = "-2";
|
||||
LiveRoomViewHolder.setFansNum( LiveAudienceActivity.fansNum - 1);
|
||||
IMLoginManager.get(mContext).upDataUserInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user