mishabosin / android-instagram

CodePath day one
0 stars 0 forks source link

[Android Bootcamp] Day 4 Instagram Photo Viewer - networking service, cache, and refresh #4

Open mishabosin opened 8 years ago

mishabosin commented 8 years ago

Day 4 is code-complete, please review. /cc @codepathreview @codepath

nickai commented 8 years ago

:+1: Great work Misha! You've completed all the required parts of the assignment. All of tomorrow stories are optional. It's a great opportunity to circle back and tackle any of the optional stories earlier in the week or choose from one of the Friday optionals.

Below you can find the best practices for today's stories. Please read through this point-by-point to determine how you might be able to improve your submission.

  // this is the join table for posts and comments
  db.delete(TABLE_POSTS_COMMENTS, null, null);

  // posts reference both users and images
  db.delete(TABLE_POSTS, null, null);

  db.delete(TABLE_COMMENTS, null, null);

  // users and images refer to no other tables
  db.delete(TABLE_IMAGES, null, null);
  db.delete(TABLE_USERS, null, null);
   db.beginTransaction();
   try {
     ...
     db.setTransactionSuccessful();
   } finally {
     db.endTransaction();
   }
  List<InstagramPost> posts = new ArrayList<InstagramPost>();

  Intent intent = new Intent();
  intent.putExtra("posts", posts);

  // Extracting data on receipt of intent
  List<InstagramPost> fetchedPosts = getIntent().getParcelableArrayListExtra("posts");