Merge pull request #8583 from osmandapp/minor_fixes

Fix free plugins availability
This commit is contained in:
vshcherb 2020-02-28 13:38:12 +02:00 committed by GitHub
commit c01ff29b95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -294,7 +294,7 @@ public abstract class OsmandPlugin {
}
protected boolean pluginAvailable(OsmandApplication app) {
return checkPluginPackage(app, this);
return checkPluginPackage(app, this) || !isPaid();
}
public static boolean checkPluginPackage(@NonNull OsmandApplication app, @NonNull OsmandPlugin plugin) {

View file

@ -335,6 +335,9 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
}
protected void onPostExecute(OsmBugResult obj) {
if (activity == null || activity.isFinishing() || activity.isActivityDestroyed()) {
return;
}
if (obj != null && obj.warning == null) {
if (local == osmbugsUtil) {
Toast.makeText(activity, R.string.osm_changes_added_to_local_edits, Toast.LENGTH_LONG).show();