fix:修复动态上传失败后非主线程更新UI问题
This commit is contained in:
@@ -68,6 +68,7 @@ public class PublishPresenter extends BaseMvpPresenter<IPublishView> {
|
||||
public void acceptThrowable(String s, Throwable throwable) {
|
||||
super.acceptThrowable(s, throwable);
|
||||
if (throwable != null) {
|
||||
throwable.printStackTrace();
|
||||
dealUploadFileError(throwable);
|
||||
} else {
|
||||
if (getMvpView() != null) {
|
||||
@@ -134,11 +135,13 @@ public class PublishPresenter extends BaseMvpPresenter<IPublishView> {
|
||||
.flatMap((Function<String, SingleSource<String>>)
|
||||
path -> FileModel.get().uploadFile(path))
|
||||
.compose(bindUntilEvent(PresenterEvent.DESTROY))
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new DontWarnObserver<String>() {
|
||||
@Override
|
||||
public void acceptThrowable(String url, Throwable throwable) {
|
||||
super.acceptThrowable(url, throwable);
|
||||
if (throwable != null) {
|
||||
throwable.printStackTrace();
|
||||
if (mImageUploadSubscribe != null) {
|
||||
mImageUploadSubscribe.dispose();
|
||||
}
|
||||
|
@@ -31,8 +31,8 @@ COMPILE_SDK_VERSION=33
|
||||
MIN_SDK_VERSION=21
|
||||
TARGET_SDK_VERSION=33
|
||||
|
||||
version_name=2.6.5
|
||||
version_code=2605
|
||||
version_name=2.6.6
|
||||
version_code=2606
|
||||
|
||||
#systemProp.https.proxyHost=127.0.0.1
|
||||
#systemProp.https.proxyPort=7890
|
Reference in New Issue
Block a user