diff -r 04ab22b956c2 -r 81f8547efd4f phonebookui/Phonebook2/UIControls/src/CPbk2NamesListControl.cpp --- a/phonebookui/Phonebook2/UIControls/src/CPbk2NamesListControl.cpp Fri Feb 19 22:40:27 2010 +0200 +++ b/phonebookui/Phonebook2/UIControls/src/CPbk2NamesListControl.cpp Fri Mar 12 15:41:25 2010 +0200 @@ -44,6 +44,7 @@ #include #include #include +#include "CPbk2AppUi.h" // Virtual Phonebook #include @@ -2160,7 +2161,10 @@ //Prevent messing with focus with always-on when Phonebook hidden in //reseted state. Otherwise background-added contacts will change focus. //This would cause Phonebook not to look like freshly started when opened again. - if(iCurrentState->NamesListState() != CPbk2NamesListControl::EStateHidden) + //And also make sure foreground-added contact will show the new contact + //even though the focus is not seen. + if( (static_cast( + CEikonEnv::Static()->AppUi()))->IsForeground() ) { SelectAndChangeReadyStateL(); }