update 完善资料
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class FirstLoginBean extends BaseModel{
|
||||
@SerializedName("status")
|
||||
int status;//0是第一次登陸,1是已經登錄過的
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import com.yunbao.common.bean.FaceBookUpModel;
|
||||
import com.yunbao.common.bean.FansCheckRed;
|
||||
import com.yunbao.common.bean.FansGroupGiftPack;
|
||||
import com.yunbao.common.bean.FansGroupGiftPackInfo;
|
||||
import com.yunbao.common.bean.FirstLoginBean;
|
||||
import com.yunbao.common.bean.GiftAlreadyWallModel;
|
||||
import com.yunbao.common.bean.GiftGuideModel;
|
||||
import com.yunbao.common.bean.GiftNamingInfoModel;
|
||||
@@ -1288,4 +1289,7 @@ public interface PDLiveApi {
|
||||
Observable<ResponseModel<List<BaseModel>>> setHobby(
|
||||
@Query("labels") String labelsId
|
||||
);
|
||||
@GET("/api/public/?service=Pdlinfos.getIsSet")
|
||||
Observable<ResponseModel<FirstLoginBean>> isFirstLogin(
|
||||
);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.yunbao.common.bean.EnterRoomNewModel;
|
||||
import com.yunbao.common.bean.FansCheckRed;
|
||||
import com.yunbao.common.bean.FansGroupGiftPack;
|
||||
import com.yunbao.common.bean.FansGroupGiftPackInfo;
|
||||
import com.yunbao.common.bean.FirstLoginBean;
|
||||
import com.yunbao.common.bean.GiftAlreadyWallModel;
|
||||
import com.yunbao.common.bean.GiftGuideModel;
|
||||
import com.yunbao.common.bean.GiftNamingInfoModel;
|
||||
@@ -3477,6 +3478,25 @@ public class LiveNetManager {
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
public void isFirstLogin(HttpCallback<FirstLoginBean> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.isFirstLogin()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(roomMicStatusModelResponseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(roomMicStatusModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
private MultipartBody.Part createUploadFile(File file) {
|
||||
RequestBody requestBody = RequestBody.create(MediaType.parse("multipart/form-data"), file);
|
||||
return MultipartBody.Part.createFormData("file", file.getName(), requestBody);
|
||||
|
||||
@@ -13,6 +13,7 @@ import java.util.List;
|
||||
public class MessageChatNotifyManager {
|
||||
private static MessageChatNotifyManager instance;
|
||||
private List<MessageUserInfoBean> startListNotifyList = new ArrayList<>();
|
||||
Class<?> clazz;
|
||||
|
||||
public static MessageChatNotifyManager getInstance() {
|
||||
if (instance == null) {
|
||||
@@ -21,6 +22,10 @@ public class MessageChatNotifyManager {
|
||||
return instance;
|
||||
}
|
||||
|
||||
public void setShieldClass(Class<?> clazz) {
|
||||
this.clazz = clazz;
|
||||
}
|
||||
|
||||
public void push(Context mContext, MessageUserInfoBean userInfo) {
|
||||
if (startListNotifyList.isEmpty()) {
|
||||
startListNotifyList.add(userInfo);
|
||||
@@ -31,6 +36,10 @@ public class MessageChatNotifyManager {
|
||||
}
|
||||
|
||||
private void notifyLiveFlot(Context mContext) {
|
||||
if (AppManager.getInstance().getLastActivity().getClass().getSimpleName().equals(clazz.getSimpleName())) {
|
||||
ToastUtil.showDebug("屏蔽类,不展示");
|
||||
return;
|
||||
}
|
||||
if (startListNotifyList.iterator().hasNext()) {
|
||||
MessageUserInfoBean bean = startListNotifyList.iterator().next();
|
||||
new MessageChatNotifyDialog(AppManager.getInstance().getLastActivity(), bean).setOnDismissListener(dialog -> {
|
||||
|
||||
Reference in New Issue
Block a user