887 // FUNCTION: AddRowL |
887 // FUNCTION: AddRowL |
888 // ========================================================================== |
888 // ========================================================================== |
889 void CMsgStoreStringSortResultRowSet::AddRowL( TContainerId aMessageId, const TDesC& aString, TInt64 aDate ) |
889 void CMsgStoreStringSortResultRowSet::AddRowL( TContainerId aMessageId, const TDesC& aString, TInt64 aDate ) |
890 { |
890 { |
891 CStringRow* row = CStringRow::NewL( aMessageId, aDate, aString ); |
891 CStringRow* row = CStringRow::NewL( aMessageId, aDate, aString ); |
|
892 CleanupStack::PushL( row ); |
892 row->SetGroupId( iCurGroupId++ ); |
893 row->SetGroupId( iCurGroupId++ ); |
893 InsertInOrderL( row ); |
894 InsertInOrderL( row ); |
894 |
895 CleanupStack::Pop( row ); |
895 //we need to find out where is the newly added row, if it is the first or |
896 //we need to find out where is the newly added row, if it is the first or |
896 //the last element in the sorted array, than it's position MAY NOT be accurate, |
897 //the last element in the sorted array, than it's position MAY NOT be accurate, |
897 //because we DON'T have the entire table in memory, in this case, we have to either |
898 //because we DON'T have the entire table in memory, in this case, we have to either |
898 //re-evaluate the entire table, or discard this one from memory. I choose to discard it. |
899 //re-evaluate the entire table, or discard this one from memory. I choose to discard it. |
899 TInt ndx = iSortedResultArray.FindInOrder( row, iSortMethod ); |
900 TInt ndx = iSortedResultArray.FindInOrder( row, iSortMethod ); |