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

Extend dc_is_sending_locations_to_chat return value #5547

Open
link2xt opened this issue May 9, 2024 · 0 comments
Open

Extend dc_is_sending_locations_to_chat return value #5547

link2xt opened this issue May 9, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@link2xt
Copy link
Collaborator

link2xt commented May 9, 2024

Currently dc_is_sending_locations_to_chat returns 1 if location streaming is enabled in the chat and 0 if it is not enabled. However, it is not possible to see if locations are actually available from the OS, i.e. whether any locations has been sent. For example, it is possible to enable location streaming for 5 minutes, but actually send no location messages at all because GPS does not work inside the building.

Currently the only way to see if location is attached within Delta Chat is to send a message to the chat and see if location icon is displayed. This is however going to be removed with #5546 (see #5545 for the reason).

Core knows if any locations have been added since locations_send_begin. In this case it should return 2 instead of 1. Old UI will treat this as a boolean, but new UI can display 1 as a grey icon indicating that location streaming has been enabled but no location has been sent yet and display 2 as a green icon indicating that set_location has actually been called since enabling location streaming. With Android fix deltachat/deltachat-android#3039 most of the time icon should be green immediately if location is available from the OS.

@link2xt link2xt added the enhancement New feature or request label May 9, 2024
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

1 participant