Merge branch 'pr-1144' into 'master'

Improve error messages, prevent duplicate information display.

Closes #1144

See merge request fdroid/fdroidclient!764
This commit is contained in:
Hans-Christoph Steiner 2018-12-12 19:45:15 +00:00
commit ea9697b48e

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();
} }