Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf15e8a2 authored by cketti's avatar cketti Committed by GitHub
Browse files

Merge pull request #2104 from philipwhiuk/fixFetchNull

Fix 'Fetching headers null:Folder'
parents 0d77d5b9 0383fbe4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -161,6 +161,7 @@ public class ActivityListener extends MessagingListener {
    public void synchronizeMailboxFailed(Account account, String folder,
                                         String message) {
        mLoadingAccountDescription = null;
        mLoadingHeaderFolderName = null;
        mLoadingFolderName = null;
        mAccount = null;
        informUserOfStatus();
+11 −0
Original line number Diff line number Diff line
@@ -79,6 +79,17 @@ public class ActivityListenerTest {
        assertEquals("Syncing disabled", operation);
    }

    @Test
    public void getOperation__whenSynchronizeMailboxFailedAfterHeadersStarted_shouldResultInValidStatus() {
        activityListener.synchronizeMailboxStarted(account, FOLDER);
        activityListener.synchronizeMailboxHeadersStarted(account, FOLDER);
        activityListener.synchronizeMailboxFailed(account, FOLDER, ERROR_MESSAGE);

        String operation = activityListener.getOperation(context);

        assertEquals("Syncing disabled", operation);
    }

    @Test
    public void getOperation__whenSynchronizeMailboxFinished() {
        activityListener.synchronizeMailboxStarted(account, FOLDER);