换麦不清除魅力值
This commit is contained in:
@@ -62,16 +62,16 @@ public class GiftValueDialogUiHelper {
|
||||
|
||||
public boolean isNeedConfirmDialog(int type) {
|
||||
if (type == TYPE_CLOSE_SHOW_GIFT_VALUE) {
|
||||
Boolean value = (Boolean) SharedPreferenceUtils.get(KEY_NEED_DIALOG_WHEN_CLOSE_GIFT_VALUE_MODEL, true);
|
||||
Boolean value = (Boolean) SharedPreferenceUtils.get(KEY_NEED_DIALOG_WHEN_CLOSE_GIFT_VALUE_MODEL, false);
|
||||
return value != null && value;
|
||||
} else if (type == TYPE_DOWN_MIC) {
|
||||
Boolean value = (Boolean) SharedPreferenceUtils.get(KEY_DOWN_MIC_NEED_DIALOG_TIPS, true);
|
||||
Boolean value = (Boolean) SharedPreferenceUtils.get(KEY_DOWN_MIC_NEED_DIALOG_TIPS, false);
|
||||
return value != null && value;
|
||||
} else if (type == TYPE_KICK_DOWN_MIC) {
|
||||
Boolean value = (Boolean) SharedPreferenceUtils.get(KEY_KICK_DOWN_MIC_NEED_DIALOG_TIPS, true);
|
||||
Boolean value = (Boolean) SharedPreferenceUtils.get(KEY_KICK_DOWN_MIC_NEED_DIALOG_TIPS, false);
|
||||
return value != null && value;
|
||||
} else if (type == TYPE_CHANGE_MIC) {
|
||||
Boolean value = (Boolean) SharedPreferenceUtils.get(KEY_CHANGE_MIC_NEED_DIALOG_TIPS, true);
|
||||
Boolean value = (Boolean) SharedPreferenceUtils.get(KEY_CHANGE_MIC_NEED_DIALOG_TIPS, false);
|
||||
return value != null && value;
|
||||
}
|
||||
return true;
|
||||
|
@@ -70,7 +70,7 @@ public class UserModifyPhotosActivity extends TakePhotoActivity implements UserM
|
||||
private void initView() {
|
||||
initTitleBar("我的相册");
|
||||
TitleBar titleBar = findViewById(R.id.title_bar);
|
||||
titleBar.addAction(new TitleBar.TextAction("编辑") {
|
||||
titleBar.addAction(new TitleBar.TextAction("编辑",getResources().getColor(R.color.color_666666)) {
|
||||
@Override
|
||||
public void performAction(View view) {
|
||||
notifyEditMode();
|
||||
|
@@ -195,6 +195,9 @@ public class SquareDynamicFragment extends BaseMvpFragment<IMiniWorldCategoryVie
|
||||
new ShareDynamicHelper(getActivity()).share(bean);
|
||||
} else if (view.getId() == R.id.iv_in_room){
|
||||
// openRoom(bean.getUid());
|
||||
if (bean.getInRoomUid() == null){
|
||||
return;
|
||||
}
|
||||
AVRoomActivity.start(mContext,bean.getInRoomUid());
|
||||
}
|
||||
});
|
||||
|
@@ -120,7 +120,7 @@ public class SquareDynamicAdapter extends BaseQuickAdapter<WorldDynamicBean, Bas
|
||||
|
||||
DynamicNickDetailWidget widget = helper.getView(R.id.widget_nick_detail);
|
||||
widget.setData(item);
|
||||
helper.setGone(R.id.iv_in_room, item.getInRoomUid() == null);
|
||||
helper.setVisible(R.id.iv_in_room, item.getInRoomUid() != null);
|
||||
//时间
|
||||
helper.setText(R.id.tv_time, TimeUiUtils.getDynamicUi(item.getPublishTime()));
|
||||
//关注才显示时间
|
||||
|
@@ -6,11 +6,14 @@ import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.base.BaseModel;
|
||||
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.room.giftvalue.bean.IndexGiftValue;
|
||||
import com.yizhuan.xchat_android_core.room.giftvalue.bean.RoomGiftValue;
|
||||
import com.yizhuan.xchat_android_core.utils.net.RxHelper;
|
||||
import com.yizhuan.xchat_android_library.net.rxnet.RxNet;
|
||||
import com.yizhuan.xchat_android_library.utils.JavaUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.Single;
|
||||
import retrofit2.http.DELETE;
|
||||
import retrofit2.http.Field;
|
||||
@@ -61,10 +64,10 @@ public class GiftValueModel extends BaseModel implements IGiftValueModel {
|
||||
* 上麦 更新缓存
|
||||
*/
|
||||
@Override
|
||||
public Single<String> upMic(long micUid, int position) {
|
||||
public Single<RoomGiftValue> upMic(long micUid, int position) {
|
||||
return api.upMic(AvRoomDataManager.get().getRoomUid(),
|
||||
micUid, position,AvRoomDataManager.get().isShowGiftValue())
|
||||
.compose(RxHelper.handleIgnoreData());
|
||||
.compose(RxHelper.handleBeanData());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -117,10 +120,10 @@ public class GiftValueModel extends BaseModel implements IGiftValueModel {
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/room/gift/value/up/mic")
|
||||
Single<ServiceResult<JsonElement>> upMic(@Field("roomUid") long roomUid,
|
||||
@Field("micUid") long micUid,
|
||||
@Field("position") int position,
|
||||
@Field("showGiftValue") boolean showGiftValue);
|
||||
Single<ServiceResult<RoomGiftValue>> upMic(@Field("roomUid") long roomUid,
|
||||
@Field("micUid") long micUid,
|
||||
@Field("position") int position,
|
||||
@Field("showGiftValue") boolean showGiftValue);
|
||||
|
||||
/**
|
||||
* 下麦,通知缓存变更
|
||||
|
@@ -1,7 +1,10 @@
|
||||
package com.yizhuan.xchat_android_core.room.giftvalue;
|
||||
|
||||
import com.yizhuan.xchat_android_core.room.giftvalue.bean.IndexGiftValue;
|
||||
import com.yizhuan.xchat_android_core.room.giftvalue.bean.RoomGiftValue;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.Single;
|
||||
|
||||
/**
|
||||
@@ -20,7 +23,7 @@ public interface IGiftValueModel {
|
||||
/**
|
||||
* 上麦 更新缓存
|
||||
*/
|
||||
Single<String> upMic(long micUid, int position);
|
||||
Single<RoomGiftValue> upMic(long micUid, int position);
|
||||
|
||||
/**
|
||||
* 下麦 更新缓存
|
||||
|
@@ -245,7 +245,14 @@ public class GiftValueMrg {
|
||||
|
||||
public void requestUpMic(int micPosition, String upMicUid) {
|
||||
if (!TextUtils.isEmpty(upMicUid)) {
|
||||
GiftValueModel.get().upMic(JavaUtil.str2long(upMicUid), micPosition).subscribe();
|
||||
GiftValueModel.get().upMic(JavaUtil.str2long(upMicUid), micPosition) .subscribe(new DontWarnObserver<RoomGiftValue>() {
|
||||
@Override
|
||||
public void acceptThrowable(RoomGiftValue values, Throwable throwable) {
|
||||
super.acceptThrowable(values, throwable);
|
||||
sendRoomGiftValueMsg(values);
|
||||
updateAllMicGiftValueByMsg(values);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user