Skip to content
This repository has been archived by the owner on Oct 16, 2022. It is now read-only.

Commit

Permalink
fixed crash when commenter was null in VideoChatMessage.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyAsadchy committed Jan 15, 2021
1 parent c427013 commit 04aa271
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
defaultConfig {
applicationId "com.github.exact7.xtra"
minSdkVersion 16
versionCode 96
versionCode 97
versionName "1.5.6.6"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
targetSdkVersion 29
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ data class VideoChatMessage(
val contentId: String,
@SerializedName("content_offset_seconds")
val contentOffsetSeconds: Double,
val commenter: Commenter,
val commenter: Commenter?,
val source: String,
val state: String,
@SerializedName("message")
Expand All @@ -26,7 +26,7 @@ data class VideoChatMessage(
val moreReplies: Boolean) : ChatMessage {

override val userName: String
get() = commenter.name
get() = commenter?.name.orEmpty()

override val message: String
get() = messageObj.body
Expand All @@ -46,7 +46,7 @@ data class VideoChatMessage(
override var subscriberBadge: SubscriberBadge? = null

override val displayName: String
get() = commenter.displayName
get() = commenter?.displayName.orEmpty()

data class Commenter(
@SerializedName("display_name")
Expand Down

0 comments on commit 04aa271

Please sign in to comment.