Browse Source

fix sticker properties

renovate/org.jetbrains.kotlinx-kotlinx-coroutines-test-1.x
Austin Huang 4 years ago
parent
commit
31ea42d105
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 2
      app/src/main/java/awais/instagrabber/repositories/responses/stories/QuestionSticker.kt
  2. 4
      app/src/main/java/awais/instagrabber/repositories/responses/stories/QuizSticker.kt
  3. 6
      app/src/main/java/awais/instagrabber/repositories/responses/stories/SliderSticker.kt
  4. 13
      app/src/main/java/awais/instagrabber/repositories/responses/stories/StoryAppAttribution.kt
  5. 4
      app/src/main/java/awais/instagrabber/repositories/responses/stories/Tally.kt

2
app/src/main/java/awais/instagrabber/repositories/responses/stories/QuestionSticker.kt

@ -6,7 +6,7 @@ import awais.instagrabber.repositories.responses.Location
import awais.instagrabber.repositories.responses.User
data class QuestionSticker(
val questionType: String?,
val questionType: String,
val questionId: Long,
val question: String
) : Serializable

4
app/src/main/java/awais/instagrabber/repositories/responses/stories/QuizSticker.kt

@ -6,8 +6,8 @@ import awais.instagrabber.repositories.responses.Location
import awais.instagrabber.repositories.responses.User
data class QuizSticker(
val quizId: Long?,
val question: String?,
val quizId: Long,
val question: String,
val tallies: List<Tally>,
var viewerAnswer: Int?,
val correctAnswer: Int

6
app/src/main/java/awais/instagrabber/repositories/responses/stories/SliderSticker.kt

@ -6,11 +6,11 @@ import awais.instagrabber.repositories.responses.Location
import awais.instagrabber.repositories.responses.User
data class SliderSticker(
val sliderId: Long?,
val question: String?,
val sliderId: Long,
val question: String,
val emoji: String?,
val viewerCanVote: Boolean?,
var viewerVote: Double?,
val viewerVote: Double?,
val sliderVoteAverage: Double?,
val sliderVoteCount: Int?,
) : Serializable

13
app/src/main/java/awais/instagrabber/repositories/responses/stories/StoryAppAttribution.kt

@ -1,9 +1,18 @@
package awais.instagrabber.repositories.responses.stories
import android.net.Uri
import java.io.Serializable
// https://github.com/austinhuang0131/barinsta/issues/1151
data class StoryAppAttribution(
val name: String?, // use name instead of app_action_text for button label
val name: String?,
val appActionText: String?,
val contentUrl: String?
) : Serializable
) : Serializable {
val url: String?
get() {
val uri = Uri.parse(contentUrl)
return if (uri.getHost().equals("open.spotify.com")) contentUrl?.split("?")?.get(0)
else contentUrl
}
}

4
app/src/main/java/awais/instagrabber/repositories/responses/stories/Tally.kt

@ -6,6 +6,6 @@ import awais.instagrabber.repositories.responses.Location
import awais.instagrabber.repositories.responses.User
data class Tally(
val text: String?,
val count: Int?
val text: String,
val count: Int
) : Serializable
Loading…
Cancel
Save