emojireactions: fix EmojiReaction object
This commit is contained in:
parent
5242466c2a
commit
483aae6c74
|
@ -9,6 +9,7 @@ data class FavoriteEvent(val statusId: String, val favourite: Boolean) : Dispatc
|
||||||
data class ReblogEvent(val statusId: String, val reblog: Boolean) : Dispatchable
|
data class ReblogEvent(val statusId: String, val reblog: Boolean) : Dispatchable
|
||||||
data class BookmarkEvent(val statusId: String, val bookmark: Boolean) : Dispatchable
|
data class BookmarkEvent(val statusId: String, val bookmark: Boolean) : Dispatchable
|
||||||
data class MuteStatusEvent(val statusId: String, val mute: Boolean) : Dispatchable
|
data class MuteStatusEvent(val statusId: String, val mute: Boolean) : Dispatchable
|
||||||
|
data class EmojiReactEvent(val statusId: String, val reacted: Boolean, val emoji: String) : Dispatchable
|
||||||
data class UnfollowEvent(val accountId: String) : Dispatchable
|
data class UnfollowEvent(val accountId: String) : Dispatchable
|
||||||
data class BlockEvent(val accountId: String) : Dispatchable
|
data class BlockEvent(val accountId: String) : Dispatchable
|
||||||
data class MuteEvent(val accountId: String) : Dispatchable
|
data class MuteEvent(val accountId: String) : Dispatchable
|
||||||
|
|
|
@ -28,8 +28,8 @@ data class Emoji(
|
||||||
|
|
||||||
@Parcelize
|
@Parcelize
|
||||||
data class EmojiReaction(
|
data class EmojiReaction(
|
||||||
val emoji: String,
|
val name: String,
|
||||||
val count: Int,
|
val count: Int,
|
||||||
val reacted: Boolean,
|
val me: Boolean,
|
||||||
val accounts: List<Account>? // only for emoji_reactions_by
|
val accounts: List<Account>? // only for emoji_reactions_by
|
||||||
) : Parcelable
|
) : Parcelable
|
||||||
|
|
|
@ -64,5 +64,6 @@ public interface StatusActionListener extends LinkListener {
|
||||||
void onVoteInPoll(int position, @NonNull List<Integer> choices);
|
void onVoteInPoll(int position, @NonNull List<Integer> choices);
|
||||||
|
|
||||||
default void onMute(int position, boolean isMuted) {}
|
default void onMute(int position, boolean isMuted) {}
|
||||||
|
default void onEmojiReact(final boolean react, final String emoji, final int position) {};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -584,20 +584,20 @@ interface MastodonApi {
|
||||||
@GET
|
@GET
|
||||||
fun getNodeinfo(@Url url: String) : Single<NodeInfo>
|
fun getNodeinfo(@Url url: String) : Single<NodeInfo>
|
||||||
|
|
||||||
@POST("api/v1/pleroma/statuses/{id}/react_with_emoji")
|
@PUT("api/v1/pleroma/statuses/{id}/reactions/{emoji}")
|
||||||
fun reactWithEmoji(
|
fun reactWithEmoji(
|
||||||
@Path("id") statusId: String,
|
@Path("id") statusId: String,
|
||||||
@Field("emoji") emoji: String
|
@Path("emoji") emoji: String
|
||||||
): Single<Status>
|
): Single<Status>
|
||||||
|
|
||||||
@POST("api/v1/pleroma/statuses/{id}/unreact_with_emoji")
|
@DELETE("api/v1/pleroma/statuses/{id}/reactions/{emoji}")
|
||||||
fun unreactWithEmoji(
|
fun unreactWithEmoji(
|
||||||
@Path("id") statusId: String,
|
@Path("id") statusId: String,
|
||||||
@Field("emoji") emoji: String
|
@Path("emoji") emoji: String
|
||||||
): Single<Status>
|
): Single<Status>
|
||||||
|
|
||||||
@GET("api/v1/pleroma/statuses/{id}/emoji_reactions_by")
|
@GET("api/v1/pleroma/statuses/{id}/reactions")
|
||||||
fun reactWithEmoji(
|
fun statusReactedBy(
|
||||||
@Path("id") statusId: String
|
@Path("id") statusId: String
|
||||||
): Single<Status>
|
): Single<List<EmojiReaction>>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue