浏览代码

Show error msg when upload video failed

Wayne 6 年之前
父节点
当前提交
585980d00f
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      src/main/java/com/bomostory/sceneeditmodule/screen/movie/MovieEditActivity.kt

+ 7 - 1
src/main/java/com/bomostory/sceneeditmodule/screen/movie/MovieEditActivity.kt

@@ -390,7 +390,13 @@ class MovieEditActivity : AppCompatActivity(),
                                 .doOnSubscribe { pd.show() }
                                 .doFinally { pd.dismiss() }
                                 .subscribe({
-                                    Toast.makeText(this@MovieEditActivity, R.string.share_dialog_upload_suc, Toast.LENGTH_SHORT).show()
+                                    val context = this@MovieEditActivity
+                                    when (it.errorCode) {
+                                        4013 -> Toast.makeText(context, R.string.share_dialog_upload_failed, Toast.LENGTH_SHORT).show()
+                                        else -> {
+                                            Toast.makeText(context, R.string.share_dialog_upload_suc, Toast.LENGTH_SHORT).show()
+                                        }
+                                    }
                                 }, {
                                     Toast.makeText(this@MovieEditActivity, R.string.share_dialog_upload_failed, Toast.LENGTH_SHORT).show()
                                 })