[fig] Update ReaderList Status when removed via ContextMenu

RESOLVED FIXED in Firefox 26

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: capella, Assigned: capella)

Tracking

Trunk
Firefox 26
ARM
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed-fig])

Attachments

(2 attachments)

(Assignee)

Description

5 years ago
Created attachment 774591 [details] [diff] [review]
bugreader WIP (v1)

This completes some logic in fig. When removing items from the Reading List panel by context menu |Remove|, this updates status of the In/Out ReaderMode icon and the ReaderList (Has/Has no items) icon in the readerlist panel (floating strip on the bottom of the screen).

Most of this was originally put into place in bug 802093 and bug 800899.
Attachment #774591 - Flags: feedback?(lucasr.at.mozilla)
(Assignee)

Updated

5 years ago
Assignee: nobody → markcapella
Status: NEW → ASSIGNED
Comment on attachment 774591 [details] [diff] [review]
bugreader WIP (v1)

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

Looks right overall, but needs the suggested fix.

::: mobile/android/base/home/HomeListView.java
@@ +134,5 @@
>              rowId = cursor.getInt(cursor.getColumnIndexOrThrow(Bookmarks._ID));
>              url = cursor.getString(cursor.getColumnIndexOrThrow(URLColumns.URL));
>              title = cursor.getString(cursor.getColumnIndexOrThrow(URLColumns.TITLE));
> +            inReadingList = cursor.getInt(cursor.getColumnIndexOrThrow(Bookmarks.PARENT)) ==
> +                Bookmarks.FIXED_READING_LIST_ID;

You should not assume this column is always available here. Get column index, if it returns != -1 then you set inReadingList explicitly. Set inReadingList to false otherwise.
Attachment #774591 - Flags: feedback?(lucasr.at.mozilla) → feedback+
(Assignee)

Comment 2

5 years ago
Created attachment 774739 [details] [diff] [review]
Patch (v2)

Oh! I get that! ( Thanks :-) )
Attachment #774739 - Flags: review?(lucasr.at.mozilla)
Comment on attachment 774739 [details] [diff] [review]
Patch (v2)

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

Nice.

::: mobile/android/base/home/HomeFragment.java
@@ +170,5 @@
> +                            e = GeckoEvent.createBroadcastEvent("Reader:ListCountUpdated", Integer.toString(aCount));
> +                            GeckoAppShell.sendEventToGecko(e);
> +                        }
> +
> +                       Toast.makeText(activity, messageId, Toast.LENGTH_SHORT).show();

nit: indentation is a bit off here.
Attachment #774739 - Flags: review?(lucasr.at.mozilla) → review+

Updated

5 years ago
Whiteboard: [fixed-fig]

Comment 5

5 years ago
https://hg.mozilla.org/mozilla-central/rev/f3f76c0ea2ce
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
You need to log in before you can comment on or make changes to this bug.