Fix timestamp:
This commit is contained in:
parent
1cb6b367c4
commit
7d268d43e2
2 changed files with 7 additions and 6 deletions
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue