Skip to content

Commit

Permalink
Pass payload to the WPCom themes fetch action
Browse files Browse the repository at this point in the history
  • Loading branch information
hichamboushaba committed Nov 24, 2023
1 parent 9a5e76f commit da3624b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.wordpress.android.fluxc.model.SiteModel;
import org.wordpress.android.fluxc.model.ThemeModel;
import org.wordpress.android.fluxc.store.ThemeStore;
import org.wordpress.android.fluxc.store.ThemeStore.FetchedWpComThemesPayload;
import org.wordpress.android.fluxc.store.ThemeStore.OnCurrentThemeFetched;
import org.wordpress.android.fluxc.store.ThemeStore.OnSiteThemesChanged;
import org.wordpress.android.fluxc.store.ThemeStore.OnThemeActivated;
Expand Down Expand Up @@ -398,7 +399,7 @@ private void fetchCurrentTheme() {
private void fetchWpComThemesIfSyncTimedOut(boolean force) {
long currentTime = System.currentTimeMillis();
if (force || currentTime - AppPrefs.getLastWpComThemeSync() > WP_COM_THEMES_SYNC_TIMEOUT) {
mDispatcher.dispatch(ThemeActionBuilder.newFetchWpComThemesAction());
mDispatcher.dispatch(ThemeActionBuilder.newFetchWpComThemesAction(FetchedWpComThemesPayload()));
}
}

Expand Down

0 comments on commit da3624b

Please sign in to comment.