diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationActivity.java | 5 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/XmppActivity.java | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java index 4ee5aab59..c1b9574ba 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java @@ -1462,7 +1462,10 @@ public class ConversationActivity extends XmppActivity } if (xmppConnectionService.getAccounts().size() != 0) { - AppUpdate(); + if (xmppConnectionService.hasInternetConnection()) { + if (xmppConnectionService.isWIFI() || (xmppConnectionService.isMobile() && !xmppConnectionService.isMobileRoaming())) + AppUpdate(); + } } if (this.mPostponedActivityResult != null) { diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java index 35d4c8219..1e011de8c 100644 --- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java +++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java @@ -396,7 +396,11 @@ public abstract class XmppActivity extends Activity { startActivity(new Intent(this, SettingsActivity.class)); break; case R.id.action_check_updates: - startActivity(new Intent(this, UpdaterActivity.class)); + if (xmppConnectionService.hasInternetConnection()) { + startActivity(new Intent(this, UpdaterActivity.class)); + } else { + Toast.makeText(this, R.string.account_status_no_internet, Toast.LENGTH_LONG).show(); + } break; case R.id.action_accounts: final Intent intent = new Intent(getApplicationContext(), EditAccountActivity.class); |