also looking at this
fix(mobile): preserve native editing, navigation, and durable media requests
#369
36 files
+864
-185
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -139,7 +139,10 @@ class DownloadProbe : android.app.Instrumentation() { | ||
| 139 | 139 | } |
| 140 | 140 | check(settledInfo.state == androidx.work.WorkInfo.State.RUNNING && settledInfo.progress.getBoolean("craft.media.attemptSettled", false), "the settled attempt still has WorkManager's running identity") |
| 141 | 141 | check(keep(settled), "an explicit keep replaces a settled running attempt immediately") |
| 142 | check(work.getWorkInfoById(settledRequest.id).get()!!.state == androidx.work.WorkInfo.State.CANCELLED, "the settled work identity was replaced, not joined") | |
| 142 | // REPLACE can prune the old WorkSpec. Inspect the current | |
| 143 | // unique chain rather than requiring the removed row. | |
| 144 | val replacement = work.getWorkInfosForUniqueWork(settledName).get() | |
| 145 | check(replacement.size == 1 && replacement.single().id != settledRequest.id && replacement.single().state != androidx.work.WorkInfo.State.CANCELLED, "the settled work identity was replaced, not joined") | |
| 143 | 146 | |
| 144 | 147 | val queued = "$base/queued.mp4" |
| 145 | 148 | val queuedName = "craft-media:${CraftNativeMedia.digest(queued)}:any" |