fix(android): use explicit serializer form for encodeToString
Adding `<ResumePayload>` to encodeToString made it bind to the wrong overload — the compiler picked `encodeToString(SerializationStrategy<T>, T)` and tried to treat `payload` as the serializer. Switched to the explicit form: json.encodeToString(ResumePayload.serializer(), payload) Always unambiguous. (Decode is fine — `decodeFromString<T>(String)` isn't overloaded the same way.) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -88,7 +88,9 @@ class ResumeController @Inject constructor(
|
||||
positionMs = state.positionMs,
|
||||
)
|
||||
dao.upsert(
|
||||
CachedResumeStateEntity(json = json.encodeToString<ResumePayload>(payload)),
|
||||
CachedResumeStateEntity(
|
||||
json = json.encodeToString(ResumePayload.serializer(), payload),
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user