Write status attributes correctly again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40604 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
#include <NodeInfo.h>
|
#include <NodeInfo.h>
|
||||||
#include <OS.h>
|
#include <OS.h>
|
||||||
|
|
||||||
#include <E-mail.h>
|
#include <mail_util.h>
|
||||||
|
|
||||||
#include "IMAPMailbox.h"
|
#include "IMAPMailbox.h"
|
||||||
|
|
||||||
@@ -463,6 +463,11 @@ IMAPStorage::_ReadFilesThread()
|
|||||||
status_t
|
status_t
|
||||||
IMAPStorage::_WriteFlags(int32 flags, BNode& node)
|
IMAPStorage::_WriteFlags(int32 flags, BNode& node)
|
||||||
{
|
{
|
||||||
|
if ((flags & kSeen) != 0)
|
||||||
|
write_read_attr(node, B_READ);
|
||||||
|
else
|
||||||
|
write_read_attr(node, B_UNREAD);
|
||||||
|
|
||||||
ssize_t writen = node.WriteAttr("MAIL:server_flags", B_INT32_TYPE, 0,
|
ssize_t writen = node.WriteAttr("MAIL:server_flags", B_INT32_TYPE, 0,
|
||||||
&flags, sizeof(int32));
|
&flags, sizeof(int32));
|
||||||
if (writen != sizeof(int32))
|
if (writen != sizeof(int32))
|
||||||
|
|||||||
@@ -185,6 +185,10 @@ POP3Protocol::SyncMessages()
|
|||||||
entry_ref ref;
|
entry_ref ref;
|
||||||
entry.GetRef(&ref);
|
entry.GetRef(&ref);
|
||||||
|
|
||||||
|
// the ref becomes invalid after renaming the file thus we already
|
||||||
|
// write the status here
|
||||||
|
MarkMessageAsRead(ref, B_UNREAD);
|
||||||
|
|
||||||
int32 size = MessageSize(toRetrieve);
|
int32 size = MessageSize(toRetrieve);
|
||||||
if (fFetchBodyLimit < 0 || size <= fFetchBodyLimit) {
|
if (fFetchBodyLimit < 0 || size <= fFetchBodyLimit) {
|
||||||
error = mailIO.Seek(0, SEEK_END);
|
error = mailIO.Seek(0, SEEK_END);
|
||||||
|
|||||||
@@ -64,8 +64,6 @@ HaikuMailFormatFilter::HaikuMailFormatFilter(MailProtocol& protocol,
|
|||||||
void
|
void
|
||||||
HaikuMailFormatFilter::HeaderFetched(const entry_ref& ref, BFile* file)
|
HaikuMailFormatFilter::HeaderFetched(const entry_ref& ref, BFile* file)
|
||||||
{
|
{
|
||||||
write_read_attr(*file, B_UNREAD);
|
|
||||||
|
|
||||||
file->Seek(0, SEEK_SET);
|
file->Seek(0, SEEK_SET);
|
||||||
|
|
||||||
BMessage attributes;
|
BMessage attributes;
|
||||||
|
|||||||
Reference in New Issue
Block a user