Uh oh!
There was an error while loading. Please reload this page.
issue 404 remove Promises - #985
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| case .connection: | ||
| // the connection has dropped, so it's probably ok to not officially "close" it. but maybe there could be a cleaner way to dispose of the connection? | ||
| imapSess = nil | ||
| smtpSess = nil | ||
| // this is a mess, neads a real refactor. use DI | ||
| // todo - for now renewing of session disabled, will probably break retries | ||
| // setupSession() | ||
| // await connectImap(session: imapSessNotNil) | ||
| return true |
There was a problem hiding this comment.
Todo - this is likely completely broken and will need a fix. But not in this PR.
Also, setupSession and connectImap and connectSmpt all need complete refactoring.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This removes Promises. @ivan-ushakov could you share feedback? I could have overlooked something. // don't really care about IMAP functionality, more about the parts that touch Gmail or general functioning of the app. |
sosnovsky
commented
Nov 11, 2021
tomholub
commented
Nov 11, 2021
got one failing appium test: will check |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
(small) regression:
Will file another issue. |
tomholub
commented
Nov 11, 2021
@sosnovsky you're good at reviews - the PR isn't small and you found clear ways to improve it. Updated, hopefully appium tests should pass now (they pass locally) |
sosnovsky
commented
Nov 11, 2021
Thanks Tom :) It's easier to find possible improvements when there are 50 files with changes than in some small PRs Also for |
| Task { | ||
| do { | ||
| let path = try await trashFolderProvider.getTrashFolderPath() | ||
| DispatchQueue.main.async { |
There was a problem hiding this comment.
Better to avoid having to different concurrency approaches in one place

This PR removes remaining Promise usage, particularly in IMAP class.
The SMTP/IMAP functionality is likely broken after this change. IMAP/SMTP is currently low-value feature with very few (if any) users using it. I'll file another issue to test and fix it, and after that, we'll write some UI tests for it to ensure it remains stable.
close#404
close#981
Also stabilized opening menu in appium, and used a shorter pass phrase for appium tests so that less time is wasted typing long pass phrase during tests.
Tests:
To be filled by reviewers
I have reviewed that this PR... (tick whichever items you personally focused on during this review):