Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,17 @@ class ThemeRepository @Inject constructor(

val activationResult: OnThemeActivated = dispatcher.dispatchAndAwait(
ThemeActionBuilder.newActivateThemeAction(
SiteThemePayload(selectedSite.get(), ThemeModel().apply { this.themeId = themeId })
SiteThemePayload(
selectedSite.get(),
ThemeModel(
siteId = selectedSite.get().localId(),
themeId = themeId,
name = themeId,
demoUrl = null,
active = false,
isWpComTheme = false
)
)
)
)

Expand All @@ -113,9 +123,17 @@ class ThemeRepository @Inject constructor(
private suspend fun installThemeIfNeeded(themeId: String): Result<Unit> {
val installationResult: OnThemeInstalled = dispatcher.dispatchAndAwait(
ThemeActionBuilder.newInstallThemeAction(
// The Default constructor ThemeModel() is deprecated.
// We should add a new method to ThemeStore install a theme by themeId
SiteThemePayload(selectedSite.get(), ThemeModel().apply { this.themeId = themeId })
SiteThemePayload(
selectedSite.get(),
ThemeModel(
siteId = selectedSite.get().localId(),
themeId = themeId,
name = themeId,
demoUrl = null,
active = false,
isWpComTheme = false
)
)
)
)

Expand Down

This file was deleted.

Loading