Move SSD remote truth guards to typed Kotlin
ober
127527c4ea2d9a4414a56b0063f38f05194138d9
--- a/templates/ssd-review.ss +++ b/templates/ssd-review.ss @@ -8922,12 +8922,15 @@ " var imported = 0" " for (i in 0 until remoteTruthEntriesCount(entries)) {" " val entry = remoteTruthEntryAt(entries, i)" - " val truth = remoteTruthEntryTruth(entry) ?: continue" + " val entryTruth = remoteTruthEntryTruth(entry)" + " if (!remoteTruthPayloadHasTruth(entryTruth)) continue" + " val truth = remoteTruthPayloadTruthOrEmpty(entryTruth)" " val modified = remoteTruthEntryModified(entry)" " if (writeRemoteTruth(truth, modified)) imported += 1" " }" " val bestForSession = bestRemoteTruthForSession(session, entries)" - " bestForSession?.let { truth ->" + " if (remoteTruthPayloadHasTruth(bestForSession)) {" + " val truth = remoteTruthPayloadTruthOrEmpty(bestForSession)" " val cached = truthForSession(session, truth)" " if (writeRemoteTruth(cached, remoteTruthTimestamp(truth), replaceIfMoreComplete = true)) {" " imported += 1"