Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Commit 12d16ea

Browse files
Merge pull request #3032 from wordpress-mobile/fix/11718-update-blaze-campaign-title
Use site name as blaze campaign title
2 parents 0fe67fa + fa307d8 commit 12d16ea

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

example/src/test/java/org/wordpress/android/fluxc/store/blaze/BlazeCampaignsStoreTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ private val CAMPAIGN_RESPONSE = BlazeCampaign(
7676
id = CAMPAIGN_ID,
7777
image = CAMPAIGN_IMAGE,
7878
targetUrl = "https://example.com",
79-
textSnippet = TITLE,
80-
siteName = "siteName",
79+
textSnippet = "Text snippet",
80+
siteName = TITLE,
8181
clicks = CLICKS,
8282
impressions = IMPRESSIONS,
8383
spentBudget = SPENT_BUDGET,

fluxc/src/main/java/org/wordpress/android/fluxc/network/rest/wpcom/blaze/BlazeCampaignsResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ data class BlazeCampaign(
9090
val startDate = BlazeCampaignsUtils.stringToDate(startTime)
9191
return BlazeCampaignModel(
9292
campaignId = id,
93-
title = textSnippet,
93+
title = siteName,
9494
imageUrl = image.url,
9595
startTime = startDate,
9696
durationInDays = durationDays,

fluxc/src/main/java/org/wordpress/android/fluxc/persistence/blaze/BlazeCampaignsDao.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ abstract class BlazeCampaignsDao {
2525
@Query("SELECT * from BlazeCampaigns WHERE `siteId` = :siteId ORDER BY startTime DESC")
2626
abstract fun getCampaigns(siteId: Long): List<BlazeCampaignEntity>
2727

28-
@Query("SELECT * from BlazeCampaigns WHERE `siteId` = :siteId ORDER BY startTime DESC")
28+
@Query("SELECT * from BlazeCampaigns WHERE `siteId` = :siteId")
2929
abstract fun observeCampaigns(siteId: Long): Flow<List<BlazeCampaignEntity>>
3030

3131
@Query("SELECT * from BlazeCampaigns WHERE `siteId` = :siteId ORDER BY startTime DESC LIMIT 1")

0 commit comments

Comments
 (0)