From e1d8883b01d508718003195e93ad4ef4ab38e181 Mon Sep 17 00:00:00 2001 From: Antonio Larrosa Jimenez Date: Sun, 31 Dec 2000 20:37:37 +0000 Subject: [PATCH] I think it's better not to mark messages as dirty when they're not really dirty. This way, index files are only written when they should, and not everytime you leave a folder (as was happening before this patch). svn path=/trunk/kdenetwork/kmail/; revision=75997 --- kmmsgbase.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kmmsgbase.cpp b/kmmsgbase.cpp index e86ecfb34..128c7ab20 100644 --- a/kmmsgbase.cpp +++ b/kmmsgbase.cpp @@ -74,6 +74,7 @@ bool KMMsgBase::isMessage(void) const //----------------------------------------------------------------------------- void KMMsgBase::setStatus(const KMMsgStatus aStatus) { + if (mStatus == aStatus) return; if (mParent) mParent->msgStatusChanged( mStatus, aStatus ); mStatus = aStatus; mDirty = TRUE; @@ -156,6 +157,7 @@ const char* KMMsgBase::statusToStr(KMMsgStatus aStatus) //----------------------------------------------------------------------------- void KMMsgBase::setDate(time_t aUnixTime) { + if (mDate == aUnixTime) return; mDate = aUnixTime; mDirty = TRUE; }