Fix POP3 mail fetch not finishing if there are no new messages but some old ones
This may have been introduced by commit e7ba619b. It happens when there are no new messages to download, detected in doStateStep() in the Download state. The state then changes to CheckRemovingMessage and checkRemovingMessageFromServer() starts a delete job if there are any old messages to be deleted. When the delete job finishes, deleteJobResult() is called which checks shouldAdvanceToQuitState() to see whether there is any more work to do... but the first conditional in shouldAdvanceToQuitState() is "mState==Save". This condition can never be satisfied once the state has become CheckRemovingMessage. The solution is, at the end of deleteJobResult(), to go to state Save if there are no more deletion jobs to run. If there are, the state will remain as CheckRemovingMessage and the same check will be done when the deletion job eventually finishes. Differential Revision: https://phabricator.kde.org/D9013
parent
2a5b4df5
Please register or sign in to comment