Rename Announcement Reaction to EmojiReaction
This commit is contained in:
parent
723c67fd0d
commit
5bf9743e00
|
@ -26,6 +26,7 @@ import com.keylesspalace.tusky.appstore.EventHub
|
|||
import com.keylesspalace.tusky.components.instanceinfo.InstanceInfoRepository
|
||||
import com.keylesspalace.tusky.entity.Announcement
|
||||
import com.keylesspalace.tusky.entity.Emoji
|
||||
import com.keylesspalace.tusky.entity.EmojiReaction
|
||||
import com.keylesspalace.tusky.network.MastodonApi
|
||||
import com.keylesspalace.tusky.util.Error
|
||||
import com.keylesspalace.tusky.util.Loading
|
||||
|
@ -108,7 +109,7 @@ class AnnouncementsViewModel @Inject constructor(
|
|||
listOf(
|
||||
*announcement.reactions.toTypedArray(),
|
||||
emojis.value!!.find { emoji -> emoji.shortcode == name }!!.run {
|
||||
Announcement.Reaction(
|
||||
EmojiReaction(
|
||||
name,
|
||||
1,
|
||||
true,
|
||||
|
|
|
@ -31,7 +31,7 @@ data class Announcement(
|
|||
val statuses: List<Status>,
|
||||
val tags: List<HashTag>,
|
||||
val emojis: List<Emoji>,
|
||||
val reactions: List<Reaction>
|
||||
val reactions: List<EmojiReaction>
|
||||
) {
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
|
@ -45,12 +45,4 @@ data class Announcement(
|
|||
override fun hashCode(): Int {
|
||||
return id.hashCode()
|
||||
}
|
||||
|
||||
data class Reaction(
|
||||
val name: String,
|
||||
val count: Int,
|
||||
val me: Boolean,
|
||||
val url: String?,
|
||||
@SerializedName("static_url") val staticUrl: String?
|
||||
)
|
||||
}
|
||||
|
|
|
@ -26,3 +26,11 @@ data class Emoji(
|
|||
@SerializedName("static_url") val staticUrl: String,
|
||||
@SerializedName("visible_in_picker") val visibleInPicker: Boolean?
|
||||
) : Parcelable
|
||||
|
||||
data class EmojiReaction(
|
||||
val name: String,
|
||||
val count: Int,
|
||||
val me: Boolean,
|
||||
val url: String?,
|
||||
@SerializedName("static_url") val staticUrl: String?,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue