Toast when no app can be found matching id

This commit is contained in:
Daniel Martí 2013-08-02 23:33:11 +02:00
parent e04a9f9682
commit 8325d2256a
2 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,7 @@
<string name="app_name">F-Droid</string>
<string name="search_results">Search Results</string>
<string name="app_details">App Details</string>
<string name="no_such_app">No matching app was found in the database.</string>
<string name="about_title">About F-Droid</string>
<string name="about_desc">Originally based on Aptoide.\nReleased under the

View File

@ -324,6 +324,9 @@ public class AppDetails extends ListActivity {
}
}
if (app == null) {
Toast toast = Toast.makeText(this,
getString(R.string.no_such_app), Toast.LENGTH_LONG);
toast.show();
finish();
return false;
}