Skip to content

Commit

Permalink
Hide toast notification for keypair generation on release builds (close
Browse files Browse the repository at this point in the history
#281)

Signed-off-by: Daniele Ricci <[email protected]>
  • Loading branch information
daniele-athome committed Jan 24, 2015
1 parent dcb4d9f commit 567a59b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions app/src/main/java/org/kontalk/ui/ConversationList.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

package org.kontalk.ui;

import org.kontalk.BuildConfig;
import org.kontalk.R;
import org.kontalk.authenticator.Authenticator;
import org.kontalk.authenticator.LegacyAuthentication;
Expand Down Expand Up @@ -127,8 +128,10 @@ private void askForPersonalName() {
DialogInterface.OnClickListener okListener = new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// no key pair found, generate a new one
Toast.makeText(ConversationList.this,
R.string.msg_generating_keypair, Toast.LENGTH_LONG).show();
if (BuildConfig.DEBUG) {
Toast.makeText(ConversationList.this,
R.string.msg_generating_keypair, Toast.LENGTH_LONG).show();
}

String name = InputDialog
.getInputText((Dialog) dialog)
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/kontalk/ui/NumberValidation.java
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public void run(PersonalKey key) {
}

// no key, key pair generation started
else {
else if (BuildConfig.DEBUG) {
Toast.makeText(NumberValidation.this,
R.string.msg_generating_keypair,
Toast.LENGTH_LONG).show();
Expand Down

0 comments on commit 567a59b

Please sign in to comment.