|  | @ -57,8 +57,6 @@ public class RecentFragment extends BaseFragment { | 
			
		
	
		
		
			
				
					|  |  |     /** |  |  |     /** | 
			
		
	
		
		
			
				
					|  |  |      * Use ONLY this factory method to create a new instance of |  |  |      * Use ONLY this factory method to create a new instance of | 
			
		
	
		
		
			
				
					|  |  |      * this fragment using the provided parameters. |  |  |      * this fragment using the provided parameters. | 
			
		
	
		
		
			
				
					|  |  |      * |  |  |  | 
			
		
	
		
		
			
				
					|  |  |      * @param sectionNumber |  |  |  | 
			
		
	
		
		
			
				
					|  |  |      * @return A new instance of fragment Recent. |  |  |      * @return A new instance of fragment Recent. | 
			
		
	
		
		
			
				
					|  |  |      */ |  |  |      */ | 
			
		
	
		
		
			
				
					|  |  |     public static RecentFragment newInstance(int sectionNumber) { |  |  |     public static RecentFragment newInstance(int sectionNumber) { | 
			
		
	
	
		
		
			
				
					|  | @ -79,15 +77,12 @@ public class RecentFragment extends BaseFragment { | 
			
		
	
		
		
			
				
					|  |  |     @Override |  |  |     @Override | 
			
		
	
		
		
			
				
					|  |  |     public void onActivityCreated(Bundle savedInstanceState) { |  |  |     public void onActivityCreated(Bundle savedInstanceState) { | 
			
		
	
		
		
			
				
					|  |  |         super.onActivityCreated(savedInstanceState); |  |  |         super.onActivityCreated(savedInstanceState); | 
			
		
	
		
		
			
				
					|  |  |         if (sectionNumber == 1)//temp
 |  |  |  | 
			
		
	
		
		
			
				
					|  |  |         { |  |  |  | 
			
		
	
		
		
			
				
					|  |  |         if (topicSummaries.isEmpty()) |  |  |         if (topicSummaries.isEmpty()) | 
			
		
	
		
		
			
				
					|  |  |         { |  |  |         { | 
			
		
	
		
		
			
				
					|  |  |             recentTask =new RecentTask(); |  |  |             recentTask =new RecentTask(); | 
			
		
	
		
		
			
				
					|  |  |             recentTask.execute(); |  |  |             recentTask.execute(); | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |  | 
			
		
	
		
		
			
				
					|  |  |         Report.d(TAG, "onActivityCreated"); |  |  |         Report.d(TAG, "onActivityCreated"); | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | @ -101,7 +96,7 @@ public class RecentFragment extends BaseFragment { | 
			
		
	
		
		
			
				
					|  |  |         // Set the adapter
 |  |  |         // Set the adapter
 | 
			
		
	
		
		
			
				
					|  |  |         if (rootView instanceof RelativeLayout) { |  |  |         if (rootView instanceof RelativeLayout) { | 
			
		
	
		
		
			
				
					|  |  |             progressBar = (ProgressBar) rootView.findViewById(R.id.progressBar); |  |  |             progressBar = (ProgressBar) rootView.findViewById(R.id.progressBar); | 
			
		
	
		
		
			
				
					
					|  |  |             recentAdapter = new RecentAdapter(topicSummaries, fragmentInteractionListener); |  |  |             recentAdapter = new RecentAdapter(getActivity(), topicSummaries, fragmentInteractionListener); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |             CustomRecyclerView recyclerView = (CustomRecyclerView) rootView.findViewById(R.id.list); |  |  |             CustomRecyclerView recyclerView = (CustomRecyclerView) rootView.findViewById(R.id.list); | 
			
		
	
		
		
			
				
					|  |  |             recyclerView.setLayoutManager(new LinearLayoutManager(rootView.findViewById(R.id.list).getContext())); |  |  |             recyclerView.setLayoutManager(new LinearLayoutManager(rootView.findViewById(R.id.list).getContext())); | 
			
		
	
	
		
		
			
				
					|  | @ -126,11 +121,13 @@ public class RecentFragment extends BaseFragment { | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |     @Override |  |  |     @Override | 
			
		
	
		
		
			
				
					
					|  |  |     protected void cancelTask() { |  |  |     public void onDestroy() { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |         super.onDestroy(); | 
			
		
	
		
		
			
				
					|  |  |         if(recentTask!=null&&recentTask.getStatus()!= AsyncTask.Status.RUNNING) |  |  |         if(recentTask!=null&&recentTask.getStatus()!= AsyncTask.Status.RUNNING) | 
			
		
	
		
		
			
				
					|  |  |             recentTask.cancel(true); |  |  |             recentTask.cancel(true); | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |     public interface RecentFragmentInteractionListener extends FragmentInteractionListener { |  |  |     public interface RecentFragmentInteractionListener extends FragmentInteractionListener { | 
			
		
	
		
		
			
				
					|  |  |         void onFragmentInteraction(TopicSummary topicSummary); |  |  |         void onFragmentInteraction(TopicSummary topicSummary); | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
	
		
		
			
				
					|  | @ -162,7 +159,7 @@ public class RecentFragment extends BaseFragment { | 
			
		
	
		
		
			
				
					|  |  |                 Report.d(TAG, "Network Error", e); |  |  |                 Report.d(TAG, "Network Error", e); | 
			
		
	
		
		
			
				
					|  |  |                 return 1; |  |  |                 return 1; | 
			
		
	
		
		
			
				
					|  |  |             } catch (Exception e) { |  |  |             } catch (Exception e) { | 
			
		
	
		
		
			
				
					
					|  |  |                 Report.d(TAG, "ERROR", e); |  |  |                 Report.d(TAG, "Exception", e); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |                 return 2; |  |  |                 return 2; | 
			
		
	
		
		
			
				
					|  |  |             } |  |  |             } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | 
 |