Skip to content

Commit

Permalink
Provide a freshness checker
Browse files Browse the repository at this point in the history
  • Loading branch information
squarejesse committed Jan 18, 2024
1 parent 8ea8f7f commit fa6bd97
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ package com.example.redwood.emojisearch.launcher

import app.cash.redwood.treehouse.TreehouseApp
import app.cash.zipline.Zipline
import app.cash.zipline.ZiplineManifest
import app.cash.zipline.loader.FreshnessChecker
import com.example.redwood.emojisearch.treehouse.EmojiSearchPresenter
import com.example.redwood.emojisearch.treehouse.HostApi
import com.example.redwood.emojisearch.treehouse.emojiSearchSerializersModule
Expand All @@ -29,6 +31,11 @@ class EmojiSearchAppSpec(
override val name = "emoji-search"
override val serializersModule = emojiSearchSerializersModule

override val freshnessChecker: FreshnessChecker
get() = object : FreshnessChecker {
override fun isFresh(manifest: ZiplineManifest, freshAtEpochMs: Long) = true
}

override fun bindServices(zipline: Zipline) {
zipline.bind<HostApi>("HostApi", hostApi)
}
Expand Down

0 comments on commit fa6bd97

Please sign in to comment.