Skip to content

Commit 0cb879d

Browse files
committed
fix: Update GitHubRelease model
Use Klaxon's @JSON annotation to map JSON keys to field names.
1 parent 404e0c2 commit 0cb879d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/src/main/java/tech/httptoolkit/android/HttpToolkitApplication.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import androidx.core.content.edit
1010
import com.android.installreferrer.api.InstallReferrerClient
1111
import com.android.installreferrer.api.InstallReferrerClient.InstallReferrerResponse
1212
import com.android.installreferrer.api.InstallReferrerStateListener
13+
import com.beust.klaxon.Json
1314
import com.beust.klaxon.Klaxon
1415
import io.sentry.Sentry
1516
import kotlinx.coroutines.Dispatchers
@@ -288,8 +289,11 @@ private fun firstInstallTime(context: Context): Long {
288289
}
289290

290291
private data class GithubRelease(
292+
@Json(name = "tag_name")
291293
val tagName: String?,
294+
@Json(name = "name")
292295
val name: String?,
296+
@Json(name = "published_at")
293297
val publishedAt: String,
294298
)
295299

0 commit comments

Comments
 (0)