equal
deleted
inserted
replaced
520 case EPodcastRemoveDownload: |
520 case EPodcastRemoveDownload: |
521 { |
521 { |
522 TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
522 TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
523 if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
523 if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
524 { |
524 { |
525 if (iPodcastModel.ShowEngine().RemoveDownloadL(iPodcastModel.ActiveShowList()[index]->Uid())) |
525 TRAPD(err, iPodcastModel.ShowEngine().RemoveDownloadL(iPodcastModel.ActiveShowList()[index]->Uid())); |
|
526 |
|
527 if (err == KErrNone) |
526 { |
528 { |
527 iItemArray->Delete(index); |
529 iItemArray->Delete(index); |
528 iItemIdArray.Remove(index); |
530 iItemIdArray.Remove(index); |
529 iListContainer->Listbox()->HandleItemRemovalL(); |
531 iListContainer->Listbox()->HandleItemRemovalL(); |
530 iListContainer->Listbox()->SetCurrentItemIndex(index - 1 > 0 ? index - 1 : 0); |
532 iListContainer->Listbox()->SetCurrentItemIndex(index - 1 > 0 ? index - 1 : 0); |
531 iListContainer->Listbox()->DrawNow(); |
533 iListContainer->Listbox()->DrawNow(); |
532 |
534 |
533 delete iPodcastModel.ActiveShowList()[index]; |
535 delete iPodcastModel.ActiveShowList()[index]; |
534 iPodcastModel.ActiveShowList().Remove(index); |
536 iPodcastModel.ActiveShowList().Remove(index); |
535 } |
537 } |
536 } |
538 } |
537 } |
539 } |
538 break; |
540 break; |
539 case EPodcastSuspendDownloads: |
541 case EPodcastSuspendDownloads: |