Nicer way to handle back from queue view to feed/show view symbian1
authorteknolog
Wed, 10 Mar 2010 23:33:02 +0000
branchsymbian1
changeset 45 56d4e0784e5d
parent 44 f6f9647922ba
child 50 e7b10d6d7ba3
Nicer way to handle back from queue view to feed/show view
application/inc/PodcastFeedView.h
application/src/PodcastAppui.cpp
application/src/PodcastFeedView.cpp
application/src/PodcastQueueView.cpp
--- a/application/inc/PodcastFeedView.h	Wed Mar 10 23:26:17 2010 +0000
+++ b/application/inc/PodcastFeedView.h	Wed Mar 10 23:33:02 2010 +0000
@@ -41,7 +41,8 @@
         void UpdateItemL(TInt aIndex);
 		void CheckResumeDownloadL();
 		void UpdateToolbar(TBool aVisible=ETrue);
-
+		TBool ViewingShows();
+		
 	protected:
 	    void ConstructL();
 		CPodcastFeedView(CPodcastModel& aPodcastModel);
--- a/application/src/PodcastAppui.cpp	Wed Mar 10 23:26:17 2010 +0000
+++ b/application/src/PodcastAppui.cpp	Wed Mar 10 23:33:02 2010 +0000
@@ -215,7 +215,14 @@
 		TUid messageUid = TUid::Uid(0);
 		
 		if (aIndex == KTabIdFeeds) {
-			newview = KUidPodcastFeedViewID;
+			if (iFeedView->ViewingShows()) 
+				{
+				newview = KUidPodcastShowsViewID;
+				}
+			else
+				{
+				newview = KUidPodcastFeedViewID;
+				}
 		} else if (aIndex == KTabIdQueue) {
 			newview = KUidPodcastQueueViewID;
 		} else {
--- a/application/src/PodcastFeedView.cpp	Wed Mar 10 23:26:17 2010 +0000
+++ b/application/src/PodcastFeedView.cpp	Wed Mar 10 23:33:02 2010 +0000
@@ -182,13 +182,6 @@
 		iViewingShows = EFalse;
 		}
 	
-	if (iViewingShows)
-		{
-		// go to shows view
-		AppUi()->ActivateLocalViewL(KUidPodcastShowsViewID,  TUid::Uid(0), KNullDesC8());
-		} 
-	else 
-		{
 		UpdateListboxItemsL();		
 		UpdateToolbar();
 
@@ -196,7 +189,6 @@
 			{
 			iFirstActivateAfterLaunch = EFalse;
 			}
-		}
 	}
 
 void CPodcastFeedView::DoDeactivate()
@@ -989,3 +981,8 @@
     }
 	DP("CPodcastListView::HandleLongTapEventL END");
 }
+
+TBool CPodcastFeedView::ViewingShows()
+	{
+	return iViewingShows;
+	}
--- a/application/src/PodcastQueueView.cpp	Wed Mar 10 23:26:17 2010 +0000
+++ b/application/src/PodcastQueueView.cpp	Wed Mar 10 23:33:02 2010 +0000
@@ -200,7 +200,7 @@
 	DP("CPodcastQueueView::DoActivateL BEGIN");
 	
 	CPodcastListView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage);
-	iPreviousView = TVwsViewId(KUidPodcast, KUidPodcastFeedViewID);
+	iPreviousView = aPrevViewId;
 	
 	UpdateFeedUpdateStateL();
 	UpdateToolbar();