Forráskód Böngészése

Update status while publishing tweet

Carsten Porth 5 éve
szülő
commit
bdcb73eec5
1 módosított fájl, 4 hozzáadás és 1 törlés
  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,