Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3766)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java

Issue 2000233002: [NTP Snippets] Unschedule fetches when the service should be disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SnippetsDB
Patch Set: Please only look at ntp_snippets_service.*, the rest is because of the merge gone bad. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java
index 40a95d1be6cb6d2485186b384db40ecd5f14b356..7eb7c7e9f41ffbb225a546ac4dd4b4ad3df5b0ab 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java
@@ -480,6 +480,10 @@ public int getViewCountMatchingViewType(
* Change the peeking card's width, padding and children's opacity to give a smooth transition.
*/
private void updatePeekingCard() {
+ // TODO(dgn): got a ClassCastException here. No idea how that's possible.
+ // Returns the spacing item instead of the first snippet.
+ // Happened when I disabled sync, then went back to the ntp
+
// Get the first snippet that could display to make the peeking card transition.
ViewGroup firstSnippet =
(ViewGroup) getFirstViewMatchingViewType(NewTabPageListItem.VIEW_TYPE_SNIPPET);

Powered by Google App Engine
This is Rietveld 408576698