Email Client - #199
Draft
domai-tb wants to merge 36 commits into
Draft
Conversation
…intext and html. Not all emails show body
Member
Author
|
Hey @H1b4x thank your for your work! 🙏🏼 Some task that need to be done before we can release the email client in production:
|
Member
Author
|
We need to manually handle the dependency As the package maintainer doesn't seem to provide a update in the near future, we should fork the repository like we did with the video player plugin too. |
…ent, and implemented backgground fetch with authentication and UID based notification
- the branch previously did not run due to an unsupported Kotlin version error, with the sentry_flutter update this branch builds again
- resolved merge conflicts - changed login screen implementation to be compatible with master branch (email Client now has its own page until a central login screen replaces all individual login screens) - reset ticket login screen implementation to master version
- created an authentication page that handles the visual loading while authenticating and fetching emails - seperated UI loading concern from login screen - added back button to loading page - fixed navigation after logout (return to more page after logout) - loading now works correctly after inital login
- we now do lazy fetching for the emails -> we fetch the headers only and then the bodies when an email is opened - the email bodies have been improved (MIME Tree structure), most if not all email bodies are now displayed (primarily in plain text -> displaying as many HTML bodies successfully as possible is still a TODO) - added fetching emails by their UID into services and repo layers - Flags are now fetched properly
- we now check before every IMAP operation if our IMAP connection is alive, if it isn't we try to reset and reconnect - the previous check wasn't catching the SocketException, this check is now replaced by the wrapper function managing the connection status
- resolved the delay in the IMAP reconnect with a function timeout to force a reconnect when we can't detect the connection loss with the exceptions and errors - broadend erros being caught in the reconnect cycle - added a keep alive that pings the IMAP client with a NOOP every 5 minutes, this will also drastically reduce the amount of times we need to iniate a whole reconnect - switched to InAppWebView to display html email bodies (still TODO: refactor layout when an email displays HTML, because SingleChildScrollView and InAppWebView don't mesh well) - exported loading of the email bodies to the email view itself instead of being called from email pages (for this email view was converted to a stateful widget) - added loading spinner to email bodies loading
- to accomadate the InAppWebView better the layout now has different cases for plaintext and html bodies, plaintext has the same scrolling behaviour as before, scrolling the header. HTML bodies now have a fixed header so the scrolling in the web view works much smoother and doesn't figth with an outer scroll behaviour - since we block images in HTML bodies per default (for privacy), we check if a HTML body email has images and give the user a load button that lets them load in the images - web views now no longer handle their own height dynamically but expand to the size they need right away, which is much more robust - extracted widgets into build functions to improve overview of the widget tree and avoid redundant code
- when saving a draft, we now no longer have mulitple duplicate drafts and only save one draft, "replaacing" the draft each time - since the rub dovecot server does not support the IMAP replace operation we save a new draft with a combination of delete the existing one and appending the new one - we now ask the user for their email address on init, since we do not have direct access to it. It is saved in the secure storage - we check the email address for the @ format combined with the RUB email .de ending - from the email we automatically generate a suggested Display Name, which the user can choose to overwrite. It is also saved in the secure storage
- we now save the draft bodies correctly in the MIME format - draft bodies now display correctly - drafts only save on PopScope when the content has truly changed - we're keeping track of the drafts with the help of their Email headers now, so as to not save mutliple versions - opening the Drafts drawer is now correctly routed to the drafts page - drafts are now editable
- the move operation is now permanent server side - the move fix also implicitly fixed part of the delete operation that moves emails to the trash folder - the delete operation is now permanent and deleting the right emails with the combination of uid's and mailboxnames - added the display name to sent emails - changed snackbar notificaitons in email view to global bubbles messages
- added a more sheet with additional actions for an Email (currently: marking read status, Move Email to Folder, Spam marking) - fixed the service move, now any move from any folder to another sticks around - now keeping track of the new UID assigned after a move by the IMAP server - refactored the email service move function - added convinience wrappers to the move function (move multiple emails and move via EmailFolder or MailboxName)
- we now search for emails server side (prev: filter on locally stored emails), now using the right IMAP function - restructured fetching of emails by their UID slightly - to prevent enormous loading times when searching for emails we dynamically load the matched emails by first retrieving all the UIDs of matching emails, then batch loading the emails in as needed - the next batch triggers when the user scrolls down far enough - loading speed could still be improved (might be beneficial to change from load as typing to confirm after typing) - UI update to searching: while searching now portraying a loading spinner and informing the User when no emails are found - when in search bar background is now blanked out - added rebuild function to trigger rebuilds since search is now actually doing the searching
- removed mutliple unused files: archives (not a native rub email folder), email settings (empty file), sent file (is managed by dynamic folder building) - changed search while typing Search to a search after confirm; less risk of searching unnecessary unfinished search terms and showing outdated emails - urls are now handed off to the OS from the webview, it does not handle opening them - now resolving inline attached images in addition to the network images, which allows us to show more images in the webview - optimized search: previously search fell into an unnecessary reconnect since it takes a while to search through a unindexed mailbox; now we have a custom timeout param so searches can have a 90 sec timeout window - we now try to cancel a previous outdated search, if a new search is started
- added bottom sheet to the compse screen with a modified sheet, having a different version for drafts - fixed bug in fetchfullemail (folder was wrongly overwritten)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

E-Mail Client
This update introduces an integrated E-Mail client for RUB mails.
Features
Code Quality / Internals