Rename ImapFolder.setFlags()
to setFlagsForAllMessages()
This commit is contained in:
parent
2ae56aa548
commit
00cff358f3
7 changed files with 8 additions and 8 deletions
|
@ -13,7 +13,7 @@ internal class CommandDeleteAll(private val imapStore: ImapStore) {
|
|||
try {
|
||||
remoteFolder.open(OpenMode.READ_WRITE)
|
||||
|
||||
remoteFolder.setFlags(setOf(Flag.DELETED), true)
|
||||
remoteFolder.setFlagsForAllMessages(setOf(Flag.DELETED), true)
|
||||
} finally {
|
||||
remoteFolder.close()
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ internal class CommandMarkAllAsRead(private val imapStore: ImapStore) {
|
|||
remoteFolder.open(OpenMode.READ_WRITE)
|
||||
if (remoteFolder.mode != OpenMode.READ_WRITE) return
|
||||
|
||||
remoteFolder.setFlags(setOf(Flag.SEEN), true)
|
||||
remoteFolder.setFlagsForAllMessages(setOf(Flag.SEEN), true)
|
||||
} finally {
|
||||
remoteFolder.close()
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ open class TestImapFolder(override val serverId: String) : ImapFolder {
|
|||
throw UnsupportedOperationException("not implemented")
|
||||
}
|
||||
|
||||
override fun setFlags(flags: Set<Flag>, value: Boolean) {
|
||||
override fun setFlagsForAllMessages(flags: Set<Flag>, value: Boolean) {
|
||||
if (value) {
|
||||
for (messageFlagSet in messageFlags.values) {
|
||||
messageFlagSet.addAll(flags)
|
||||
|
|
|
@ -70,7 +70,7 @@ interface ImapFolder {
|
|||
fun appendMessages(messages: List<Message>): Map<String, String>?
|
||||
|
||||
@Throws(MessagingException::class)
|
||||
fun setFlags(flags: Set<Flag>, value: Boolean)
|
||||
fun setFlagsForAllMessages(flags: Set<Flag>, value: Boolean)
|
||||
|
||||
@Throws(MessagingException::class)
|
||||
fun setFlags(messages: List<ImapMessage>, flags: Set<Flag>, value: Boolean)
|
||||
|
|
|
@ -1109,7 +1109,7 @@ internal class RealImapFolder(
|
|||
}
|
||||
|
||||
@Throws(MessagingException::class)
|
||||
override fun setFlags(flags: Set<Flag>, value: Boolean) {
|
||||
override fun setFlagsForAllMessages(flags: Set<Flag>, value: Boolean) {
|
||||
open(OpenMode.READ_WRITE)
|
||||
checkOpen()
|
||||
|
||||
|
|
|
@ -1136,11 +1136,11 @@ class RealImapFolderTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
fun setFlags_shouldIssueUidStoreCommand() {
|
||||
fun setFlagsForAllMessages_shouldIssueUidStoreCommand() {
|
||||
val folder = createFolder("Folder")
|
||||
prepareImapFolderForOpen(OpenMode.READ_WRITE)
|
||||
|
||||
folder.setFlags(setOf(Flag.SEEN), true)
|
||||
folder.setFlagsForAllMessages(setOf(Flag.SEEN), true)
|
||||
|
||||
assertCommandIssued("UID STORE 1:* +FLAGS.SILENT (\\Seen)")
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ internal open class TestImapFolder(
|
|||
throw UnsupportedOperationException("not implemented")
|
||||
}
|
||||
|
||||
override fun setFlags(flags: Set<Flag>, value: Boolean) {
|
||||
override fun setFlagsForAllMessages(flags: Set<Flag>, value: Boolean) {
|
||||
throw UnsupportedOperationException("not implemented")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue