diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 38dd7be18..a9d103c4f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -5,6 +5,8 @@ plugins { id("org.jetbrains.kotlin.android") id("com.google.devtools.ksp") id("androidx.baselineprofile") + id("kotlin-parcelize") + } apply(from = "update_instances.gradle.kts") diff --git a/app/src/main/java/com/jerboa/datatypes/SampleData.kt b/app/src/main/java/com/jerboa/datatypes/SampleData.kt index 5a369b133..d7f5c6da7 100644 --- a/app/src/main/java/com/jerboa/datatypes/SampleData.kt +++ b/app/src/main/java/com/jerboa/datatypes/SampleData.kt @@ -215,6 +215,8 @@ val samplePostAggregates = PostAggregates( newest_comment_time_necro = "2022-01-02T04:02:44.592929", newest_comment_time = "2022-01-02T04:02:44.592929", published = "2022-01-02T04:02:44.592929", + hot_rank = 5, + hot_rank_active = 6, ) val samplePostView = PostView( @@ -346,6 +348,7 @@ val sampleCommentAggregates = CommentAggregates( downvotes = 4, published = "2022-01-02T04:02:44.592929", child_count = 0, + hot_rank = 6, ) val sampleCommentView = CommentView( @@ -444,6 +447,7 @@ val sampleCommunityAggregates = CommunityAggregates( users_active_week = 98, users_active_month = 82, users_active_half_year = 91, + hot_rank = 3, ) val sampleCommunityView = CommunityView( @@ -517,7 +521,6 @@ val sampleLocalSite = LocalSite( captcha_enabled = false, default_post_listing_type = ListingType.All, default_theme = "main", - federation_debug = false, federation_enabled = true, federation_worker_count = 64, id = 1, diff --git a/app/src/main/java/com/jerboa/datatypes/types/AddAdmin.kt b/app/src/main/java/com/jerboa/datatypes/types/AddAdmin.kt index ab216e080..ab44d860a 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/AddAdmin.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/AddAdmin.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class AddAdmin( val person_id: PersonId, val added: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/AddAdminResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/AddAdminResponse.kt index f808a8bef..ab989608d 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/AddAdminResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/AddAdminResponse.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class AddAdminResponse( val admins: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/AddModToCommunity.kt b/app/src/main/java/com/jerboa/datatypes/types/AddModToCommunity.kt index d427d2fb3..da1ae7325 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/AddModToCommunity.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/AddModToCommunity.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class AddModToCommunity( val community_id: CommunityId, val person_id: PersonId, val added: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/AddModToCommunityResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/AddModToCommunityResponse.kt index 84d988b61..824597ea7 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/AddModToCommunityResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/AddModToCommunityResponse.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class AddModToCommunityResponse( val moderators: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/AdminPurgeComment.kt b/app/src/main/java/com/jerboa/datatypes/types/AdminPurgeComment.kt index 73681d397..771512c44 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/AdminPurgeComment.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/AdminPurgeComment.kt @@ -1,9 +1,13 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class AdminPurgeComment( val id: Int, val admin_person_id: PersonId, val post_id: PostId, val reason: String? = null, val when_: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/AdminPurgeCommentView.kt b/app/src/main/java/com/jerboa/datatypes/types/AdminPurgeCommentView.kt index 2adec42e2..93b9b5194 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/AdminPurgeCommentView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/AdminPurgeCommentView.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class AdminPurgeCommentView( val admin_purge_comment: AdminPurgeComment, val admin: Person? = null, val post: Post, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/AdminPurgeCommunity.kt b/app/src/main/java/com/jerboa/datatypes/types/AdminPurgeCommunity.kt index 6bbcbc58c..700ade57d 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/AdminPurgeCommunity.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/AdminPurgeCommunity.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class AdminPurgeCommunity( val id: Int, val admin_person_id: PersonId, val reason: String? = null, val when_: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/AdminPurgeCommunityView.kt b/app/src/main/java/com/jerboa/datatypes/types/AdminPurgeCommunityView.kt index 0f8dcf1f8..2837ee18e 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/AdminPurgeCommunityView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/AdminPurgeCommunityView.kt @@ -1,6 +1,10 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class AdminPurgeCommunityView( val admin_purge_community: AdminPurgeCommunity, val admin: Person? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/AdminPurgePerson.kt b/app/src/main/java/com/jerboa/datatypes/types/AdminPurgePerson.kt index 02e879137..8ec5af5b4 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/AdminPurgePerson.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/AdminPurgePerson.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class AdminPurgePerson( val id: Int, val admin_person_id: PersonId, val reason: String? = null, val when_: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/AdminPurgePersonView.kt b/app/src/main/java/com/jerboa/datatypes/types/AdminPurgePersonView.kt index 1e6b8f09a..45841ec67 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/AdminPurgePersonView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/AdminPurgePersonView.kt @@ -1,6 +1,10 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class AdminPurgePersonView( val admin_purge_person: AdminPurgePerson, val admin: Person? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/AdminPurgePost.kt b/app/src/main/java/com/jerboa/datatypes/types/AdminPurgePost.kt index 219bca2de..d9afb0cb7 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/AdminPurgePost.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/AdminPurgePost.kt @@ -1,9 +1,13 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class AdminPurgePost( val id: Int, val admin_person_id: PersonId, val community_id: CommunityId, val reason: String? = null, val when_: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/AdminPurgePostView.kt b/app/src/main/java/com/jerboa/datatypes/types/AdminPurgePostView.kt index e471222f0..228a73245 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/AdminPurgePostView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/AdminPurgePostView.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class AdminPurgePostView( val admin_purge_post: AdminPurgePost, val admin: Person? = null, val community: Community, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ApproveRegistrationApplication.kt b/app/src/main/java/com/jerboa/datatypes/types/ApproveRegistrationApplication.kt index 5df4c7b33..2de47c870 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ApproveRegistrationApplication.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ApproveRegistrationApplication.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ApproveRegistrationApplication( val id: Int, val approve: Boolean, val deny_reason: String? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/BanFromCommunity.kt b/app/src/main/java/com/jerboa/datatypes/types/BanFromCommunity.kt index cd695c20d..fe67f262b 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/BanFromCommunity.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/BanFromCommunity.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class BanFromCommunity( val community_id: CommunityId, val person_id: PersonId, @@ -8,4 +12,4 @@ data class BanFromCommunity( val reason: String? = null, val expires: Int? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/BanFromCommunityResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/BanFromCommunityResponse.kt index 89d0ef827..ca0fba609 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/BanFromCommunityResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/BanFromCommunityResponse.kt @@ -1,6 +1,10 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class BanFromCommunityResponse( val person_view: PersonView, val banned: Boolean, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/BanPerson.kt b/app/src/main/java/com/jerboa/datatypes/types/BanPerson.kt index f70010c0c..49a9e61e9 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/BanPerson.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/BanPerson.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class BanPerson( val person_id: PersonId, val ban: Boolean, @@ -7,4 +11,4 @@ data class BanPerson( val reason: String? = null, val expires: Int? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/BanPersonResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/BanPersonResponse.kt index 36efdc7ac..55f2cb64e 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/BanPersonResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/BanPersonResponse.kt @@ -1,6 +1,10 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class BanPersonResponse( val person_view: PersonView, val banned: Boolean, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/BannedPersonsResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/BannedPersonsResponse.kt index 6f3b2d33f..684e00a40 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/BannedPersonsResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/BannedPersonsResponse.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class BannedPersonsResponse( val banned: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/BlockCommunity.kt b/app/src/main/java/com/jerboa/datatypes/types/BlockCommunity.kt index 8f84b5d9e..8cbe88714 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/BlockCommunity.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/BlockCommunity.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class BlockCommunity( val community_id: CommunityId, val block: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/BlockCommunityResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/BlockCommunityResponse.kt index b95b8c2aa..1a68513cb 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/BlockCommunityResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/BlockCommunityResponse.kt @@ -1,6 +1,10 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class BlockCommunityResponse( val community_view: CommunityView, val blocked: Boolean, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/BlockPerson.kt b/app/src/main/java/com/jerboa/datatypes/types/BlockPerson.kt index 0dcccbb3b..cb9fb9bf8 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/BlockPerson.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/BlockPerson.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class BlockPerson( val person_id: PersonId, val block: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/BlockPersonResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/BlockPersonResponse.kt index e2a23650b..d02cc9790 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/BlockPersonResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/BlockPersonResponse.kt @@ -1,6 +1,10 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class BlockPersonResponse( val person_view: PersonView, val blocked: Boolean, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CaptchaResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/CaptchaResponse.kt index 87f74ff69..0c961abe1 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CaptchaResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CaptchaResponse.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CaptchaResponse( val png: String, val wav: String, val uuid: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ChangePassword.kt b/app/src/main/java/com/jerboa/datatypes/types/ChangePassword.kt index 12f8c362c..d29016f1a 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ChangePassword.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ChangePassword.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ChangePassword( val new_password: String, val new_password_verify: String, val old_password: String, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/Comment.kt b/app/src/main/java/com/jerboa/datatypes/types/Comment.kt index ee9b2382f..98bc684ac 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/Comment.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/Comment.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class Comment( val id: CommentId, val creator_id: PersonId, @@ -14,4 +18,4 @@ data class Comment( val path: String, val distinguished: Boolean, val language_id: LanguageId, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CommentAggregates.kt b/app/src/main/java/com/jerboa/datatypes/types/CommentAggregates.kt index 546c0240b..b52b91376 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CommentAggregates.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CommentAggregates.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CommentAggregates( val id: Int, val comment_id: CommentId, @@ -8,4 +12,5 @@ data class CommentAggregates( val downvotes: Int, val published: String, val child_count: Int, -) + val hot_rank: Int, +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CommentReply.kt b/app/src/main/java/com/jerboa/datatypes/types/CommentReply.kt index 32eae7d96..5e64c3613 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CommentReply.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CommentReply.kt @@ -1,9 +1,13 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CommentReply( val id: CommentReplyId, val recipient_id: PersonId, val comment_id: CommentId, val read: Boolean, val published: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CommentReplyResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/CommentReplyResponse.kt index 7b26de577..0a3328da1 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CommentReplyResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CommentReplyResponse.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CommentReplyResponse( val comment_reply_view: CommentReplyView, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CommentReplyView.kt b/app/src/main/java/com/jerboa/datatypes/types/CommentReplyView.kt index 345b2e32e..6dd5a6cc2 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CommentReplyView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CommentReplyView.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CommentReplyView( val comment_reply: CommentReply, val comment: Comment, @@ -13,4 +17,4 @@ data class CommentReplyView( val saved: Boolean, val creator_blocked: Boolean, val my_vote: Int? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CommentReport.kt b/app/src/main/java/com/jerboa/datatypes/types/CommentReport.kt index 4430d3254..8cbe2a675 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CommentReport.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CommentReport.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CommentReport( val id: CommentReportId, val creator_id: PersonId, @@ -10,4 +14,4 @@ data class CommentReport( val resolver_id: PersonId? = null, val published: String, val updated: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CommentReportResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/CommentReportResponse.kt index 2bd1a62f6..8d1f1d919 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CommentReportResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CommentReportResponse.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CommentReportResponse( val comment_report_view: CommentReportView, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CommentReportView.kt b/app/src/main/java/com/jerboa/datatypes/types/CommentReportView.kt index 7d2bc1dbc..061f708f9 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CommentReportView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CommentReportView.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CommentReportView( val comment_report: CommentReport, val comment: Comment, @@ -11,4 +15,4 @@ data class CommentReportView( val creator_banned_from_community: Boolean, val my_vote: Int? = null, val resolver: Person? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CommentResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/CommentResponse.kt index 9914af6ec..4122a4695 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CommentResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CommentResponse.kt @@ -1,7 +1,13 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class CommentResponse( val comment_view: CommentView, val recipient_ids: List, val form_id: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CommentView.kt b/app/src/main/java/com/jerboa/datatypes/types/CommentView.kt index e5a869aaa..8a1a089af 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CommentView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CommentView.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CommentView( val comment: Comment, val creator: Person, @@ -11,4 +15,4 @@ data class CommentView( val saved: Boolean, val creator_blocked: Boolean, val my_vote: Int? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/Community.kt b/app/src/main/java/com/jerboa/datatypes/types/Community.kt index dbb9314c7..54b76a887 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/Community.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/Community.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class Community( val id: CommunityId, val name: String, @@ -17,4 +21,4 @@ data class Community( val hidden: Boolean, val posting_restricted_to_mods: Boolean, val instance_id: InstanceId, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CommunityAggregates.kt b/app/src/main/java/com/jerboa/datatypes/types/CommunityAggregates.kt index 729c435aa..d04fb3612 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CommunityAggregates.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CommunityAggregates.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CommunityAggregates( val id: Int, val community_id: CommunityId, @@ -11,4 +15,5 @@ data class CommunityAggregates( val users_active_week: Int, val users_active_month: Int, val users_active_half_year: Int, -) + val hot_rank: Int, +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CommunityBlockView.kt b/app/src/main/java/com/jerboa/datatypes/types/CommunityBlockView.kt index cf1d04604..4a9f37b86 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CommunityBlockView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CommunityBlockView.kt @@ -1,6 +1,10 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CommunityBlockView( val person: Person, val community: Community, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CommunityFollowerView.kt b/app/src/main/java/com/jerboa/datatypes/types/CommunityFollowerView.kt index b72e43d43..b7d1d30c1 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CommunityFollowerView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CommunityFollowerView.kt @@ -1,6 +1,10 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CommunityFollowerView( val community: Community, val follower: Person, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CommunityJoin.kt b/app/src/main/java/com/jerboa/datatypes/types/CommunityJoin.kt index 770ba6670..76da4159a 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CommunityJoin.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CommunityJoin.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CommunityJoin( val community_id: CommunityId, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CommunityJoinResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/CommunityJoinResponse.kt index 8b8f8e529..1ec446dab 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CommunityJoinResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CommunityJoinResponse.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CommunityJoinResponse( val joined: Boolean, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CommunityModeratorView.kt b/app/src/main/java/com/jerboa/datatypes/types/CommunityModeratorView.kt index 33ed511ff..7b25415da 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CommunityModeratorView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CommunityModeratorView.kt @@ -1,6 +1,10 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CommunityModeratorView( val community: Community, val moderator: Person, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CommunityResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/CommunityResponse.kt index ab2fbf2e4..aed49a7e4 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CommunityResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CommunityResponse.kt @@ -1,6 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class CommunityResponse( val community_view: CommunityView, val discussion_languages: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CommunityView.kt b/app/src/main/java/com/jerboa/datatypes/types/CommunityView.kt index e9a885b96..257515bbd 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CommunityView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CommunityView.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CommunityView( val community: Community, val subscribed: SubscribedType /* "Subscribed" | "NotSubscribed" | "Pending" */, val blocked: Boolean, val counts: CommunityAggregates, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CreateComment.kt b/app/src/main/java/com/jerboa/datatypes/types/CreateComment.kt index ebbbb95f6..a3041a113 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CreateComment.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CreateComment.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CreateComment( val content: String, val post_id: PostId, @@ -7,4 +11,4 @@ data class CreateComment( val language_id: LanguageId? = null, val form_id: String? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CreateCommentLike.kt b/app/src/main/java/com/jerboa/datatypes/types/CreateCommentLike.kt index df2790b4e..b43bb5487 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CreateCommentLike.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CreateCommentLike.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CreateCommentLike( val comment_id: CommentId, val score: Int, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CreateCommentReport.kt b/app/src/main/java/com/jerboa/datatypes/types/CreateCommentReport.kt index a86731f2a..ebff031e9 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CreateCommentReport.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CreateCommentReport.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CreateCommentReport( val comment_id: CommentId, val reason: String, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CreateCommunity.kt b/app/src/main/java/com/jerboa/datatypes/types/CreateCommunity.kt index 0bda4ef69..d5f31a5b8 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CreateCommunity.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CreateCommunity.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class CreateCommunity( val name: String, val title: String, @@ -10,4 +16,4 @@ data class CreateCommunity( val posting_restricted_to_mods: Boolean? = null, val discussion_languages: List? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CreateCustomEmoji.kt b/app/src/main/java/com/jerboa/datatypes/types/CreateCustomEmoji.kt index 2823ce907..aa6510e5a 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CreateCustomEmoji.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CreateCustomEmoji.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class CreateCustomEmoji( val category: String, val shortcode: String, @@ -7,4 +13,4 @@ data class CreateCustomEmoji( val alt_text: String, val keywords: List, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CreatePost.kt b/app/src/main/java/com/jerboa/datatypes/types/CreatePost.kt index 4dc5c7377..c3df25277 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CreatePost.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CreatePost.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CreatePost( val name: String, val community_id: CommunityId, @@ -9,4 +13,4 @@ data class CreatePost( val nsfw: Boolean? = null, val language_id: LanguageId? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CreatePostLike.kt b/app/src/main/java/com/jerboa/datatypes/types/CreatePostLike.kt index c0503bd93..269398035 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CreatePostLike.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CreatePostLike.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CreatePostLike( val post_id: PostId, val score: Int, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CreatePostReport.kt b/app/src/main/java/com/jerboa/datatypes/types/CreatePostReport.kt index f53d093e7..9c378e5e8 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CreatePostReport.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CreatePostReport.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CreatePostReport( val post_id: PostId, val reason: String, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CreatePrivateMessage.kt b/app/src/main/java/com/jerboa/datatypes/types/CreatePrivateMessage.kt index 682e57b55..5ded01c07 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CreatePrivateMessage.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CreatePrivateMessage.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CreatePrivateMessage( val content: String, val recipient_id: PersonId, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CreatePrivateMessageReport.kt b/app/src/main/java/com/jerboa/datatypes/types/CreatePrivateMessageReport.kt index 842655439..e8822d1e7 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CreatePrivateMessageReport.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CreatePrivateMessageReport.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CreatePrivateMessageReport( val private_message_id: PrivateMessageId, val reason: String, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CreateSite.kt b/app/src/main/java/com/jerboa/datatypes/types/CreateSite.kt index d936054e1..0bcb9ad0b 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CreateSite.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CreateSite.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class CreateSite( val name: String, val sidebar: String? = null, @@ -42,4 +48,4 @@ data class CreateSite( val taglines: List? = null, val registration_mode: RegistrationMode? /* "Closed" | "RequireApplication" | "Open" */ = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CustomEmoji.kt b/app/src/main/java/com/jerboa/datatypes/types/CustomEmoji.kt index 9a09213e7..2681ae6e9 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CustomEmoji.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CustomEmoji.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CustomEmoji( val id: CustomEmojiId, val local_site_id: LocalSiteId, @@ -9,4 +13,4 @@ data class CustomEmoji( val category: String, val published: String, val updated: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CustomEmojiKeyword.kt b/app/src/main/java/com/jerboa/datatypes/types/CustomEmojiKeyword.kt index f113a925a..dfe7aff91 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CustomEmojiKeyword.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CustomEmojiKeyword.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CustomEmojiKeyword( val id: Int, val custom_emoji_id: CustomEmojiId, val keyword: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CustomEmojiResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/CustomEmojiResponse.kt index 105e00c0f..117019111 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CustomEmojiResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CustomEmojiResponse.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class CustomEmojiResponse( val custom_emoji: CustomEmojiView, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/CustomEmojiView.kt b/app/src/main/java/com/jerboa/datatypes/types/CustomEmojiView.kt index 1bc47d7ed..d3fe78b00 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/CustomEmojiView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/CustomEmojiView.kt @@ -1,6 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class CustomEmojiView( val custom_emoji: CustomEmoji, val keywords: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/DeleteAccount.kt b/app/src/main/java/com/jerboa/datatypes/types/DeleteAccount.kt index dff4a0f2a..40284c904 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/DeleteAccount.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/DeleteAccount.kt @@ -1,6 +1,10 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class DeleteAccount( val password: String, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/DeleteComment.kt b/app/src/main/java/com/jerboa/datatypes/types/DeleteComment.kt index b59cae6c6..e43715764 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/DeleteComment.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/DeleteComment.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class DeleteComment( val comment_id: CommentId, val deleted: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/DeleteCommunity.kt b/app/src/main/java/com/jerboa/datatypes/types/DeleteCommunity.kt index 0a48925e7..c2631b05e 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/DeleteCommunity.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/DeleteCommunity.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class DeleteCommunity( val community_id: CommunityId, val deleted: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/DeleteCustomEmoji.kt b/app/src/main/java/com/jerboa/datatypes/types/DeleteCustomEmoji.kt index d35369334..1ea6521be 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/DeleteCustomEmoji.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/DeleteCustomEmoji.kt @@ -1,6 +1,10 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class DeleteCustomEmoji( val id: CustomEmojiId, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/DeleteCustomEmojiResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/DeleteCustomEmojiResponse.kt index a70a8a6c8..01ce68910 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/DeleteCustomEmojiResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/DeleteCustomEmojiResponse.kt @@ -1,6 +1,10 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class DeleteCustomEmojiResponse( val id: CustomEmojiId, val success: Boolean, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/DeletePost.kt b/app/src/main/java/com/jerboa/datatypes/types/DeletePost.kt index 35a0bd066..c1ae758d0 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/DeletePost.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/DeletePost.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class DeletePost( val post_id: PostId, val deleted: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/DeletePrivateMessage.kt b/app/src/main/java/com/jerboa/datatypes/types/DeletePrivateMessage.kt index 2988f8095..307bc8fe6 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/DeletePrivateMessage.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/DeletePrivateMessage.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class DeletePrivateMessage( val private_message_id: PrivateMessageId, val deleted: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/DistinguishComment.kt b/app/src/main/java/com/jerboa/datatypes/types/DistinguishComment.kt index 5fb562817..40cd0818f 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/DistinguishComment.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/DistinguishComment.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class DistinguishComment( val comment_id: CommentId, val distinguished: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/EditComment.kt b/app/src/main/java/com/jerboa/datatypes/types/EditComment.kt index efe91bcfc..52724e537 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/EditComment.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/EditComment.kt @@ -1,9 +1,13 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class EditComment( val comment_id: CommentId, val content: String? = null, val language_id: LanguageId? = null, val form_id: String? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/EditCommunity.kt b/app/src/main/java/com/jerboa/datatypes/types/EditCommunity.kt index 08141c0c4..5842c07e1 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/EditCommunity.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/EditCommunity.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class EditCommunity( val community_id: CommunityId, val title: String? = null, @@ -10,4 +16,4 @@ data class EditCommunity( val posting_restricted_to_mods: Boolean? = null, val discussion_languages: List? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/EditCustomEmoji.kt b/app/src/main/java/com/jerboa/datatypes/types/EditCustomEmoji.kt index d670aa402..15a22033d 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/EditCustomEmoji.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/EditCustomEmoji.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class EditCustomEmoji( val id: CustomEmojiId, val category: String, @@ -7,4 +13,4 @@ data class EditCustomEmoji( val alt_text: String, val keywords: List, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/EditPost.kt b/app/src/main/java/com/jerboa/datatypes/types/EditPost.kt index f46b7a5c1..0b3364300 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/EditPost.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/EditPost.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class EditPost( val post_id: PostId, val name: String? = null, @@ -8,4 +12,4 @@ data class EditPost( val nsfw: Boolean? = null, val language_id: LanguageId? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/EditPrivateMessage.kt b/app/src/main/java/com/jerboa/datatypes/types/EditPrivateMessage.kt index f1f85c6cc..6a880b3be 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/EditPrivateMessage.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/EditPrivateMessage.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class EditPrivateMessage( val private_message_id: PrivateMessageId, val content: String, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/EditSite.kt b/app/src/main/java/com/jerboa/datatypes/types/EditSite.kt index 5248edad3..573b9159a 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/EditSite.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/EditSite.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class EditSite( val name: String? = null, val sidebar: String? = null, @@ -43,4 +49,4 @@ data class EditSite( val registration_mode: RegistrationMode? /* "Closed" | "RequireApplication" | "Open" */ = null, val reports_email_admins: Boolean? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/FeaturePost.kt b/app/src/main/java/com/jerboa/datatypes/types/FeaturePost.kt index 9248292e6..8e8a2f19b 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/FeaturePost.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/FeaturePost.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class FeaturePost( val post_id: PostId, val featured: Boolean, val feature_type: PostFeatureType /* "Local" | "Community" */, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/FederatedInstances.kt b/app/src/main/java/com/jerboa/datatypes/types/FederatedInstances.kt index 2ccbe5bf9..de004f6db 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/FederatedInstances.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/FederatedInstances.kt @@ -1,7 +1,13 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class FederatedInstances( val linked: List, val allowed: List, val blocked: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/FollowCommunity.kt b/app/src/main/java/com/jerboa/datatypes/types/FollowCommunity.kt index 81a7fce13..17bea49e1 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/FollowCommunity.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/FollowCommunity.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class FollowCommunity( val community_id: CommunityId, val follow: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetBannedPersons.kt b/app/src/main/java/com/jerboa/datatypes/types/GetBannedPersons.kt index 7c80e7ec2..383c47612 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetBannedPersons.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetBannedPersons.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetBannedPersons( val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetCaptcha.kt b/app/src/main/java/com/jerboa/datatypes/types/GetCaptcha.kt index fec23fb1a..d77ff45b6 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetCaptcha.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetCaptcha.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetCaptcha( val auth: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetCaptchaResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/GetCaptchaResponse.kt index b35d8aace..b0c58cfe3 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetCaptchaResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetCaptchaResponse.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetCaptchaResponse( val ok: CaptchaResponse? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetComment.kt b/app/src/main/java/com/jerboa/datatypes/types/GetComment.kt index c727b24e5..dbad35fbe 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetComment.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetComment.kt @@ -1,6 +1,10 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetComment( val id: CommentId, val auth: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetComments.kt b/app/src/main/java/com/jerboa/datatypes/types/GetComments.kt index 3f88200ee..d47a80ef0 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetComments.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetComments.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetComments( val type_: ListingType? /* "All" | "Local" | "Subscribed" */ = null, val sort: CommentSortType? /* "Hot" | "Top" | "New" | "Old" */ = null, @@ -12,4 +16,4 @@ data class GetComments( val parent_id: CommentId? = null, val saved_only: Boolean? = null, val auth: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetCommentsResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/GetCommentsResponse.kt index 33398dfdb..85ab45a9b 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetCommentsResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetCommentsResponse.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class GetCommentsResponse( val comments: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetCommunity.kt b/app/src/main/java/com/jerboa/datatypes/types/GetCommunity.kt index 5bcdfe0bd..40eea162f 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetCommunity.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetCommunity.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetCommunity( val id: CommunityId? = null, val name: String? = null, val auth: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetCommunityResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/GetCommunityResponse.kt index bb68f8fbb..240bfd591 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetCommunityResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetCommunityResponse.kt @@ -1,10 +1,14 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class GetCommunityResponse( val community_view: CommunityView, val site: Site? = null, val moderators: List, - val online: Int, val discussion_languages: List, - val default_post_language: LanguageId? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetFederatedInstances.kt b/app/src/main/java/com/jerboa/datatypes/types/GetFederatedInstances.kt index 9c35729f9..ba70dac73 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetFederatedInstances.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetFederatedInstances.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetFederatedInstances( val auth: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetFederatedInstancesResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/GetFederatedInstancesResponse.kt index f27fa22da..b13c9f6ad 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetFederatedInstancesResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetFederatedInstancesResponse.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetFederatedInstancesResponse( val federated_instances: FederatedInstances? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetModlog.kt b/app/src/main/java/com/jerboa/datatypes/types/GetModlog.kt index 9722074f8..b8d40ece7 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetModlog.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetModlog.kt @@ -1,11 +1,15 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetModlog( val mod_person_id: PersonId? = null, val community_id: CommunityId? = null, val page: Int? = null, val limit: Int? = null, - val type_: ModlogActionType? /* "All" | "ModRemovePost" | "ModLockPost" | "ModFeaturePost" | "ModRemoveComment" | "ModRemoveCommunity" | "ModBanFromCommunity" | "ModAddCommunity" | "ModTransferCommunity" | "ModAdd" | "ModBan" | "ModHideCommunity" | "AdminPurgePerson" | "AdminPurgeCommunity" | "AdminPurgePost" | "AdminPurgeComment" */ = null, + val type_: ListingType? /* "All" | "ModRemovePost" | "ModLockPost" | "ModFeaturePost" | "ModRemoveComment" | "ModRemoveCommunity" | "ModBanFromCommunity" | "ModAddCommunity" | "ModTransferCommunity" | "ModAdd" | "ModBan" | "ModHideCommunity" | "AdminPurgePerson" | "AdminPurgeCommunity" | "AdminPurgePost" | "AdminPurgeComment" */ = null, val other_person_id: PersonId? = null, val auth: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetModlogResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/GetModlogResponse.kt index 5a7d139b8..4f9c0d181 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetModlogResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetModlogResponse.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class GetModlogResponse( val removed_posts: List, val locked_posts: List, @@ -16,4 +22,4 @@ data class GetModlogResponse( val admin_purged_posts: List, val admin_purged_comments: List, val hidden_communities: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetPersonDetails.kt b/app/src/main/java/com/jerboa/datatypes/types/GetPersonDetails.kt index f7aeff740..35b4c73a7 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetPersonDetails.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetPersonDetails.kt @@ -1,12 +1,16 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetPersonDetails( val person_id: PersonId? = null, val username: String? = null, - val sort: SortType? /* "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" */ = null, + val sort: SortType? /* "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" | "TopHour" | "TopSixHour" | "TopTwelveHour" */ = null, val page: Int? = null, val limit: Int? = null, val community_id: CommunityId? = null, val saved_only: Boolean? = null, val auth: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetPersonDetailsResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/GetPersonDetailsResponse.kt index bdee94a51..ed020b32d 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetPersonDetailsResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetPersonDetailsResponse.kt @@ -1,8 +1,14 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class GetPersonDetailsResponse( val person_view: PersonView, val comments: List, val posts: List, val moderates: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetPersonMentions.kt b/app/src/main/java/com/jerboa/datatypes/types/GetPersonMentions.kt index 84bb0ed60..07d20afef 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetPersonMentions.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetPersonMentions.kt @@ -1,9 +1,13 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetPersonMentions( val sort: CommentSortType? /* "Hot" | "Top" | "New" | "Old" */ = null, val page: Int? = null, val limit: Int? = null, val unread_only: Boolean? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetPersonMentionsResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/GetPersonMentionsResponse.kt index ffe5128fc..521685f3d 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetPersonMentionsResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetPersonMentionsResponse.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class GetPersonMentionsResponse( val mentions: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetPost.kt b/app/src/main/java/com/jerboa/datatypes/types/GetPost.kt index 71897270e..ef3bcf88c 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetPost.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetPost.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetPost( val id: PostId? = null, val comment_id: CommentId? = null, val auth: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetPostResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/GetPostResponse.kt index 5b7f4a672..e16b73966 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetPostResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetPostResponse.kt @@ -1,9 +1,14 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class GetPostResponse( val post_view: PostView, val community_view: CommunityView, val moderators: List, val cross_posts: List, - val online: Int, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetPosts.kt b/app/src/main/java/com/jerboa/datatypes/types/GetPosts.kt index 6f96a6f16..2206e5cc9 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetPosts.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetPosts.kt @@ -1,12 +1,16 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetPosts( val type_: ListingType? /* "All" | "Local" | "Subscribed" */ = null, - val sort: SortType? /* "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" */ = null, + val sort: SortType? /* "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" | "TopHour" | "TopSixHour" | "TopTwelveHour" */ = null, val page: Int? = null, val limit: Int? = null, val community_id: CommunityId? = null, val community_name: String? = null, val saved_only: Boolean? = null, val auth: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetPostsResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/GetPostsResponse.kt index fcd76d164..b79355aac 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetPostsResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetPostsResponse.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class GetPostsResponse( val posts: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetPrivateMessages.kt b/app/src/main/java/com/jerboa/datatypes/types/GetPrivateMessages.kt index 4c09f2f4c..2b800c81c 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetPrivateMessages.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetPrivateMessages.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetPrivateMessages( val unread_only: Boolean? = null, val page: Int? = null, val limit: Int? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetReplies.kt b/app/src/main/java/com/jerboa/datatypes/types/GetReplies.kt index 64e4563a1..ae93b8bd4 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetReplies.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetReplies.kt @@ -1,9 +1,13 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetReplies( val sort: CommentSortType? /* "Hot" | "Top" | "New" | "Old" */ = null, val page: Int? = null, val limit: Int? = null, val unread_only: Boolean? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetRepliesResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/GetRepliesResponse.kt index 78caa16aa..b594ec943 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetRepliesResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetRepliesResponse.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class GetRepliesResponse( val replies: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetReportCount.kt b/app/src/main/java/com/jerboa/datatypes/types/GetReportCount.kt index eb76ea530..1ceb1932c 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetReportCount.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetReportCount.kt @@ -1,6 +1,10 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetReportCount( val community_id: CommunityId? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetReportCountResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/GetReportCountResponse.kt index cfc373854..841685b35 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetReportCountResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetReportCountResponse.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetReportCountResponse( val community_id: CommunityId? = null, val comment_reports: Int, val post_reports: Int, val private_message_reports: Int? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetSite.kt b/app/src/main/java/com/jerboa/datatypes/types/GetSite.kt index 0ea722166..b54629ad2 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetSite.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetSite.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetSite( val auth: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetSiteMetadata.kt b/app/src/main/java/com/jerboa/datatypes/types/GetSiteMetadata.kt index 3020b86a0..5891b9a28 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetSiteMetadata.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetSiteMetadata.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetSiteMetadata( val url: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetSiteMetadataResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/GetSiteMetadataResponse.kt index 87a71082c..545ff92d6 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetSiteMetadataResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetSiteMetadataResponse.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetSiteMetadataResponse( val metadata: SiteMetadata, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetSiteResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/GetSiteResponse.kt index 7726df442..c152583f6 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetSiteResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetSiteResponse.kt @@ -1,13 +1,18 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class GetSiteResponse( val site_view: SiteView, val admins: List, - val online: Int, val version: String, val my_user: MyUserInfo? = null, val all_languages: List, val discussion_languages: List, val taglines: List, val custom_emojis: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetUnreadCount.kt b/app/src/main/java/com/jerboa/datatypes/types/GetUnreadCount.kt index 2988e7716..0896172da 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetUnreadCount.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetUnreadCount.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetUnreadCount( val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetUnreadCountResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/GetUnreadCountResponse.kt index 5274438f3..b5a3842e9 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetUnreadCountResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetUnreadCountResponse.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetUnreadCountResponse( val replies: Int, val mentions: Int, val private_messages: Int, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetUnreadRegistrationApplicationCount.kt b/app/src/main/java/com/jerboa/datatypes/types/GetUnreadRegistrationApplicationCount.kt index d3ba6f270..629f65c5f 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetUnreadRegistrationApplicationCount.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetUnreadRegistrationApplicationCount.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetUnreadRegistrationApplicationCount( val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/GetUnreadRegistrationApplicationCountResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/GetUnreadRegistrationApplicationCountResponse.kt index cb46877dd..85bb8074a 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/GetUnreadRegistrationApplicationCountResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/GetUnreadRegistrationApplicationCountResponse.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class GetUnreadRegistrationApplicationCountResponse( val registration_applications: Int, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/HideCommunity.kt b/app/src/main/java/com/jerboa/datatypes/types/HideCommunity.kt index 0e9f88b75..56b9ddbc9 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/HideCommunity.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/HideCommunity.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class HideCommunity( val community_id: CommunityId, val hidden: Boolean, val reason: String? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/Instance.kt b/app/src/main/java/com/jerboa/datatypes/types/Instance.kt index 220b41067..9e81a61cf 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/Instance.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/Instance.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class Instance( val id: InstanceId, val domain: String, @@ -7,4 +11,4 @@ data class Instance( val updated: String? = null, val software: String? = null, val version: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/Language.kt b/app/src/main/java/com/jerboa/datatypes/types/Language.kt index dc4457869..9f0b32768 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/Language.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/Language.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class Language( val id: LanguageId, val code: String, val name: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/LeaveAdmin.kt b/app/src/main/java/com/jerboa/datatypes/types/LeaveAdmin.kt index 8b20ddc84..cd141355c 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/LeaveAdmin.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/LeaveAdmin.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class LeaveAdmin( val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ListCommentReports.kt b/app/src/main/java/com/jerboa/datatypes/types/ListCommentReports.kt index 94571fb31..e1e2ddda3 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ListCommentReports.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ListCommentReports.kt @@ -1,9 +1,13 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ListCommentReports( val page: Int? = null, val limit: Int? = null, val unresolved_only: Boolean? = null, val community_id: CommunityId? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ListCommentReportsResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/ListCommentReportsResponse.kt index a25e59cc1..3c9a8266e 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ListCommentReportsResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ListCommentReportsResponse.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class ListCommentReportsResponse( val comment_reports: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ListCommunities.kt b/app/src/main/java/com/jerboa/datatypes/types/ListCommunities.kt index 3175bf18e..50930e55e 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ListCommunities.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ListCommunities.kt @@ -1,9 +1,13 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ListCommunities( val type_: ListingType? /* "All" | "Local" | "Subscribed" */ = null, - val sort: SortType? /* "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" */ = null, + val sort: SortType? /* "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" | "TopHour" | "TopSixHour" | "TopTwelveHour" */ = null, val page: Int? = null, val limit: Int? = null, val auth: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ListCommunitiesResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/ListCommunitiesResponse.kt index c221aee6e..df21dee38 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ListCommunitiesResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ListCommunitiesResponse.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class ListCommunitiesResponse( val communities: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ListPostReports.kt b/app/src/main/java/com/jerboa/datatypes/types/ListPostReports.kt index 575a6a81f..19fa54789 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ListPostReports.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ListPostReports.kt @@ -1,9 +1,13 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ListPostReports( val page: Int? = null, val limit: Int? = null, val unresolved_only: Boolean? = null, val community_id: CommunityId? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ListPostReportsResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/ListPostReportsResponse.kt index d4885ed16..2e443533b 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ListPostReportsResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ListPostReportsResponse.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class ListPostReportsResponse( val post_reports: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ListPrivateMessageReports.kt b/app/src/main/java/com/jerboa/datatypes/types/ListPrivateMessageReports.kt index 8faf159e4..aadc5287e 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ListPrivateMessageReports.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ListPrivateMessageReports.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ListPrivateMessageReports( val page: Int? = null, val limit: Int? = null, val unresolved_only: Boolean? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ListPrivateMessageReportsResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/ListPrivateMessageReportsResponse.kt index 66f8ff5df..7f5550d52 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ListPrivateMessageReportsResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ListPrivateMessageReportsResponse.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class ListPrivateMessageReportsResponse( val private_message_reports: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ListRegistrationApplications.kt b/app/src/main/java/com/jerboa/datatypes/types/ListRegistrationApplications.kt index 1ed6802ec..9b10bcabc 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ListRegistrationApplications.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ListRegistrationApplications.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ListRegistrationApplications( val unread_only: Boolean? = null, val page: Int? = null, val limit: Int? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ListRegistrationApplicationsResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/ListRegistrationApplicationsResponse.kt index a81ecc535..ceaf73a69 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ListRegistrationApplicationsResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ListRegistrationApplicationsResponse.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class ListRegistrationApplicationsResponse( val registration_applications: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/LocalSite.kt b/app/src/main/java/com/jerboa/datatypes/types/LocalSite.kt index 7095c7ad4..4a2218aa7 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/LocalSite.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/LocalSite.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class LocalSite( val id: LocalSiteId, val site_id: SiteId, @@ -18,7 +22,6 @@ data class LocalSite( val slur_filter_regex: String? = null, val actor_name_max_length: Int, val federation_enabled: Boolean, - val federation_debug: Boolean, val federation_worker_count: Int, val captcha_enabled: Boolean, val captcha_difficulty: String, @@ -26,4 +29,4 @@ data class LocalSite( val updated: String? = null, val registration_mode: RegistrationMode /* "Closed" | "RequireApplication" | "Open" */, val reports_email_admins: Boolean, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/LocalSiteRateLimit.kt b/app/src/main/java/com/jerboa/datatypes/types/LocalSiteRateLimit.kt index 3ec156a6c..2152542a1 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/LocalSiteRateLimit.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/LocalSiteRateLimit.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class LocalSiteRateLimit( val id: Int, val local_site_id: LocalSiteId, @@ -17,4 +21,4 @@ data class LocalSiteRateLimit( val search_per_second: Int, val published: String, val updated: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/LocalUser.kt b/app/src/main/java/com/jerboa/datatypes/types/LocalUser.kt index eefcd71b2..ab9f7fddd 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/LocalUser.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/LocalUser.kt @@ -1,12 +1,16 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class LocalUser( val id: LocalUserId, val person_id: PersonId, val email: String? = null, val show_nsfw: Boolean, val theme: String, - val default_sort_type: SortType /* "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" */, + val default_sort_type: SortType /* "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" | "TopHour" | "TopSixHour" | "TopTwelveHour" */, val default_listing_type: ListingType /* "All" | "Local" | "Subscribed" */, val interface_language: String, val show_avatars: Boolean, @@ -19,4 +23,4 @@ data class LocalUser( val email_verified: Boolean, val accepted_application: Boolean, val totp_2fa_url: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/LocalUserView.kt b/app/src/main/java/com/jerboa/datatypes/types/LocalUserView.kt index b1483021b..62cbcd41d 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/LocalUserView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/LocalUserView.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class LocalUserView( val local_user: LocalUser, val person: Person, val counts: PersonAggregates, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/LockPost.kt b/app/src/main/java/com/jerboa/datatypes/types/LockPost.kt index b2e180acb..8d51e2c18 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/LockPost.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/LockPost.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class LockPost( val post_id: PostId, val locked: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/Login.kt b/app/src/main/java/com/jerboa/datatypes/types/Login.kt index 5ca2394d5..bd43f51a9 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/Login.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/Login.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class Login( val username_or_email: String, val password: String, val totp_2fa_token: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/LoginResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/LoginResponse.kt index 0187e4e1a..cdf0332fc 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/LoginResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/LoginResponse.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class LoginResponse( val jwt: String? = null, val registration_created: Boolean, val verify_email_sent: Boolean, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/MarkAllAsRead.kt b/app/src/main/java/com/jerboa/datatypes/types/MarkAllAsRead.kt index bd4203706..3b5eaf83a 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/MarkAllAsRead.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/MarkAllAsRead.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class MarkAllAsRead( val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/MarkCommentReplyAsRead.kt b/app/src/main/java/com/jerboa/datatypes/types/MarkCommentReplyAsRead.kt index 8e5ac2415..8b50d0fb6 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/MarkCommentReplyAsRead.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/MarkCommentReplyAsRead.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class MarkCommentReplyAsRead( val comment_reply_id: CommentReplyId, val read: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/MarkPersonMentionAsRead.kt b/app/src/main/java/com/jerboa/datatypes/types/MarkPersonMentionAsRead.kt index 9642f8899..cb09cd19e 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/MarkPersonMentionAsRead.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/MarkPersonMentionAsRead.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class MarkPersonMentionAsRead( val person_mention_id: PersonMentionId, val read: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/MarkPostAsRead.kt b/app/src/main/java/com/jerboa/datatypes/types/MarkPostAsRead.kt index d654caaef..ef1be3f36 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/MarkPostAsRead.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/MarkPostAsRead.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class MarkPostAsRead( val post_id: PostId, val read: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/MarkPrivateMessageAsRead.kt b/app/src/main/java/com/jerboa/datatypes/types/MarkPrivateMessageAsRead.kt index dce6b2423..bc0730040 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/MarkPrivateMessageAsRead.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/MarkPrivateMessageAsRead.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class MarkPrivateMessageAsRead( val private_message_id: PrivateMessageId, val read: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModAdd.kt b/app/src/main/java/com/jerboa/datatypes/types/ModAdd.kt index 9a7b66a65..bce8d5f7a 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModAdd.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModAdd.kt @@ -1,9 +1,13 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModAdd( val id: Int, val mod_person_id: PersonId, val other_person_id: PersonId, val removed: Boolean, val when_: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModAddCommunity.kt b/app/src/main/java/com/jerboa/datatypes/types/ModAddCommunity.kt index a586223e7..aa309ec70 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModAddCommunity.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModAddCommunity.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModAddCommunity( val id: Int, val mod_person_id: PersonId, @@ -7,4 +11,4 @@ data class ModAddCommunity( val community_id: CommunityId, val removed: Boolean, val when_: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModAddCommunityView.kt b/app/src/main/java/com/jerboa/datatypes/types/ModAddCommunityView.kt index ad6520102..7eb28b595 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModAddCommunityView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModAddCommunityView.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModAddCommunityView( val mod_add_community: ModAddCommunity, val moderator: Person? = null, val community: Community, val modded_person: Person, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModAddView.kt b/app/src/main/java/com/jerboa/datatypes/types/ModAddView.kt index bef948f2e..776fa7289 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModAddView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModAddView.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModAddView( val mod_add: ModAdd, val moderator: Person? = null, val modded_person: Person, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModBan.kt b/app/src/main/java/com/jerboa/datatypes/types/ModBan.kt index bf69e3c24..16bf2ba31 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModBan.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModBan.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModBan( val id: Int, val mod_person_id: PersonId, @@ -8,4 +12,4 @@ data class ModBan( val banned: Boolean, val expires: String? = null, val when_: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModBanFromCommunity.kt b/app/src/main/java/com/jerboa/datatypes/types/ModBanFromCommunity.kt index 3e2993cb6..361dcea27 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModBanFromCommunity.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModBanFromCommunity.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModBanFromCommunity( val id: Int, val mod_person_id: PersonId, @@ -9,4 +13,4 @@ data class ModBanFromCommunity( val banned: Boolean, val expires: String? = null, val when_: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModBanFromCommunityView.kt b/app/src/main/java/com/jerboa/datatypes/types/ModBanFromCommunityView.kt index ecf652b0b..f251b123c 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModBanFromCommunityView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModBanFromCommunityView.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModBanFromCommunityView( val mod_ban_from_community: ModBanFromCommunity, val moderator: Person? = null, val community: Community, val banned_person: Person, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModBanView.kt b/app/src/main/java/com/jerboa/datatypes/types/ModBanView.kt index 7ec2f6cad..6cb981bd9 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModBanView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModBanView.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModBanView( val mod_ban: ModBan, val moderator: Person? = null, val banned_person: Person, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModFeaturePost.kt b/app/src/main/java/com/jerboa/datatypes/types/ModFeaturePost.kt index 78c8ee474..c7c07f488 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModFeaturePost.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModFeaturePost.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModFeaturePost( val id: Int, val mod_person_id: PersonId, @@ -7,4 +11,4 @@ data class ModFeaturePost( val featured: Boolean, val when_: String, val is_featured_community: Boolean, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModFeaturePostView.kt b/app/src/main/java/com/jerboa/datatypes/types/ModFeaturePostView.kt index d83f60c4b..196b059f9 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModFeaturePostView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModFeaturePostView.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModFeaturePostView( val mod_feature_post: ModFeaturePost, val moderator: Person? = null, val post: Post, val community: Community, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModHideCommunity.kt b/app/src/main/java/com/jerboa/datatypes/types/ModHideCommunity.kt index 257851f3e..830546914 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModHideCommunity.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModHideCommunity.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModHideCommunity( val id: Int, val community_id: CommunityId, @@ -7,4 +11,4 @@ data class ModHideCommunity( val when_: String, val reason: String? = null, val hidden: Boolean, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModHideCommunityView.kt b/app/src/main/java/com/jerboa/datatypes/types/ModHideCommunityView.kt index c5af5cef1..65f79561d 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModHideCommunityView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModHideCommunityView.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModHideCommunityView( val mod_hide_community: ModHideCommunity, val admin: Person? = null, val community: Community, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModJoin.kt b/app/src/main/java/com/jerboa/datatypes/types/ModJoin.kt index ea703a3a1..57290c2f5 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModJoin.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModJoin.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModJoin( val community_id: CommunityId, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModJoinResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/ModJoinResponse.kt index 1ec4a7ff9..972b6bca3 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModJoinResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModJoinResponse.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModJoinResponse( val joined: Boolean, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModLockPost.kt b/app/src/main/java/com/jerboa/datatypes/types/ModLockPost.kt index 1166adb9b..b152a1114 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModLockPost.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModLockPost.kt @@ -1,9 +1,13 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModLockPost( val id: Int, val mod_person_id: PersonId, val post_id: PostId, val locked: Boolean, val when_: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModLockPostView.kt b/app/src/main/java/com/jerboa/datatypes/types/ModLockPostView.kt index ed4d605e0..41c2584d2 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModLockPostView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModLockPostView.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModLockPostView( val mod_lock_post: ModLockPost, val moderator: Person? = null, val post: Post, val community: Community, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModRemoveComment.kt b/app/src/main/java/com/jerboa/datatypes/types/ModRemoveComment.kt index 7433c886c..be4f78a39 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModRemoveComment.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModRemoveComment.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModRemoveComment( val id: Int, val mod_person_id: PersonId, @@ -7,4 +11,4 @@ data class ModRemoveComment( val reason: String? = null, val removed: Boolean, val when_: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModRemoveCommentView.kt b/app/src/main/java/com/jerboa/datatypes/types/ModRemoveCommentView.kt index a673bbd63..18ea297c9 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModRemoveCommentView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModRemoveCommentView.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModRemoveCommentView( val mod_remove_comment: ModRemoveComment, val moderator: Person? = null, @@ -7,4 +11,4 @@ data class ModRemoveCommentView( val commenter: Person, val post: Post, val community: Community, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModRemoveCommunity.kt b/app/src/main/java/com/jerboa/datatypes/types/ModRemoveCommunity.kt index 54d552e41..edcf8e9c9 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModRemoveCommunity.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModRemoveCommunity.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModRemoveCommunity( val id: Int, val mod_person_id: PersonId, @@ -8,4 +12,4 @@ data class ModRemoveCommunity( val removed: Boolean, val expires: String? = null, val when_: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModRemoveCommunityView.kt b/app/src/main/java/com/jerboa/datatypes/types/ModRemoveCommunityView.kt index 14d330f15..7c99c6c50 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModRemoveCommunityView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModRemoveCommunityView.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModRemoveCommunityView( val mod_remove_community: ModRemoveCommunity, val moderator: Person? = null, val community: Community, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModRemovePost.kt b/app/src/main/java/com/jerboa/datatypes/types/ModRemovePost.kt index caccd5d76..dc777247a 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModRemovePost.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModRemovePost.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModRemovePost( val id: Int, val mod_person_id: PersonId, @@ -7,4 +11,4 @@ data class ModRemovePost( val reason: String? = null, val removed: Boolean, val when_: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModRemovePostView.kt b/app/src/main/java/com/jerboa/datatypes/types/ModRemovePostView.kt index 378b7b077..58d9ec73d 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModRemovePostView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModRemovePostView.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModRemovePostView( val mod_remove_post: ModRemovePost, val moderator: Person? = null, val post: Post, val community: Community, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModTransferCommunity.kt b/app/src/main/java/com/jerboa/datatypes/types/ModTransferCommunity.kt index 0d995d575..2ed3a7703 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModTransferCommunity.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModTransferCommunity.kt @@ -1,9 +1,13 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModTransferCommunity( val id: Int, val mod_person_id: PersonId, val other_person_id: PersonId, val community_id: CommunityId, val when_: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModTransferCommunityView.kt b/app/src/main/java/com/jerboa/datatypes/types/ModTransferCommunityView.kt index 9362a0590..f8740a299 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModTransferCommunityView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModTransferCommunityView.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModTransferCommunityView( val mod_transfer_community: ModTransferCommunity, val moderator: Person? = null, val community: Community, val modded_person: Person, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ModlogListParams.kt b/app/src/main/java/com/jerboa/datatypes/types/ModlogListParams.kt index 37b5748de..b0ade5e2b 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ModlogListParams.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ModlogListParams.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ModlogListParams( val community_id: CommunityId? = null, val mod_person_id: PersonId? = null, @@ -7,4 +11,4 @@ data class ModlogListParams( val page: Int? = null, val limit: Int? = null, val hide_modlog_names: Boolean, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/MyUserInfo.kt b/app/src/main/java/com/jerboa/datatypes/types/MyUserInfo.kt index a958af891..90cdc52bb 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/MyUserInfo.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/MyUserInfo.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class MyUserInfo( val local_user_view: LocalUserView, val follows: List, @@ -7,4 +13,4 @@ data class MyUserInfo( val community_blocks: List, val person_blocks: List, val discussion_languages: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/Others.kt b/app/src/main/java/com/jerboa/datatypes/types/Others.kt index 3d2ff4926..50252ee49 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/Others.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/Others.kt @@ -1,6 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable import com.google.gson.annotations.SerializedName +import kotlinx.parcelize.Parcelize enum class RegistrationMode { @SerializedName("Closed") @@ -260,12 +263,15 @@ enum class ModlogActionType { AdminPurgeComment, } +@Parcelize data class PictrsImage( val file: String, val delete_token: String, -) +) : Parcelable +@Immutable +@Parcelize data class PictrsImages( val msg: String, val files: List?, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PasswordChangeAfterReset.kt b/app/src/main/java/com/jerboa/datatypes/types/PasswordChangeAfterReset.kt index 203e7a12e..a6d5f2416 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PasswordChangeAfterReset.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PasswordChangeAfterReset.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PasswordChangeAfterReset( val token: String, val password: String, val password_verify: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PasswordReset.kt b/app/src/main/java/com/jerboa/datatypes/types/PasswordReset.kt index 4150d3d42..21a2e3741 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PasswordReset.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PasswordReset.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PasswordReset( val email: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/Person.kt b/app/src/main/java/com/jerboa/datatypes/types/Person.kt index ae41b744e..f566fe2fe 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/Person.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/Person.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class Person( val id: PersonId, val name: String, @@ -18,4 +22,4 @@ data class Person( val bot_account: Boolean, val ban_expires: String? = null, val instance_id: InstanceId, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PersonAggregates.kt b/app/src/main/java/com/jerboa/datatypes/types/PersonAggregates.kt index 86e4335ec..b8ad829ff 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PersonAggregates.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PersonAggregates.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PersonAggregates( val id: Int, val person_id: PersonId, @@ -7,4 +11,4 @@ data class PersonAggregates( val post_score: Int, val comment_count: Int, val comment_score: Int, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PersonBlockView.kt b/app/src/main/java/com/jerboa/datatypes/types/PersonBlockView.kt index 1c30232ee..c33724167 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PersonBlockView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PersonBlockView.kt @@ -1,6 +1,10 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PersonBlockView( val person: Person, val target: Person, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PersonMention.kt b/app/src/main/java/com/jerboa/datatypes/types/PersonMention.kt index 78d1625fc..fae0fc4fa 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PersonMention.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PersonMention.kt @@ -1,9 +1,13 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PersonMention( val id: PersonMentionId, val recipient_id: PersonId, val comment_id: CommentId, val read: Boolean, val published: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PersonMentionResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/PersonMentionResponse.kt index 044ab781e..826ed6439 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PersonMentionResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PersonMentionResponse.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PersonMentionResponse( val person_mention_view: PersonMentionView, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PersonMentionView.kt b/app/src/main/java/com/jerboa/datatypes/types/PersonMentionView.kt index bf8641fe3..e20c04142 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PersonMentionView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PersonMentionView.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PersonMentionView( val person_mention: PersonMention, val comment: Comment, @@ -13,4 +17,4 @@ data class PersonMentionView( val saved: Boolean, val creator_blocked: Boolean, val my_vote: Int? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PersonView.kt b/app/src/main/java/com/jerboa/datatypes/types/PersonView.kt index 3c87aa847..9604b4703 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PersonView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PersonView.kt @@ -1,6 +1,10 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PersonView( val person: Person, val counts: PersonAggregates, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/Post.kt b/app/src/main/java/com/jerboa/datatypes/types/Post.kt index d4fa29836..8e0c1c305 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/Post.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/Post.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class Post( val id: PostId, val name: String, @@ -22,4 +26,4 @@ data class Post( val language_id: LanguageId, val featured_community: Boolean, val featured_local: Boolean, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PostAggregates.kt b/app/src/main/java/com/jerboa/datatypes/types/PostAggregates.kt index 12b906c55..086a82df4 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PostAggregates.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PostAggregates.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PostAggregates( val id: Int, val post_id: PostId, @@ -12,4 +16,6 @@ data class PostAggregates( val newest_comment_time: String, val featured_community: Boolean, val featured_local: Boolean, -) + val hot_rank: Int, + val hot_rank_active: Int, +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PostJoin.kt b/app/src/main/java/com/jerboa/datatypes/types/PostJoin.kt index 593a04697..2d21173b1 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PostJoin.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PostJoin.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PostJoin( val post_id: PostId, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PostJoinResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/PostJoinResponse.kt index 053cc4243..754379f67 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PostJoinResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PostJoinResponse.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PostJoinResponse( val joined: Boolean, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PostReport.kt b/app/src/main/java/com/jerboa/datatypes/types/PostReport.kt index 7e8fed040..64bfe6f01 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PostReport.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PostReport.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PostReport( val id: PostReportId, val creator_id: PersonId, @@ -12,4 +16,4 @@ data class PostReport( val resolver_id: PersonId? = null, val published: String, val updated: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PostReportResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/PostReportResponse.kt index 4b8989bd8..5c245f956 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PostReportResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PostReportResponse.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PostReportResponse( val post_report_view: PostReportView, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PostReportView.kt b/app/src/main/java/com/jerboa/datatypes/types/PostReportView.kt index 5adadbef5..685b3fe5d 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PostReportView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PostReportView.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PostReportView( val post_report: PostReport, val post: Post, @@ -10,4 +14,4 @@ data class PostReportView( val my_vote: Int? = null, val counts: PostAggregates, val resolver: Person? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PostResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/PostResponse.kt index b2541a983..05f39c925 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PostResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PostResponse.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PostResponse( val post_view: PostView, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PostView.kt b/app/src/main/java/com/jerboa/datatypes/types/PostView.kt index 9273b9386..29b163b0c 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PostView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PostView.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PostView( val post: Post, val creator: Person, @@ -12,4 +16,4 @@ data class PostView( val creator_blocked: Boolean, val my_vote: Int? = null, val unread_comments: Int, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PrivateMessage.kt b/app/src/main/java/com/jerboa/datatypes/types/PrivateMessage.kt index 195b2d29f..be2edb3bd 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PrivateMessage.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PrivateMessage.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PrivateMessage( val id: PrivateMessageId, val creator_id: PersonId, @@ -11,4 +15,4 @@ data class PrivateMessage( val updated: String? = null, val ap_id: String, val local: Boolean, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageReport.kt b/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageReport.kt index d6dd45a3c..16510ba33 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageReport.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageReport.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PrivateMessageReport( val id: PrivateMessageReportId, val creator_id: PersonId, @@ -10,4 +14,4 @@ data class PrivateMessageReport( val resolver_id: PersonId? = null, val published: String, val updated: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageReportResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageReportResponse.kt index a8207de30..6f1cde756 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageReportResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageReportResponse.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PrivateMessageReportResponse( val private_message_report_view: PrivateMessageReportView, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageReportView.kt b/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageReportView.kt index 28619c228..7fb6caa5e 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageReportView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageReportView.kt @@ -1,9 +1,13 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PrivateMessageReportView( val private_message_report: PrivateMessageReport, val private_message: PrivateMessage, val private_message_creator: Person, val creator: Person, val resolver: Person? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageResponse.kt index 9e64ed0d4..1237ea3a0 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageResponse.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PrivateMessageResponse( val private_message_view: PrivateMessageView, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageView.kt b/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageView.kt index ab254cc64..4adfd41d0 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PrivateMessageView.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PrivateMessageView( val private_message: PrivateMessage, val creator: Person, val recipient: Person, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PrivateMessagesResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/PrivateMessagesResponse.kt index d413fe49a..53a2cb15a 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PrivateMessagesResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PrivateMessagesResponse.kt @@ -1,5 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class PrivateMessagesResponse( val private_messages: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PurgeComment.kt b/app/src/main/java/com/jerboa/datatypes/types/PurgeComment.kt index bd73a7a35..ac37a4f41 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PurgeComment.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PurgeComment.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PurgeComment( val comment_id: CommentId, val reason: String? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PurgeCommunity.kt b/app/src/main/java/com/jerboa/datatypes/types/PurgeCommunity.kt index a755adaad..1c5b3477b 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PurgeCommunity.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PurgeCommunity.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PurgeCommunity( val community_id: CommunityId, val reason: String? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PurgeItemResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/PurgeItemResponse.kt index 07aa743b7..7ea7efc0e 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PurgeItemResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PurgeItemResponse.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PurgeItemResponse( val success: Boolean, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PurgePerson.kt b/app/src/main/java/com/jerboa/datatypes/types/PurgePerson.kt index 4b5c082e7..a6d75d783 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PurgePerson.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PurgePerson.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PurgePerson( val person_id: PersonId, val reason: String? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/PurgePost.kt b/app/src/main/java/com/jerboa/datatypes/types/PurgePost.kt index a4c3de943..561528186 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/PurgePost.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/PurgePost.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class PurgePost( val post_id: PostId, val reason: String? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/Register.kt b/app/src/main/java/com/jerboa/datatypes/types/Register.kt index b1018ce5d..dee9bfd91 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/Register.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/Register.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class Register( val username: String, val password: String, @@ -10,4 +14,4 @@ data class Register( val captcha_answer: String? = null, val honeypot: String? = null, val answer: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/RegistrationApplication.kt b/app/src/main/java/com/jerboa/datatypes/types/RegistrationApplication.kt index 9a9636efd..1100c2c66 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/RegistrationApplication.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/RegistrationApplication.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class RegistrationApplication( val id: Int, val local_user_id: LocalUserId, @@ -7,4 +11,4 @@ data class RegistrationApplication( val admin_id: PersonId? = null, val deny_reason: String? = null, val published: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/RegistrationApplicationResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/RegistrationApplicationResponse.kt index 5a4bf7ddb..c07f385ec 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/RegistrationApplicationResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/RegistrationApplicationResponse.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class RegistrationApplicationResponse( val registration_application: RegistrationApplicationView, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/RegistrationApplicationView.kt b/app/src/main/java/com/jerboa/datatypes/types/RegistrationApplicationView.kt index df300fe8b..19c01a31b 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/RegistrationApplicationView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/RegistrationApplicationView.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class RegistrationApplicationView( val registration_application: RegistrationApplication, val creator_local_user: LocalUser, val creator: Person, val admin: Person? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/RemoveComment.kt b/app/src/main/java/com/jerboa/datatypes/types/RemoveComment.kt index 745153483..7a2345850 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/RemoveComment.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/RemoveComment.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class RemoveComment( val comment_id: CommentId, val removed: Boolean, val reason: String? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/RemoveCommunity.kt b/app/src/main/java/com/jerboa/datatypes/types/RemoveCommunity.kt index eb559850c..eef1c0486 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/RemoveCommunity.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/RemoveCommunity.kt @@ -1,9 +1,13 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class RemoveCommunity( val community_id: CommunityId, val removed: Boolean, val reason: String? = null, val expires: Int? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/RemovePost.kt b/app/src/main/java/com/jerboa/datatypes/types/RemovePost.kt index 7f9ae762d..1e3c4c157 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/RemovePost.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/RemovePost.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class RemovePost( val post_id: PostId, val removed: Boolean, val reason: String? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ResolveCommentReport.kt b/app/src/main/java/com/jerboa/datatypes/types/ResolveCommentReport.kt index 2401ff227..38b80ad74 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ResolveCommentReport.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ResolveCommentReport.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ResolveCommentReport( val report_id: CommentReportId, val resolved: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ResolveObject.kt b/app/src/main/java/com/jerboa/datatypes/types/ResolveObject.kt index d1ddb6edf..808789a86 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ResolveObject.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ResolveObject.kt @@ -1,6 +1,10 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ResolveObject( val q: String, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ResolveObjectResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/ResolveObjectResponse.kt index 92b385f84..4b1f4e5d3 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ResolveObjectResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ResolveObjectResponse.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ResolveObjectResponse( val comment: CommentView? = null, val post: PostView? = null, val community: CommunityView? = null, val person: PersonView? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ResolvePostReport.kt b/app/src/main/java/com/jerboa/datatypes/types/ResolvePostReport.kt index 75925b011..e5e4a19de 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ResolvePostReport.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ResolvePostReport.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ResolvePostReport( val report_id: PostReportId, val resolved: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/ResolvePrivateMessageReport.kt b/app/src/main/java/com/jerboa/datatypes/types/ResolvePrivateMessageReport.kt index e0d4f1a24..6b0ffa5ea 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/ResolvePrivateMessageReport.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/ResolvePrivateMessageReport.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class ResolvePrivateMessageReport( val report_id: PrivateMessageReportId, val resolved: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/SaveComment.kt b/app/src/main/java/com/jerboa/datatypes/types/SaveComment.kt index f2bf22c4d..be7980d16 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/SaveComment.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/SaveComment.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class SaveComment( val comment_id: CommentId, val save: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/SavePost.kt b/app/src/main/java/com/jerboa/datatypes/types/SavePost.kt index e78c77414..7e73b9eb1 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/SavePost.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/SavePost.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class SavePost( val post_id: PostId, val save: Boolean, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/SaveUserSettings.kt b/app/src/main/java/com/jerboa/datatypes/types/SaveUserSettings.kt index 6a2988497..4d740ac5d 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/SaveUserSettings.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/SaveUserSettings.kt @@ -1,10 +1,16 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class SaveUserSettings( val show_nsfw: Boolean? = null, val show_scores: Boolean? = null, val theme: String? = null, - val default_sort_type: SortType? /* "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" */ = null, + val default_sort_type: SortType? /* "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" | "TopHour" | "TopSixHour" | "TopTwelveHour" */ = null, val default_listing_type: ListingType? /* "All" | "Local" | "Subscribed" */ = null, val interface_language: String? = null, val avatar: String? = null, @@ -22,4 +28,4 @@ data class SaveUserSettings( val discussion_languages: List? = null, val generate_totp_2fa: Boolean? = null, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/Search.kt b/app/src/main/java/com/jerboa/datatypes/types/Search.kt index aeb0ced75..ead19c909 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/Search.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/Search.kt @@ -1,14 +1,18 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class Search( val q: String, val community_id: CommunityId? = null, val community_name: String? = null, val creator_id: PersonId? = null, val type_: SearchType? /* "All" | "Comments" | "Posts" | "Communities" | "Users" | "Url" */ = null, - val sort: SortType? /* "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" */ = null, + val sort: SortType? /* "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" | "TopHour" | "TopSixHour" | "TopTwelveHour" */ = null, val listing_type: ListingType? /* "All" | "Local" | "Subscribed" */ = null, val page: Int? = null, val limit: Int? = null, val auth: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/SearchResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/SearchResponse.kt index 45b369fc6..4a4be7d1b 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/SearchResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/SearchResponse.kt @@ -1,9 +1,15 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class SearchResponse( val type_: SearchType /* "All" | "Comments" | "Posts" | "Communities" | "Users" | "Url" */, val comments: List, val posts: List, val communities: List, val users: List, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/Site.kt b/app/src/main/java/com/jerboa/datatypes/types/Site.kt index d6c1c5c30..b778af619 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/Site.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/Site.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class Site( val id: SiteId, val name: String, @@ -15,4 +19,4 @@ data class Site( val private_key: String? = null, val public_key: String, val instance_id: InstanceId, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/SiteAggregates.kt b/app/src/main/java/com/jerboa/datatypes/types/SiteAggregates.kt index 1c6ff74b7..c12286fef 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/SiteAggregates.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/SiteAggregates.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class SiteAggregates( val id: Int, val site_id: SiteId, @@ -11,4 +15,4 @@ data class SiteAggregates( val users_active_week: Int, val users_active_month: Int, val users_active_half_year: Int, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/SiteMetadata.kt b/app/src/main/java/com/jerboa/datatypes/types/SiteMetadata.kt index 40fbc69b0..82d485e0e 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/SiteMetadata.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/SiteMetadata.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class SiteMetadata( val title: String? = null, val description: String? = null, val image: String? = null, val embed_video_url: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/SiteResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/SiteResponse.kt index b1eb510af..6b121947a 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/SiteResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/SiteResponse.kt @@ -1,5 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import androidx.compose.runtime.Immutable +import kotlinx.parcelize.Parcelize + +@Immutable +@Parcelize data class SiteResponse( val site_view: SiteView, -) + val taglines: List, +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/SiteView.kt b/app/src/main/java/com/jerboa/datatypes/types/SiteView.kt index 1cc26dd0a..81665f2fc 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/SiteView.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/SiteView.kt @@ -1,8 +1,12 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class SiteView( val site: Site, val local_site: LocalSite, val local_site_rate_limit: LocalSiteRateLimit, val counts: SiteAggregates, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/Tagline.kt b/app/src/main/java/com/jerboa/datatypes/types/Tagline.kt index 4b20d082c..5330c4c38 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/Tagline.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/Tagline.kt @@ -1,9 +1,13 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class Tagline( val id: Int, val local_site_id: LocalSiteId, val content: String, val published: String, val updated: String? = null, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/TransferCommunity.kt b/app/src/main/java/com/jerboa/datatypes/types/TransferCommunity.kt index c368b9a6a..ae7f93935 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/TransferCommunity.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/TransferCommunity.kt @@ -1,7 +1,11 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class TransferCommunity( val community_id: CommunityId, val person_id: PersonId, val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/UserJoin.kt b/app/src/main/java/com/jerboa/datatypes/types/UserJoin.kt index 3e5a015a8..0c505f6f4 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/UserJoin.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/UserJoin.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class UserJoin( val auth: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/UserJoinResponse.kt b/app/src/main/java/com/jerboa/datatypes/types/UserJoinResponse.kt index a49f63192..afc2e58e2 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/UserJoinResponse.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/UserJoinResponse.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class UserJoinResponse( val joined: Boolean, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/datatypes/types/VerifyEmail.kt b/app/src/main/java/com/jerboa/datatypes/types/VerifyEmail.kt index 80205a5b0..7cecb6ae7 100644 --- a/app/src/main/java/com/jerboa/datatypes/types/VerifyEmail.kt +++ b/app/src/main/java/com/jerboa/datatypes/types/VerifyEmail.kt @@ -1,5 +1,9 @@ package com.jerboa.datatypes.types +import android.os.Parcelable +import kotlinx.parcelize.Parcelize + +@Parcelize data class VerifyEmail( val token: String, -) +) : Parcelable diff --git a/app/src/main/java/com/jerboa/model/CommentReplyViewModel.kt b/app/src/main/java/com/jerboa/model/CommentReplyViewModel.kt index 2c3cca309..e63f7017c 100644 --- a/app/src/main/java/com/jerboa/model/CommentReplyViewModel.kt +++ b/app/src/main/java/com/jerboa/model/CommentReplyViewModel.kt @@ -1,5 +1,6 @@ package com.jerboa.model +import android.os.Parcelable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue @@ -18,8 +19,10 @@ import com.jerboa.datatypes.types.PostView import com.jerboa.db.entity.Account import com.jerboa.util.Initializable import kotlinx.coroutines.launch +import kotlinx.parcelize.Parcelize -sealed class ReplyItem { +@Parcelize +sealed class ReplyItem : Parcelable { class PostItem(val item: PostView) : ReplyItem() class CommentItem(val item: CommentView) : ReplyItem() class CommentReplyItem(val item: CommentReplyView) : ReplyItem() diff --git a/app/src/main/java/com/jerboa/model/CommunityListViewModel.kt b/app/src/main/java/com/jerboa/model/CommunityListViewModel.kt index e6c02c3bb..d7e4b4701 100644 --- a/app/src/main/java/com/jerboa/model/CommunityListViewModel.kt +++ b/app/src/main/java/com/jerboa/model/CommunityListViewModel.kt @@ -54,6 +54,7 @@ class CommunityListViewModel : ViewModel(), Initializable { users_active_week = 0, users_active_month = 0, users_active_half_year = 0, + hot_rank = 0, ), ) } diff --git a/copy_generated_types_from_lemmy_js_client.sh b/copy_generated_types_from_lemmy_js_client.sh index c79af729d..0c3f2a5c0 100755 --- a/copy_generated_types_from_lemmy_js_client.sh +++ b/copy_generated_types_from_lemmy_js_client.sh @@ -1,5 +1,7 @@ #!/bin/bash +O_CWD=$PWD + # Go to the types folder cd ~/git/lemmy-js-client/src/types @@ -13,6 +15,13 @@ for filename in *.ts; # Rename the file to a simple .kt file_without_ext=${filename%%.*} kt_file="${file_without_ext}.kt" + + # Skip files that don't exist + if [ ! -f "${file_without_ext}.module_lemmy-js-client.kt" ]; then + continue + fi + + mv "${file_without_ext}.module_lemmy-js-client.kt" "$kt_file" # Remove all these weird dukat imports @@ -45,8 +54,10 @@ for filename in *.ts; sed -i 's/registration_mode: String/registration_mode: RegistrationMode/g' "$kt_file" sed -i 's/feature_type: String/feature_type: PostFeatureType/g' "$kt_file" - # Add = null to any lines containing ? - sed -i '/\?/ s/$/ = null/' "$kt_file" + # Add = null to any lines containing ? if it is not a typealias + if ! grep -q "typealias" "$kt_file"; then + sed -i '/\?/ s/$/ = null/' "$kt_file" + fi # Change these interfaces to data classes sed -i 's/interface /data class /g' "$kt_file" @@ -54,6 +65,33 @@ for filename in *.ts; sed -i 's/}/)/g' "$kt_file" sed -i '/:/ s/$/,/' "$kt_file" + # Add @Parcelize annotation + sed -i 's/data class/import android.os.Parcelable\nimport kotlinx.parcelize.Parcelize\n\n@Parcelize\ndata class/g' "$kt_file" + + # Add Parcelable inheritance + if grep -q "data class" "$kt_file"; then + echo " : Parcelable" >> "$kt_file" + fi + + # Adds @Immutable annotation to classes containing lists, to mark them stable + if grep -q "List<" "$kt_file"; then + sed -i 's/@Parcelize/@Immutable\n@Parcelize/g' "$kt_file" + sed -i 's/import android.os.Parcelable/import android.os.Parcelable\nimport androidx.compose.runtime.Immutable/g' "$kt_file" + fi + + # These must be CommentSortType + if [[ "$kt_file" =~ ^(GetComments|GetPersonMentions|GetReplies)\.kt$ ]]; then + sed -i 's/sort: SortType/sort: CommentSortType/g' "$kt_file" + fi + + # These must be SearchType + if [[ "$kt_file" =~ ^(SearchResponse|Search)\.kt$ ]]; then + sed -i 's/type_: ListingType/type_: SearchType/g' "$kt_file" + fi + + # File must end with a newline + sed -i -e '$a\' "$kt_file" + done # Remove weird lib.es files @@ -65,5 +103,5 @@ rm others.kt rm *.module_lemmy-js-client.kt # Move all the kotlin types to our folder -mv *.kt ~/git/jerboa/app/src/main/java/com/jerboa/datatypes/types/ +mv *.kt "$O_CWD/app/src/main/java/com/jerboa/datatypes/types/"