Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6146c002 authored by Nihar Thakkar's avatar Nihar Thakkar
Browse files

Fix errors caused by changes in API

parent 5b85e1a7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -78,7 +78,8 @@ class HomeRequest {
                                (data["ratings"] as LinkedHashMap<String, Int>)
                                        ["usageQualityScore"]!!.toFloat(),
                                (data["ratings"] as LinkedHashMap<String, Int>)
                                        ["privacyScore"]!!.toFloat()))
                                        ["privacyScore"]!!.toFloat()),
                        data["category"] as String)
                appsData.add(appData)
            }
            if (key == "banner_apps") {
+2 −1
Original line number Diff line number Diff line
@@ -26,7 +26,8 @@ constructor(@param:JsonProperty("package_name") val packageName: String,
            @param:JsonProperty("icon_image_path") private val iconUri: String,
            @param:JsonProperty("other_images_path") val imagesUri: Array<String>,
            @param:JsonProperty("exodus_score") val privacyRating: Float?,
            @param:JsonProperty("ratings") val ratings: Ratings) {
            @param:JsonProperty("ratings") val ratings: Ratings,
            @param:JsonProperty("category") val category: String) {

    private var icon: Bitmap? = null
    private var images: List<Bitmap>? = null
+4 −4
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ constructor(
        @JsonProperty("author") author: String,
        @JsonProperty("icon_image_path") iconUri: String,
        @JsonProperty("other_images_path") imagesUri: Array<String>,
        @JsonProperty("category") category_id: String,
        @JsonProperty("category") categoryId: String,
        @JsonProperty("created_on") val createdOn: String,
        @JsonProperty("source") val source: String,
        @JsonProperty("description") val description: String,
@@ -29,11 +29,11 @@ constructor(
    var basicData = if (ratings == null) {
        BasicData(packageName, id, name, -1f, lastModified, lastVersion,
                latestVersionNumber, latestDownloadableUpdate, author, iconUri, imagesUri,
                null, BasicData.Ratings(-1f, -1f))
                null, BasicData.Ratings(-1f, -1f), categoryId)
    } else {
        BasicData(packageName, id, name, -1f, lastModified, lastVersion,
                latestVersionNumber, latestDownloadableUpdate, author, iconUri, imagesUri,
                ratings.privacyRating, ratings)
                ratings.privacyRating, ratings, categoryId)
    }

    private val versions = HashMap<String, Version>()
@@ -51,7 +51,7 @@ constructor(
    val category: Category

    init {
        this.category = Category(category_id)
        this.category = Category(categoryId)
    }

    @Suppress("unused")