82 fix bugs,网络请求timeout=30。隐藏init chat failed 弹窗。
This commit is contained in:
@@ -846,6 +846,7 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
||||
@Override
|
||||
public void getThemeData(ThemeBean themeBean) {
|
||||
if (themeBean != null) {
|
||||
// 首页 tab 图标
|
||||
selectedMediaUrl = themeBean.getHome_sel();
|
||||
unselectedMediaUrl = themeBean.getHome_nor();
|
||||
|
||||
|
||||
@@ -3488,7 +3488,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
override fun onNext() {
|
||||
// ToastUtils.showShort("下一首");
|
||||
// 切换歌曲
|
||||
// List<Music> musicSongBeans = AgoraManager.getInstance(RoomActivity.this).getMusicList();
|
||||
// List<Music> musicSongBeans = AgoraManager.getInstance(RoomActivity.this).getMusicList();
|
||||
AgoraManager.getInstance().nextSong()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -7,22 +7,27 @@ import com.xscm.modulemain.activity.room.contacts.RoomBackgroundContacts;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.RoomBgBean;
|
||||
import com.xscm.moduleutil.http.BaseObserver;
|
||||
import com.xscm.moduleutil.http.RetrofitClient;
|
||||
import com.xscm.moduleutil.presenter.BasePresenter;
|
||||
import com.xscm.moduleutil.utils.cos.CosUploadManager;
|
||||
import com.xscm.moduleutil.utils.oss.OSSOperUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class RoomBackgroundPresenter extends BasePresenter<RoomBackgroundContacts.View> implements RoomBackgroundContacts.RoomBackgroudPre {
|
||||
|
||||
private RoomBackgroundContacts.View mView;
|
||||
public RoomBackgroundPresenter(RoomBackgroundContacts.View view, Context context) {
|
||||
super(view, context);
|
||||
mView = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBackgroundList() {
|
||||
api.getBackgroundList(new BaseObserver<RoomBgBean>() {
|
||||
RetrofitClient.getInstance().getBackgroundList(new BaseObserver<RoomBgBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
@@ -30,6 +35,9 @@ public class RoomBackgroundPresenter extends BasePresenter<RoomBackgroundContact
|
||||
|
||||
@Override
|
||||
public void onNext(RoomBgBean roomBgBeans) {
|
||||
if (MvpRef == null){
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().getBackgroundList(roomBgBeans);
|
||||
}
|
||||
});
|
||||
@@ -42,6 +50,9 @@ public class RoomBackgroundPresenter extends BasePresenter<RoomBackgroundContact
|
||||
@Override
|
||||
public void onSuccess(String url) {
|
||||
if (isViewAttach()) {
|
||||
if (MvpRef == null){
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().upLoadSuccess(url, type, index, size);
|
||||
}
|
||||
|
||||
@@ -58,26 +69,11 @@ public class RoomBackgroundPresenter extends BasePresenter<RoomBackgroundContact
|
||||
MvpRef.get().disLoadings();
|
||||
}
|
||||
});
|
||||
// OSSOperUtils.newInstance().putObjectMethod(url, file.getPath(), new OSSOperUtils.OssCallback() {
|
||||
// @Override
|
||||
// public void onSuccess() {
|
||||
// if (isViewAttach()) {
|
||||
// MvpRef.get().upLoadSuccess(OSSOperUtils.AliYunOSSURLFile + url, type, index, size);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFail() {
|
||||
// if (isViewAttach()) {
|
||||
// MvpRef.get().disLoadings();
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadBgImage(String id, String image_url) {
|
||||
api.uploadBgImage(id, image_url, new BaseObserver<String>() {
|
||||
RetrofitClient.getInstance().uploadBgImage(id, image_url, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
@@ -85,6 +81,9 @@ public class RoomBackgroundPresenter extends BasePresenter<RoomBackgroundContact
|
||||
|
||||
@Override
|
||||
public void onNext(String string) {
|
||||
if (MvpRef == null){
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().uploadBgImage();
|
||||
}
|
||||
});
|
||||
@@ -92,7 +91,7 @@ public class RoomBackgroundPresenter extends BasePresenter<RoomBackgroundContact
|
||||
|
||||
@Override
|
||||
public void editRoom(String room_id, String room_name, String room_cover, String room_intro, String room_background) {
|
||||
api.editRoom(room_id, room_name, room_cover, room_intro, room_background, new BaseObserver<String>() {
|
||||
RetrofitClient.getInstance().editRoom(room_id, room_name, room_cover, room_intro, room_background, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
@@ -100,6 +99,9 @@ public class RoomBackgroundPresenter extends BasePresenter<RoomBackgroundContact
|
||||
|
||||
@Override
|
||||
public void onNext(String string) {
|
||||
if (MvpRef == null){
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().editRoom();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user