Commit f4e0cdc8 authored by sczs's avatar sczs Committed by Commit Bot

[ios] Calls refreshFeed on NTP reload.

Bug: 1085419
Change-Id: Ic038ca854016a3d2ad460ab1133527bedbd0ff78
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2343636
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarGanggui Tang <gogerald@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796178}
parent 9e9948f5
......@@ -502,6 +502,8 @@
}
- (void)reload {
if (IsDiscoverFeedEnabled())
ios::GetChromeBrowserProvider()->GetDiscoverFeedProvider()->RefreshFeed();
[self.contentSuggestionsMediator.dataSink reloadAllData];
}
......
......@@ -42,7 +42,11 @@ class DiscoverFeedProvider {
NS_RETURNS_RETAINED;
// Updates the feed's theme to match the user's theme (light/dark).
virtual void UpdateTheme();
// Refreshes the Discover Feed with completion.
// Refreshes the Discover Feed. Once the Feed model is refreshed it will
// update all ViewControllers returned by NewFeedViewController.
virtual void RefreshFeed();
// DEPRECATED. Delete once https://crrev.com/i/3205705 lands, along
// base/ios/block_types.h
virtual void RefreshFeedWithCompletion(ProceduralBlock completion);
// Methods to register or remove observers.
virtual void AddObserver(Observer* observer);
......
......@@ -19,6 +19,7 @@ UIViewController* DiscoverFeedProvider::NewFeedViewController(
void DiscoverFeedProvider::UpdateTheme() {}
void DiscoverFeedProvider::RefreshFeed() {}
void DiscoverFeedProvider::RefreshFeedWithCompletion(
ProceduralBlock completion) {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment