Fix so delete show in new shows list removes the show from the list symbian1
authorSebastian Brannstrom <sebastianb@symbian.org>
Fri, 19 Nov 2010 01:37:53 +0000
branchsymbian1
changeset 377 684802056d6f
parent 375 82f59b3393b3
child 378 b3487e8973c7
Fix so delete show in new shows list removes the show from the list
application/src/PodcastShowsView.cpp
--- a/application/src/PodcastShowsView.cpp	Fri Nov 19 01:27:00 2010 +0000
+++ b/application/src/PodcastShowsView.cpp	Fri Nov 19 01:37:53 2010 +0000
@@ -983,9 +983,21 @@
 			info->SetDownloadState(ENotDownloaded);
 			info->SetPlayState(EPlayed);
 			iPodcastModel.ShowEngine().UpdateShowL(*info);
-			
-			UpdateShowItemDataL(iPodcastModel.ActiveShowList()[index], index, 0);
-			iListContainer->Listbox()->DrawItem(index);					
+		
+			if (iShowNewShows)
+				{
+				UpdateListboxItemsL();
+
+				if (index > 0)
+					{
+					iListContainer->Listbox()->SetCurrentItemIndex(index - 1);
+					}
+				}
+			else
+				{
+				UpdateShowItemDataL(iPodcastModel.ActiveShowList()[index], index, 0);
+				iListContainer->Listbox()->DrawItem(index);
+				}
 			}
 		}
 	}