253 } |
253 } |
254 } |
254 } |
255 break; |
255 break; |
256 case EPodcastMoveDownloadUp: |
256 case EPodcastMoveDownloadUp: |
257 { |
257 { |
258 //iPodcastModel.ShowEngine().SuspendDownloads(); |
|
259 TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
258 TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
|
259 TBool resumeAfterMove = EFalse; |
|
260 if (index == 1 && !iPodcastModel.SettingsEngine().DownloadSuspended()) |
|
261 { |
|
262 iPodcastModel.ShowEngine().SuspendDownloads(); |
|
263 resumeAfterMove = ETrue; |
|
264 } |
|
265 |
260 if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
266 if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
261 { |
267 { |
262 TRAP_IGNORE(iPodcastModel.ShowEngine().MoveDownloadUpL(iPodcastModel.ActiveShowList()[index]->Uid())); |
268 TRAP_IGNORE(iPodcastModel.ShowEngine().MoveDownloadUpL(iPodcastModel.ActiveShowList()[index]->Uid())); |
263 } |
269 } |
264 //iPodcastModel.ShowEngine().ResumeDownloadsL(); |
270 |
|
271 if(resumeAfterMove) |
|
272 { |
|
273 iPodcastModel.ShowEngine().ResumeDownloadsL(); |
|
274 } |
|
275 |
265 UpdateListboxItemsL(); |
276 UpdateListboxItemsL(); |
266 } |
277 } |
267 break; |
278 break; |
268 case EPodcastMoveDownloadDown: |
279 case EPodcastMoveDownloadDown: |
269 { |
280 { |
270 //iPodcastModel.ShowEngine().SuspendDownloads(); |
|
271 TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
281 TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
|
282 TBool resumeAfterMove = EFalse; |
|
283 if (index == 0 && !iPodcastModel.SettingsEngine().DownloadSuspended()) |
|
284 { |
|
285 iPodcastModel.ShowEngine().SuspendDownloads(); |
|
286 resumeAfterMove = ETrue; |
|
287 } |
|
288 |
272 if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
289 if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
273 { |
290 { |
274 TRAP_IGNORE(iPodcastModel.ShowEngine().MoveDownloadDownL(iPodcastModel.ActiveShowList()[index]->Uid())); |
291 TRAP_IGNORE(iPodcastModel.ShowEngine().MoveDownloadDownL(iPodcastModel.ActiveShowList()[index]->Uid())); |
275 } |
292 } |
276 //iPodcastModel.ShowEngine().ResumeDownloadsL(); |
293 |
|
294 if(resumeAfterMove) |
|
295 { |
|
296 iPodcastModel.ShowEngine().ResumeDownloadsL(); |
|
297 } |
|
298 |
277 UpdateListboxItemsL(); |
299 UpdateListboxItemsL(); |
278 } |
300 } |
279 break; |
301 break; |
280 case EPodcastSuspendDownloads: |
302 case EPodcastSuspendDownloads: |
281 { |
303 { |