mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 04:56:03 +03:00
[GH-ISSUE #166] Question: How does auto-save currently works? #133
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#133
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dumblob on GitHub (Feb 15, 2017).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/166
Originally assigned to: @jasonmunro on GitHub.
There was some planned work on auto save of composed messages, but I could not extract how does it work currently. Does it support only Gmail? Or is it implemented for any account? Does it use Drafts or Templates folders? How frequently is the email saved (I would prefer every 2 seconds)? How does it cope with encryption?
Thank you.
@jasonmunro commented on GitHub (Feb 26, 2017):
Drafts are saved in the session every 30 seconds (or when you use the "save" button). When the session expires (logout, browser close) drafts are destroyed. Session data is encrypted with a unique key generated at login and stored in a cookie. Once a draft has been saved, you can access it after revisting the compose page with the document icon in the upper right of the page. Drafts are not tied directly to a particular mail provider. I have recently built support in the imap_folders module to set a draft folder, but it is not used by the draft system yet.
@dumblob commented on GitHub (Feb 27, 2017):
Thank you @jasonmunro for explanation. For my needs, I would like to change the interval of autosaving to a much shorter value (e.g. 2 seconds). Autosave should trigger only if any change to the draft appeared (to save bandwidth). Could this autosave interval be configurable (either system-wide or even user-specific)? Or is it too low level and I should maintain my own fork?
@jasonmunro commented on GitHub (Mar 1, 2017):
I'm not too keen on exposing this as a user option, I'm considering a site level ini file setting. In the meantime however, I don't want unneeded forking :) So, I'm leveraging the module system and the "site" module to make this possible without having to fork:
https://github.com/jasonmunro/cypht/blob/master/modules/site/site.js
All you have to do is enable that module, edit the site.js file above to your liking, and run your config gen script and you should be good to go. The point of the site module set is to override default Cypht behavior without making code changes, so this seems like a good place to put this for now.
I don't think the draft saving code is smart enough to not fire on each interval when nothing has changed in the draft, I'm looking into that now.
@jasonmunro commented on GitHub (Mar 1, 2017):
Draft logic updated in
github.com/jasonmunro/cypht@012cc310a1to only re-save if the draft has changed since the last save.@dumblob commented on GitHub (Mar 1, 2017):
Thanks a lot @jasonmunro! I'm closing this as solved.