Closed
Bug 1328937
Opened 9 years ago
Closed 9 years ago
Simplify AS StreamItem class
Categories
(Firefox for Android Graveyard :: General, defect, P1)
Tracking
(firefox53 fixed)
RESOLVED
FIXED
Firefox 53
| Tracking | Status | |
|---|---|---|
| firefox53 | --- | fixed |
People
(Reporter: sebastian, Assigned: sebastian)
References
Details
(Whiteboard: [MobileAS])
Attachments
(6 files)
|
59 bytes,
text/x-review-board-request
|
Grisha
:
review+
|
Details |
|
59 bytes,
text/x-review-board-request
|
Grisha
:
review+
|
Details |
|
59 bytes,
text/x-review-board-request
|
Grisha
:
review+
|
Details |
|
59 bytes,
text/x-review-board-request
|
Grisha
:
review+
|
Details |
|
59 bytes,
text/x-review-board-request
|
Grisha
:
review+
|
Details |
|
1.24 KB,
patch
|
Details | Diff | Splinter Review |
The StreamItem class has grown a lot recently and it's getting more complex and unreadable. We should be able to make it simpler by just moving things around a bit.
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 6•9 years ago
|
||
It looks like there could be done more - but I'll stop now. :)
Updated•9 years ago
|
Iteration: 1.12 → 1.13
Comment 7•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8825020 [details]
Bug 1328937 - StreamItem: Move inner classes to separate files.
https://reviewboard.mozilla.org/r/103298/#review104378
Attachment #8825020 -
Flags: review?(gkruglov) → review+
Comment 8•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8825021 [details]
Bug 1328937 - HighlightItem: Make all properties 'private'.
https://reviewboard.mozilla.org/r/103300/#review104380
Attachment #8825021 -
Flags: review?(gkruglov) → review+
Comment 9•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8825022 [details]
Bug 1328937 - HighlightItem: Move data into separate Highlight / Metadata model classes.
https://reviewboard.mozilla.org/r/103302/#review104384
Attachment #8825022 -
Flags: review?(gkruglov) → review+
Comment 10•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8825023 [details]
Bug 1328937 - Extract TopSite model from stream adapter.
https://reviewboard.mozilla.org/r/103304/#review104386
::: mobile/android/base/java/org/mozilla/gecko/db/BrowserContract.java:600
(Diff revision 1)
> public static final int TYPE_TOP = 1;
> public static final int TYPE_PINNED = 2;
> public static final int TYPE_SUGGESTED = 3;
>
> + @IntDef({TYPE_BLANK, TYPE_TOP, TYPE_PINNED, TYPE_SUGGESTED})
> + public @interface TopSiteType {}
neat.
Attachment #8825023 -
Flags: review?(gkruglov) → review+
Comment 11•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8825024 [details]
Bug 1328937 - Introduce shared interface for activity stream models.
https://reviewboard.mozilla.org/r/103306/#review104398
Looks great, thanks for refactoring!
::: mobile/android/base/java/org/mozilla/gecko/home/activitystream/menu/ActivityStreamContextMenu.java:175
(Diff revision 1)
> }).execute();
> }
>
>
> @Override
> public boolean onNavigationItemSelected(MenuItem item) {
Perhaps rename this to menuItem, to keep things consistent? `this.item` and `item` might be too subtle of a distinction.
::: mobile/android/base/java/org/mozilla/gecko/home/activitystream/model/TopSite.java:18
(Diff revision 1)
> -public class TopSite {
> +public class TopSite implements Item {
> private final long id;
> private final String url;
> private final String title;
> - private @Nullable final Boolean isBookmarked;
> + private @Nullable Boolean isBookmarked;
> + private @Nullable Boolean isPinned;
Could mark this as final if you throw in updatePinned.
::: mobile/android/base/java/org/mozilla/gecko/home/activitystream/model/TopSite.java:80
(Diff revision 1)
> + this.isBookmarked = bookmarked;
> + }
> +
> + @Override
> + public void updatePinned(boolean pinned) {
> + this.isPinned = pinned;
We know pinned state for a top site, we won't be looking it up, so trying to set it anywhere outside of the constructor would indicate a mistake. I'd consider throwing an unsupported operation exception here.
Attachment #8825024 -
Flags: review?(gkruglov) → review+
| Comment hidden (mozreview-request) |
Comment 13•9 years ago
|
||
Pushed by s.kaspari@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/5d1623b6bcca
StreamItem: Move inner classes to separate files. r=Grisha
https://hg.mozilla.org/integration/autoland/rev/e1dbcf0b7019
HighlightItem: Make all properties 'private'. r=Grisha
https://hg.mozilla.org/integration/autoland/rev/927275a3ea2c
HighlightItem: Move data into separate Highlight / Metadata model classes. r=Grisha
https://hg.mozilla.org/integration/autoland/rev/1d0bc7e990fe
Extract TopSite model from stream adapter. r=Grisha
https://hg.mozilla.org/integration/autoland/rev/8e5f0fda8a89
Introduce shared interface for activity stream models. r=Grisha
| Assignee | ||
Comment 14•9 years ago
|
||
Comment 15•9 years ago
|
||
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/21f392a1ac51
Disable testActivityStreamContextMenu. a=bustagefix
Comment 16•9 years ago
|
||
Backout by cbook@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b05382b04834
Backed out changeset 21f392a1ac51
https://hg.mozilla.org/integration/autoland/rev/9a54e7a26af9
Backed out changeset 8e5f0fda8a89
https://hg.mozilla.org/integration/autoland/rev/b5dea4d18371
Backed out changeset 1d0bc7e990fe
https://hg.mozilla.org/integration/autoland/rev/dc639e004927
Backed out changeset 927275a3ea2c
https://hg.mozilla.org/integration/autoland/rev/189fb14e8725
Backed out changeset e1dbcf0b7019
https://hg.mozilla.org/integration/autoland/rev/fa6ea059ddb6
Backed out changeset 5d1623b6bcca for continued bustage on android
Comment 17•9 years ago
|
||
backed out for bustage like https://treeherder.mozilla.org/logviewer.html#?job_id=67976595&repo=autoland
Flags: needinfo?(s.kaspari)
| Assignee | ||
Comment 18•9 years ago
|
||
| Assignee | ||
Comment 19•9 years ago
|
||
| Assignee | ||
Comment 20•9 years ago
|
||
| Assignee | ||
Comment 21•9 years ago
|
||
| Assignee | ||
Comment 22•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/a02704bbf3dd8516dda5793a0a4acf284cbd7e96
Bug 1328937 - StreamItem: Move inner classes to separate files. r=Grisha
https://hg.mozilla.org/integration/mozilla-inbound/rev/5482f5e4a9fe054e5695fddd50307e4162434a3f
Bug 1328937 - HighlightItem: Make all properties 'private'. r=Grisha
https://hg.mozilla.org/integration/mozilla-inbound/rev/01c71778286955a376a7f2eb5d33a4144feea6e8
Bug 1328937 - HighlightItem: Move data into separate Highlight / Metadata model classes. r=Grisha
https://hg.mozilla.org/integration/mozilla-inbound/rev/56fe815d223bb5f2ed3812ac7b46cd3cbcfeed37
Bug 1328937 - Extract TopSite model from stream adapter. r=Grisha
https://hg.mozilla.org/integration/mozilla-inbound/rev/dfd542cec8f5c884f88528ed241f6a4915c21624
Bug 1328937 - Introduce shared interface for activity stream models. r=Grisha
https://hg.mozilla.org/integration/mozilla-inbound/rev/775b422efde3dd3ad62776198d6afea3db539de4
Bug 1328937 - Disable testActivityStreamContextMenu. r=me
Comment 23•9 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/a02704bbf3dd
https://hg.mozilla.org/mozilla-central/rev/5482f5e4a9fe
https://hg.mozilla.org/mozilla-central/rev/01c717782869
https://hg.mozilla.org/mozilla-central/rev/56fe815d223b
https://hg.mozilla.org/mozilla-central/rev/dfd542cec8f5
https://hg.mozilla.org/mozilla-central/rev/775b422efde3
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
| Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(s.kaspari)
Updated•5 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
•