mirror of
https://github.com/chatmail/core.git
synced 2026-09-22 13:01:21 +03:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user