Improve error messages, prevent duplicate information display.

Fixes #1144
This commit is contained in:
darken 2018-12-12 14:08:11 +01:00
parent eb651c9996
commit 1ea4d0a330

View File

@ -447,7 +447,8 @@ public class AppDetails2 extends AppCompatActivity
if (TextUtils.isEmpty(newStatus.errorText)) { if (TextUtils.isEmpty(newStatus.errorText)) {
Toast.makeText(this, R.string.details_notinstalled, Toast.LENGTH_LONG).show(); Toast.makeText(this, R.string.details_notinstalled, Toast.LENGTH_LONG).show();
} else { } else {
String msg = newStatus.errorText + " " + newStatus.getUniqueKey(); String msg = newStatus.errorText;
if (!newStatus.getUniqueKey().equals(msg)) msg += " " + newStatus.getUniqueKey();
Toast.makeText(this, R.string.download_error, Toast.LENGTH_SHORT).show(); Toast.makeText(this, R.string.download_error, Toast.LENGTH_SHORT).show();
Toast.makeText(this, msg, Toast.LENGTH_LONG).show(); Toast.makeText(this, msg, Toast.LENGTH_LONG).show();
} }