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

feat: Add ConfigSynced event #5170

Merged
merged 2 commits into from
Jan 12, 2024
Merged

feat: Add ConfigSynced event #5170

merged 2 commits into from
Jan 12, 2024

Conversation

iequidoo
Copy link
Collaborator

Add an event for a case if a multi-device synced config value changed. Maybe the app needs to refresh smth on such an event. For uniformity it is emitted on the source device too. The value is omitted, otherwise it would be logged which might not be good for privacy.

Needed for deltachat/deltachat-desktop#3624

@Simon-Laux
Copy link
Member

still needs cffi and jsonrpc

@iequidoo
Copy link
Collaborator Author

We can drop the SelfavatarChanged event soon then. Note that it is also emitted on the source device too, it's easier to process all these events than add an extra code to refresh UI/caches in the app.

@Simon-Laux
Copy link
Member

We can drop the SelfavatarChanged event soon then

rather mark it first as deprecated and we remove it later unless it is not released yet.

@iequidoo
Copy link
Collaborator Author

I don't like rustfmt so frequently reformatting code and messing up git history, but this time it reduced the number of LOCs, so let it be

@iequidoo iequidoo marked this pull request as ready for review January 10, 2024 20:26
@link2xt
Copy link
Collaborator

link2xt commented Jan 10, 2024

If rustfmt is a problem just put cargo fmt into separate commit at the end of the patch stack so it can be easily removed and recreated if needed.

Copy link
Member

@r10s r10s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the new event is missing in deltachat.h - even though it is not used currently, cffi is the still most complete and accurate documentation and we should maintain it for completeness. also, might be that it will become handy :)

deltachat-ffi/src/lib.rs Outdated Show resolved Hide resolved
Add an event for a case if a multi-device synced config value changed. Maybe the app needs to
refresh smth on such an event. For uniformity it is emitted on the source device too. The value is
omitted, otherwise it would be logged which might not be good for privacy.
@iequidoo
Copy link
Collaborator Author

If rustfmt is a problem just put cargo fmt into separate commit at the end of the patch stack so it can be easily removed and recreated if needed.

It's already the last commit in the patchset.

the new event is missing in deltachat.h - even though it is not used currently, cffi is the still most complete and accurate documentation and we should maintain it for completeness. also, might be that it will become handy :)

Thanks, forgot to add it, done.

@iequidoo iequidoo requested a review from r10s January 11, 2024 05:06
@iequidoo
Copy link
Collaborator Author

Merging this, it's in fact a one-line change wrt the program logic

@iequidoo iequidoo merged commit 406b595 into main Jan 12, 2024
38 checks passed
@iequidoo iequidoo deleted the iequidoo/event-config-synced branch January 12, 2024 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants