mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 15:46:44 +00:00
feat(GODT-1264): creation and visibility of the 'Scheduled' system label.
feat(GODT-1264): typo in error message feat(GODT-1264): fix split mode broken by previous commit.
This commit is contained in:
@ -505,9 +505,20 @@ func (conn *imapConnector) GetUpdates() <-chan imap.Update {
|
||||
}, conn.updateChLock)
|
||||
}
|
||||
|
||||
// IsMailboxVisible returns whether this mailbox should be visible over IMAP.
|
||||
func (conn *imapConnector) IsMailboxVisible(_ context.Context, mailboxID imap.MailboxID) bool {
|
||||
return atomic.LoadUint32(&conn.showAllMail) != 0 || mailboxID != proton.AllMailLabel
|
||||
// GetMailboxVisibility returns the visibility of a mailbox over IMAP.
|
||||
func (conn *imapConnector) GetMailboxVisibility(_ context.Context, mailboxID imap.MailboxID) imap.MailboxVisibility {
|
||||
switch mailboxID {
|
||||
case proton.AllMailLabel:
|
||||
if atomic.LoadUint32(&conn.showAllMail) != 0 {
|
||||
return imap.Visible
|
||||
}
|
||||
return imap.Hidden
|
||||
|
||||
case proton.AllScheduledLabel:
|
||||
return imap.HiddenIfEmpty
|
||||
default:
|
||||
return imap.Visible
|
||||
}
|
||||
}
|
||||
|
||||
// Close the connector will no longer be used and all resources should be closed/released.
|
||||
|
||||
Reference in New Issue
Block a user