Skip to content

Commit

Permalink
silence unnecessary toasts (Internal Error, Login sucessfull)
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Bürkle committed Feb 15, 2016
1 parent c73faa8 commit b144e83
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ public class ExceptionBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
String message = intent.getStringExtra(EXTRA_MESSAGE);
if (message == null) {
message = context.getString(R.string.exc_internal_error);
// if (message == null) {
// message = context.getString(R.string.exc_internal_error);
// }
if(message != null){
Toast.makeText(context, message, Toast.LENGTH_LONG).show();
}
Toast.makeText(context, message, Toast.LENGTH_LONG).show();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;

import com.inovex.zabbixmobile.OnSettingsMigratedReceiver;
import com.inovex.zabbixmobile.R;
Expand Down Expand Up @@ -581,9 +580,9 @@ public void onLoginFinished(boolean success, boolean showToast) {
}
}
if (success) {
if (showToast)
Toast.makeText(this, R.string.zabbix_login_successful,
Toast.LENGTH_LONG).show();
// if (showToast)
// Toast.makeText(this, R.string.zabbix_login_successful,
// Toast.LENGTH_LONG).show();
loadData();
}
}
Expand Down

0 comments on commit b144e83

Please sign in to comment.