refactor: Remove FolderMeaning and target_folder (#8456)

The `FolderMeaning` and the `target_folder()` function and related code
were needed for the message moving logic. The message moving logic isn't
needed anymore, so, this PR is a first step to remove it.

We only ever look at one folder by now (usually the Inbox folder), so,
any message moving logic isn't needed anymore because we will never
notice a message that is supposed to be moved.

The `target` column of the `imap` table is mostly the same as the
`folder` column now. Except when the message is supposed to be deleted,
then it's an empty string.
This commit is contained in:
Hocuri
2026-07-27 14:53:58 +02:00
committed by GitHub
parent 850ac0831f
commit 682baff1b9
6 changed files with 16 additions and 394 deletions

View File

@@ -421,11 +421,11 @@ async fn inbox_fetch_idle(ctx: &Context, imap: &mut Imap, mut session: Session)
}
if let Ok(()) = imap.resync_request_receiver.try_recv()
&& let Err(err) = session.resync_folders(ctx).await
&& let Err(err) = session.resync_uids_with_server(ctx, &imap.folder).await
{
warn!(
ctx,
"Transport {transport_id}: Failed to resync folders: {err:#}."
"Transport {transport_id}: Failed to resync UIDs: {err:#}."
);
imap.resync_request_sender.try_send(()).ok();
}