Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If offline show last online timestamp #76

Closed
licaon-kter opened this issue Dec 8, 2019 · 18 comments
Closed

If offline show last online timestamp #76

licaon-kter opened this issue Dec 8, 2019 · 18 comments
Labels
enhancement New feature or request

Comments

@licaon-kter
Copy link
Contributor

licaon-kter commented Dec 8, 2019

..."offline since XXXX" or "offline for the last XXXX sec/min"

@bilde2910
Copy link
Owner

That's an interesting point. I'll have to figure out a way to integrate this into the web UI cleanly. I'll do some research and come back with screenshots or samples here.

@bilde2910 bilde2910 added the enhancement New feature or request label Dec 8, 2019
@licaon-kter
Copy link
Contributor Author

On top, near the clock maybe.

@bilde2910
Copy link
Owner

Problem is that there can be multiple people on a map at a time. One may be offline while another is still live. The red "Offline" that replaces the timer is an indicator that the map viewer is offline rather than the people sharing their locations.

@licaon-kter
Copy link
Contributor Author

licaon-kter commented Dec 9, 2019

Oh, I didn't test multiple users yet.

So the nicest solution would be to show it at each marker after all.

@bilde2910
Copy link
Owner

Maybe something like this would work?

image

@licaon-kter
Copy link
Contributor Author

Nice, though it won't be an arrow I guess?

@bilde2910
Copy link
Owner

It would be a circle that indicates no movement. The arrow is just there because of the GPS emulator I'm using to not disclose my location here. :-)

@bilde2910
Copy link
Owner

This is live; you can pull the latest version from Docker Hub in about 20 minutes or so.

@licaon-kter
Copy link
Contributor Author

Just updated, not Docker, interior setting (so no GPS location on start), app says green "Location sharing active!" but GPS Test shows no lock (I guess same as #80).

Anyway, I get the circle and the OFFLINE, but no time. I guess it's because it didn't actually get a "last lock time"?

@bilde2910
Copy link
Owner

If you get the green "Location service active" then that means that the app has found a GPS fix. That said, it might not be continuously receiving them any more.

The "Offline" text actually isn't in the code any more. Could you try to clear cache in your browser/any caching providers (CloudFlare etc.) and see if that helps?

@licaon-kter
Copy link
Contributor Author

Ok, works now after several forced reloads. Thanks

@licaon-kter
Copy link
Contributor Author

Built app from HEAD too, noticed that it mostly says "2min ago", is this some rounding error?

I've disconnected the internet connections and appears to work ok, eg. 10 min have passed and now says 10 mins.

But online again, still "2min ago"...

@bilde2910
Copy link
Owner

The timestamp of the last received data is fetched from the app and sent to the browser, where the browser compares to its local time. Can you confirm that both devices' clocks run in sync?

@licaon-kter
Copy link
Contributor Author

licaon-kter commented Dec 9, 2019

Devices meaning Android and/or server and/or browser?

/LE: You are right, browser is 2mins ahead :) :)

@licaon-kter
Copy link
Contributor Author

Another odd thing, checking the other problematic share in the browser, while indoors w/o a lock, the text always said "2h ago", now I can guess where these 2h come from (server on UTC, client on local timezone), but while it had the GPS lock earlier, everything was ok (time wise at least).

@bilde2910
Copy link
Owner

Both the app, frontend and backend all use Unix timestamps, so timezones won't be an issue. The "2h ago" would stem from there actually not being any updates for the past 2 hours received by the server.

@licaon-kter
Copy link
Contributor Author

Actually thinking again, 2h might just be a the round off, eg. 2h55m will still be 2h, right? I'm not sure I was there >3 h.

Will have to retest somehow...

@bilde2910
Copy link
Owner

2h55m will still be 2h, right?

Yes, it rounds down. 2h55m will still show as 2h. It switches to 3h once it reaches 3h00m.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants