More notice that account is disconnected

Stephen Paul Weber created

https://soprani.ca/todo/383

Change summary

src/main/java/eu/siacs/conversations/ui/ConversationFragment.java | 4 +
src/main/res/values/strings.xml                                   | 2 
2 files changed, 6 insertions(+)

Detailed changes

src/main/java/eu/siacs/conversations/ui/ConversationFragment.java 🔗

@@ -3733,6 +3733,10 @@ public class ConversationFragment extends XmppFragment
             showSnackbar(R.string.this_account_is_logged_out,R.string.log_in,this.mEnableAccountListener);
         } else if (conversation.isBlocked()) {
             showSnackbar(R.string.contact_blocked, R.string.unblock, this.mUnblockClickListener);
+        } else if (account.getStatus() == Account.State.CONNECTING) {
+            showSnackbar(R.string.this_account_is_connecting, 0, null);
+        } else if (account.getStatus() != Account.State.ONLINE) {
+            showSnackbar(R.string.this_account_is_offline, 0, null);
         } else if (contact != null
                 && !contact.showInRoster()
                 && contact.getOption(Contact.Options.PENDING_SUBSCRIPTION_REQUEST)) {

src/main/res/values/strings.xml 🔗

@@ -542,6 +542,8 @@
     <string name="no_keys_just_confirm">You have already trusted this persons fingerprint. By selecting “Done” you are just confirming that %s is part of this group chat.</string>
     <string name="this_account_is_disabled">You have disabled this account</string>
     <string name="this_account_is_logged_out">You have logged out of this account</string>
+    <string name="this_account_is_connecting">This account is connecting…</string>
+    <string name="this_account_is_offline">This account is not connected, messages will send once it reconnects</string>
     <string name="security_error_invalid_file_access">Security error: Invalid file access!</string>
     <string name="no_application_to_share_uri">No app found to share URI</string>
     <string name="share_uri_with">Share URI with…</string>