diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-03-31 16:46:31 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-03-31 16:46:31 +0200 |
commit | a539271df66a6c519f995e693c3414516f600f66 (patch) | |
tree | a23118f83196c324e7b9cc2f83da1e9a03b2c9d2 /src/main/java/de/pixart/messenger/ui/ConversationActivity.java | |
parent | ea7aa63bb951ce8680d28a131f4f7230076708ef (diff) |
some menu fixes
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationActivity.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java index 0f6994b21..b80469649 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java @@ -433,6 +433,19 @@ public class ConversationActivity extends XmppActivity implements OnConversation case R.id.action_scan_qr_code: UriHandlerActivity.scan(this); return true; + case R.id.action_check_updates: + if (xmppConnectionService.hasInternetConnection()) { + if (!installFromUnknownSourceAllowed() && !xmppConnectionService.installedFromPlayStore()) { + openInstallFromUnknownSourcesDialogIfNeeded(); + } else { + UpdateService task = new UpdateService(this, xmppConnectionService.installedFromPlayStore()); + task.executeOnExecutor(UpdateService.THREAD_POOL_EXECUTOR, "true"); + Log.d(Config.LOGTAG, "AppUpdater started"); + } + } else { + Toast.makeText(this, R.string.account_status_no_internet, Toast.LENGTH_LONG).show(); + } + break; } return super.onOptionsItemSelected(item); } |