application/src/PodcastQueueView.cpp
branchsymbian1
changeset 149 70b2f592a460
parent 146 78d1b03a94ff
child 164 000f9fc147b2
--- a/application/src/PodcastQueueView.cpp	Thu Jun 03 23:38:58 2010 +0100
+++ b/application/src/PodcastQueueView.cpp	Mon Jun 07 23:06:17 2010 +0100
@@ -255,25 +255,47 @@
 			break;
 		case EPodcastMoveDownloadUp:
 			{
-			//iPodcastModel.ShowEngine().SuspendDownloads();
 			TInt index = iListContainer->Listbox()->CurrentItemIndex();
+			TBool resumeAfterMove = EFalse;
+			if (index == 1 && !iPodcastModel.SettingsEngine().DownloadSuspended())
+				{
+				iPodcastModel.ShowEngine().SuspendDownloads();
+				resumeAfterMove = ETrue;
+				}
+			
 			if (index >= 0 && index < iPodcastModel.ActiveShowList().Count())
 				{
 				TRAP_IGNORE(iPodcastModel.ShowEngine().MoveDownloadUpL(iPodcastModel.ActiveShowList()[index]->Uid()));
 				}
-			//iPodcastModel.ShowEngine().ResumeDownloadsL();
+			
+			if(resumeAfterMove)
+				{
+				iPodcastModel.ShowEngine().ResumeDownloadsL();
+				}
+				
 			UpdateListboxItemsL();
 			}
 			break;
 		case EPodcastMoveDownloadDown:
 			{
-			//iPodcastModel.ShowEngine().SuspendDownloads();			
 			TInt index = iListContainer->Listbox()->CurrentItemIndex();
+			TBool resumeAfterMove = EFalse;
+			if (index == 0 && !iPodcastModel.SettingsEngine().DownloadSuspended())
+				{
+				iPodcastModel.ShowEngine().SuspendDownloads();
+				resumeAfterMove = ETrue;
+				}
+			
 			if (index >= 0 && index < iPodcastModel.ActiveShowList().Count())
 				{
 				TRAP_IGNORE(iPodcastModel.ShowEngine().MoveDownloadDownL(iPodcastModel.ActiveShowList()[index]->Uid()));
 				}
-			//iPodcastModel.ShowEngine().ResumeDownloadsL();
+			
+			if(resumeAfterMove)
+				{
+				iPodcastModel.ShowEngine().ResumeDownloadsL();
+				}
+			
 			UpdateListboxItemsL();
 			}
 			break;