TopBookmarks is not shown at times

RESOLVED DUPLICATE of bug 889612

Status

()

RESOLVED DUPLICATE of bug 889612
5 years ago
5 years ago

People

(Reporter: sriram, Assigned: sriram)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
STR:
1. Open bookmarks page.
2. Switch off screen.
3. Rotate phone
4. Switch on screen.
5. Where are the top bookmarks?
(Assignee)

Updated

5 years ago
Assignee: nobody → sriram
Blocks: 882365
(Assignee)

Comment 1

5 years ago
Created attachment 770423 [details] [diff] [review]
Patch

The TopBookmarksView (GridView) is added as a header to the BookmarksListView (ListView). The GridView is not attached to the window until it is added by the ListView. This happens during the layout pass. The ListView attaches the GridView. Unfortunately, the cursor loader returns a cursor to the GridView much faster, and the GridView's adapter is not ready until it is attached to the window. Hence the GridView is empty, even though added by the ListView. This patch moves the adapter initialization to the constructor, so the GridView can receive the cursor.

Note: Adapter can be moved out of the views, and be controlled by the fragment -- separate bug.

Note 2: Adapter for ListView cannot be done in the cursor, as the header view has to be added before setting the adapter.
Attachment #770423 - Flags: review?(bnicholson)
Comment on attachment 770423 [details] [diff] [review]
Patch

Review of attachment 770423 [details] [diff] [review]:
-----------------------------------------------------------------

This change is being folded into bug 889612.
Attachment #770423 - Flags: review?(bnicholson)
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 889612
You need to log in before you can comment on or make changes to this bug.