Version: unspecified (using Devel) OS: Windows CE version 20101219 svn 1207720 Reproducible: Always Steps to Reproduce: 1. Look at the mail list 2. Try to sort by ToDo or Important flag Actual Results: Both sort ways are missing. Expected Results: It should be possible o sort after todo or important.
commit f1f1269fcad0c07465506515fdcc2a1c652d7d27 branch master Author: Tobias Koenig <tokoe@kde.org> Date: Thu Dec 23 16:59:41 2010 +0100 Implement support for sorting by Action Item Status BUG: 261048 diff --git a/mobile/mail/mailthreadgroupercomparator.cpp b/mobile/mail/mailthreadgroupercomparator.cpp index 9bb4128..1829b22 100644 --- a/mobile/mail/mailthreadgroupercomparator.cpp +++ b/mobile/mail/mailthreadgroupercomparator.cpp @@ -21,9 +21,9 @@ #include "mailthreadgroupercomparator.h" +#include <akonadi/kmime/messageflags.h> #include <messagecore/stringutil.h> - MailThreadGrouperComparator::MailThreadGrouperComparator() : mSortingOption( SortByDateTimeMostRecent ), mIsOutboundCollection( false ) @@ -122,6 +122,15 @@ bool MailThreadGrouperComparator::lessThan( const Akonadi::Item &leftItem, const return leftSize < rightSize; } break; + case SortByActionItem: + { + const bool leftIsActionItem = leftThreadRootItem.flags().contains( Akonadi::MessageFlags::ToAct ); + const bool rightIsActionItem = rightThreadRootItem.flags().contains( Akonadi::MessageFlags::ToAct ); + + if ( leftIsActionItem != rightIsActionItem ) + return leftIsActionItem; + } + break; } return leftThreadRootItem.id() < rightThreadRootItem.id(); diff --git a/mobile/mail/mailthreadgroupercomparator.h b/mobile/mail/mailthreadgroupercomparator.h index f377108..6729391 100644 --- a/mobile/mail/mailthreadgroupercomparator.h +++ b/mobile/mail/mailthreadgroupercomparator.h @@ -35,7 +35,8 @@ class MailThreadGrouperComparator : public ThreadGrouperComparator SortByDateTimeMostRecent, SortBySenderReceiver, SortBySubject, - SortBySize + SortBySize, + SortByActionItem }; /** diff --git a/mobile/mail/mainview.cpp b/mobile/mail/mainview.cpp index b745472..fc984d9 100644 --- a/mobile/mail/mainview.cpp +++ b/mobile/mail/mainview.cpp @@ -1708,6 +1708,9 @@ void MainView::messageListSettingsChanged( const MessageListSettings &settings ) case MessageListSettings::SortBySize: m_grouperComparator->setSortingOption( MailThreadGrouperComparator::SortBySize ); break; + case MessageListSettings::SortByActionItem: + m_grouperComparator->setSortingOption( MailThreadGrouperComparator::SortByActionItem ); + break; } m_threadGrouperModel->setThreadingEnabled( settings.useThreading() ); diff --git a/mobile/mail/messagelistsettings.h b/mobile/mail/messagelistsettings.h index b91b68a..0165f43 100644 --- a/mobile/mail/messagelistsettings.h +++ b/mobile/mail/messagelistsettings.h @@ -36,7 +36,8 @@ class MessageListSettings SortByDateTimeMostRecent, SortBySenderReceiver, SortBySubject, - SortBySize + SortBySize, + SortByActionItem }; enum GroupingOption diff --git a/mobile/mail/messagelistsettingseditor.ui b/mobile/mail/messagelistsettingseditor.ui index 2fbef68..11a6a69 100644 --- a/mobile/mail/messagelistsettingseditor.ui +++ b/mobile/mail/messagelistsettingseditor.ui @@ -6,7 +6,7 @@ <rect> <x>0</x> <y>0</y> - <width>412</width> + <width>413</width> <height>161</height> </rect> </property> @@ -27,7 +27,7 @@ </item> <item> <property name="text"> - <string>By Most Recent in Discussion</string> + <string>By Most Recent in Discussion</string> </property> </item> <item> @@ -45,6 +45,11 @@ <string>By Size</string> </property> </item> + <item> + <property name="text"> + <string>By Action Item Status</string> + </property> + </item> </widget> </item> <item row="0" column="2">
test of Description version 20110116 git-4d1bc61 What is about the important flag? I don't see a Sorting by action for this.
Hej Ludwig, neither is sorting by important flag available in KMail-Desktop, nor is this functionality listed in the functionality requirement spreadsheet of the komo project. So this is not a bug. Feel free to open a new one as general, non-komo specific whishlist item. Ciao, Tobias
You are right, this is not in the feature list. Closed.