phonebookengines/contactsmodel/cntplsql/src/csqlitelocalview.cpp
changeset 46 efe85016a067
parent 37 fd64c38c277d
equal deleted inserted replaced
40:b46a585f6909 46:efe85016a067
   642 		TContactViewEvent event;
   642 		TContactViewEvent event;
   643 		event.iInt = KErrNone;
   643 		event.iInt = KErrNone;
   644 		switch(aEvent.iType)
   644 		switch(aEvent.iType)
   645 			{
   645 			{
   646 			case EContactDbObserverEventGroupChanged:
   646 			case EContactDbObserverEventGroupChanged:
   647 				{
       
   648 				//Groups are a special case the base view may not contain the group
       
   649 				//but a sub view may be such a group and need to know its changed
       
   650 				//Local views can contain groups so this case carries on to the next so no break;
       
   651 				event.iEventType=TContactViewEvent::EGroupChanged;
       
   652 				event.iContactId=aEvent.iContactId;
       
   653 				NotifyObservers(event);
       
   654 				}
       
   655 			case EContactDbObserverEventContactChanged:
   647 			case EContactDbObserverEventContactChanged:
   656 			case EContactDbObserverEventOwnCardChanged:
   648 			case EContactDbObserverEventOwnCardChanged:
   657 				{// Remove from old position, and notify.
   649 				{
       
   650 				if (aEvent.iType == EContactDbObserverEventGroupChanged)
       
   651 				    {
       
   652 	    			//Groups are a special case the base view may not contain the group
       
   653     				//but a sub view may be such a group and need to know its changed
       
   654 				    event.iEventType=TContactViewEvent::EGroupChanged;
       
   655 				    event.iContactId=aEvent.iContactId;
       
   656 				    NotifyObservers(event);
       
   657 				    }
       
   658 				
       
   659 				// Remove from old position, and notify.
   658 				TRAPD(err,event.iInt=RemoveL(aEvent.iContactId));
   660 				TRAPD(err,event.iInt=RemoveL(aEvent.iContactId));
   659 
   661 
   660                 if (err == KErrNone && event.iInt != KErrNotFound)
   662                 if (err == KErrNone && event.iInt != KErrNotFound)
   661                     {
   663                     {
   662 				    event.iEventType=TContactViewEvent::EItemRemoved;
   664 				    event.iEventType=TContactViewEvent::EItemRemoved;