Преглед изворни кода

Update status while publishing tweet

Carsten Porth пре 5 година
родитељ
комит
bdcb73eec5
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      app/src/pages/write-tweet/write-tweet.ts

+ 4 - 1
app/src/pages/write-tweet/write-tweet.ts

@@ -68,22 +68,25 @@ export class WriteTweetPage {
     loading.present();
 
     if (this.tweet.value.p2p) {
+      loading.setContent("Validate keys...");
       if (
         (await this.cryptoUtils.isPrivateKeySet()) &&
         (await this.cryptoUtils.isPublicKeyPublished())
       ) {
+        loading.setContent("Publish private tweet...");
         await this.tweetPrivate();
       } else {
+        loading.dismiss();
         const alert = this.alertCtrl.create({
           title: "Oooops...",
           message:
             "Please verify that you have set a private and public key in the settings and that your latest public key was published."
         });
-        loading.dismiss();
         alert.present();
         return;
       }
     } else {
+      loading.setContent("Publish on Twitter...");
       await this.twitter.tweet(
         this.tweet.value["text"],
         this.retweet,