diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java index c6a6ffe741..9ee194cb99 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java +++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java @@ -363,7 +363,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements createMenuItem(menu, GROUP_INFO, R.string.osmo_group_info, R.drawable.ic_action_info_light, R.drawable.ic_action_info_dark, MenuItem.SHOW_AS_ACTION_IF_ROOM); } - if (group != null && !group.isMainGroup()) || (device != null && device.getGroup().isMainGroup())) { + if ((group != null && !group.isMainGroup()) || (device != null && device.getGroup().isMainGroup())) { createMenuItem(menu, DELETE_ACTION_ID, R.string.default_buttons_delete, R.drawable.ic_action_delete_light, R.drawable.ic_action_delete_dark, MenuItem.SHOW_AS_ACTION_IF_ROOM); diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java index 08b64ab5bf..28d75467a8 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java +++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java @@ -338,7 +338,7 @@ public class OsMoPlugin extends OsmandPlugin implements MonitoringInfoControlSer for(JSONObject obj : params) { try { File f = new File(fl, obj.getString("name")); - long timestamp = obj.getLong("timestamp"); + long timestamp = obj.getLong("timestamp") * 1000; boolean visible = obj.has("visible"); if(!f.exists() || fl.lastModified() != timestamp) { String url = obj.getString("url"); @@ -352,10 +352,11 @@ public class OsMoPlugin extends OsmandPlugin implements MonitoringInfoControlSer } fout.close(); is.close(); - } - if(visible) { - GPXFile selectGPXFile = GPXUtilities.loadGPXFile(app, f); - app.setGpxFileToDisplay(selectGPXFile, app.getSettings().SHOW_CURRENT_GPX_TRACK.get()); + f.setLastModified(timestamp); + if(visible) { + GPXFile selectGPXFile = GPXUtilities.loadGPXFile(app, f); + app.setGpxFileToDisplay(selectGPXFile, app.getSettings().SHOW_CURRENT_GPX_TRACK.get()); + } } } catch (JSONException e) { e.printStackTrace();