Closed Bug 833942 Opened 10 years ago Closed 10 years ago

Add "remove" to about:home topsites

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(relnote-firefox 21+)

VERIFIED FIXED
Firefox 21
Tracking Status
relnote-firefox --- 21+

People

(Reporter: wesj, Assigned: wesj)

Details

Attachments

(1 file)

After talking to ian this morning, I realized this should be fairly simple. Accoding to his specs:

http://cl.ly/image/3U2v2c1O0Z3G/o

"Replace pinned site with a blank thumbnail. user can either ad a site to this spot, or see it replaced with an awesomebar result the next time they return to about:home. Remove behaves the same as in the Awesomescreen -- the item is removed from history."
Attached patch Patch v1Splinter Review
I hijacked the unpinSite function to do this because some/most of the logic is duplicated. If you have better naming or api ideas, I'd be happy to hear.
Attachment #705503 - Flags: review?(mark.finkle)
Comment on attachment 705503 [details] [diff] [review]
Patch v1

>diff --git a/mobile/android/base/AboutHomeContent.java b/mobile/android/base/AboutHomeContent.java

>+    public static enum UnpinFlags {
>+        REMOVE_HISTORY

Let's add REMOVE_PIN here too, so it's a complete set of flags


>+    public void unpinSite(final UnpinFlags removeFromHistory) {

removeFromHistory -> flags

>diff --git a/mobile/android/base/BrowserApp.java b/mobile/android/base/BrowserApp.java

>             case R.id.abouthome_topsites_unpin:
>-                mAboutHomeContent.unpinSite();
>+                mAboutHomeContent.unpinSite(null);

                  mAboutHomeContent.unpinSite(AboutHomeContent.UnpinFlags.REMOVE_PIN);


r+ with those nits fixed. I can make the changes and land it
Attachment #705503 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/mozilla-central/rev/d612985bf5ca
Assignee: nobody → wjohnston
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 21
Verified fixed on:
-build: Firefox for Android 21.0a1 (2013-02-10)
-device: Samsung Galaxy Nexus
-OS: Android 4.1.2
Status: RESOLVED → VERIFIED
Depends on: 847083
No longer depends on: 847083
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.