Browse Source

Update status while publishing tweet

Carsten Porth 5 years ago
parent
commit
bdcb73eec5
1 changed files with 4 additions and 1 deletions
  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,