Closed
Bug 889612
Opened 10 years ago
Closed 10 years ago
BookmarksPage fragment should handle the adapters for its views
Categories
(Firefox for Android Graveyard :: Theme and Visual Design, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 26
People
(Reporter: sriram, Assigned: sriram)
References
Details
Attachments
(2 files)
27.09 KB,
patch
|
bnicholson
:
review+
|
Details | Diff | Splinter Review |
23.85 KB,
patch
|
bnicholson
:
review+
|
Details | Diff | Splinter Review |
Currently the views are holding the adapters that back them. Instead someone else (like a fragment) should be controlling these adapters. Given that the fragment is taking care of cursor loaders, it would be logical if the fragment is aware and takes care of the adapters as well.
Assignee | ||
Comment 1•10 years ago
|
||
Moved BookmarksListAdapter to a separate file. BookmarksPage will hold and handle things for it. (aah.. sooo cleaaaan)
Attachment #770464 -
Flags: review?(bnicholson)
Assignee | ||
Comment 2•10 years ago
|
||
Moved TopBookmarksAdapter to a separate file. BookmarksPage will take care of it. Additionally BookmarksPage will be responsible for triggerring LoadThumbnailsTask, as it holds the cursor and the adapter.
Attachment #770467 -
Flags: review?(bnicholson)
Assignee | ||
Comment 3•10 years ago
|
||
All cleanups done with Eclipse. So, no "unwanted imports" or "unused methods" anywhere. :D
Comment 4•10 years ago
|
||
Comment on attachment 770464 [details] [diff] [review] Part 1: BookmarksListAdapter Review of attachment 770464 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/home/BookmarksListAdapter.java @@ +33,5 @@ > + public static interface OnRefreshFolderListener { > + > + // The folder id to refresh the list with. > + public void onRefreshFolder(int folderId); > + Nit: remove both newlines @@ +95,5 @@ > + } > + > + /** > + * {@inheritDoc} > + */ This is redundant; JavaDoc will automatically inherit from the extended interface. @@ +134,5 @@ > + } > + > + /** > + * {@inheritDoc} > + */ Redundant
Attachment #770464 -
Flags: review?(bnicholson) → review+
Comment 6•10 years ago
|
||
Comment on attachment 770467 [details] [diff] [review] Part 2: TopBookmarksAdapter Review of attachment 770467 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/home/BookmarksPage.java @@ +258,5 @@ > + > + /** > + * An AsyncTask to load the thumbnails from a cursor. > + */ > + private class LoadThumbnailsTask extends UiAsyncTask<Cursor, Void, Map<String, Thumbnail>> { If the only reason this class is non-static is because it references mTopBookmarks, I'd suggest passing mTopBookmarks to the constructor. @@ +278,5 @@ > + final List<String> urls = new ArrayList<String>(); > + do { > + final String url = adapterCursor.getString(adapterCursor.getColumnIndexOrThrow(URLColumns.URL)); > + urls.add(url); > + } while(adapterCursor.moveToNext()); Nit: space before "("
Attachment #770467 -
Flags: review?(bnicholson) → review+
Assignee | ||
Comment 7•10 years ago
|
||
http://hg.mozilla.org/projects/fig/rev/22104d00bbdc http://hg.mozilla.org/projects/fig/rev/d9832319249b
Comment 8•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/22104d00bbdc https://hg.mozilla.org/mozilla-central/rev/d9832319249b
Assignee: nobody → sriram
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•