Преглед на файлове

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,