Skip to content

Commit

Permalink
Update Store to expose the observable DAO functions
Browse files Browse the repository at this point in the history
  • Loading branch information
hichamboushaba committed Oct 16, 2023
1 parent 8c09ef2 commit c2d34a2
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class BlazeCampaignsStore @Inject constructor(
}
}

fun observeBlazeCampaigns(site: SiteModel) = campaignsDao.observeCampaigns(site.siteId)

suspend fun getMostRecentBlazeCampaign(site: SiteModel): BlazeCampaignModel? {
return coroutineEngine.withDefaultContext(
AppLog.T.API,
Expand All @@ -48,6 +50,8 @@ class BlazeCampaignsStore @Inject constructor(
}
}

fun observeMostRecentBlazeCampaign(site: SiteModel) = campaignsDao.observeMostRecentCampaignForSite(site.siteId)

private suspend fun storeBlazeCampaigns(
site: SiteModel,
payload: BlazeCampaignsFetchedPayload<BlazeCampaignsResponse>
Expand Down

0 comments on commit c2d34a2

Please sign in to comment.