Bug 262046 - Cannot show Mails from search result
Summary: Cannot show Mails from search result
Status: VERIFIED FIXED
Alias: None
Product: KMail Mobile
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Microsoft Windows CE
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-04 10:16 UTC by Andreas Holzammer
Modified: 2011-02-15 19:36 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Holzammer 2011-01-04 10:16:40 UTC
Version:           unspecified
OS:                Windows CE

When a search is done i cannot open a mail by clicking the search result.

Reproducible: Always

Steps to Reproduce:
1) open search for E-Mail
2) enter any keyword
3) hit search
4) click on a E-Mail from the search result

Actual Results:  
does nothing

Expected Results:  
The Mail should be opened in the Messageviewer if the Mail was selected.
Comment 1 Tobias Koenig 2011-01-06 10:04:02 UTC
commit d494cccc8fda878c4d7bc8cebe29d7b6453621c6
branch master
Author: Tobias Koenig <tokoe@kde.org>
Date:   Thu Jan 6 10:05:35 2011 +0100

    Open message viewer when selecting mail from search results
    
    The refactoring to ThreadModel/ThreadSelectorModel broke the
    connection in the SearchResultView
    
    BUG: 262046

diff --git a/mobile/mail/kmail-mobile.qml b/mobile/mail/kmail-mobile.qml
index 0a7b0c0..6c77807 100644
--- a/mobile/mail/kmail-mobile.qml
+++ b/mobile/mail/kmail-mobile.qml
@@ -524,6 +524,16 @@ KPIM.MainView {
       navigationModel : _itemNavigationModel
       anchors.fill : parent
     }
+    QML.Connections {
+      target : _itemNavigationModel
+      onCurrentRowChanged : {
+        if ( !application.isSingleMessage( _itemNavigationModel.currentRow ) )
+          return;
+
+        guiStateManager.pushUniqueState( KPIM.GuiStateManager.ViewSingleItemState );
+        _itemActionModel.select( _itemNavigationModel.currentRow, 3 );
+      }
+    }
 
     resultText: KDE.i18np( "One message found", "%1 messages found", searchMessageListView.count )
   }