Selaa lähdekoodia

Show error msg when upload video failed

Wayne 6 vuotta sitten
vanhempi
commit
585980d00f

+ 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()
                                 })