There is an archive entry in the context entry of the mail in the archive
Please search to check for an existing issue (including closed issues, for which the fix may not have yet been released) before opening a new issue: https://github.com/k9mail/k-9/issues?q=is%3Aissue

### Expected behavior
When I move my mail to the archive, the item to keep in spite of the archive is registered in the context menu.

### Actual behavior
Delete or unarchive archived items in content menu of the archive

### Steps to reproduce
1.Move the mail in your Inbox to the Inbox.

### Environment
K-9 Mail version: 5.600

Android version: 8.0.0

Account type (IMAP, POP3,   ##WebDAV/Exchange):

diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.java b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.java
index 54affea70..f480bab24 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.java
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.java
@@ -1707,11 +1707,17 @@ public class MessageListFragment extends Fragment implements OnItemClickListener
                     menu.findItem(R.id.spam).setVisible(false);
                 }
 
-                if (!account.hasArchiveFolder()) {
+                Long archiveFolderId = account.getArchiveFolderId();
+                boolean hideArchiveAction = archiveFolderId == null ||
+                        (singleFolderMode && currentFolder.databaseId == archiveFolderId);
+                if (hideArchiveAction) {
                     menu.findItem(R.id.archive).setVisible(false);
                 }
 
-                if (!account.hasSpamFolder()) {
+                Long spamFolderId = account.getSpamFolderId();
+                boolean hideSpamAction = spamFolderId == null ||
+                        (singleFolderMode && currentFolder.databaseId == spamFolderId);
+                if (hideSpamAction) {
                     menu.findItem(R.id.spam).setVisible(false);
                 }
             }
['app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.java']