Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
Thread: Serialize prefixes
Browse files Browse the repository at this point in the history
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
  • Loading branch information
theimpulson committed Mar 23, 2024
1 parent b68b83a commit 43b42b8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
26 changes: 26 additions & 0 deletions app/src/main/java/io/aayush/relabs/network/data/thread/Prefix.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package io.aayush.relabs.network.data.thread

import com.squareup.moshi.Json

enum class Prefix {

@Json(name = "General")
GENERAL,

@Json(name = "Question")
QUESTION,

@Json(name = "Development")
DEVELOPMENT,

@Json(name = "How To Guide")
HOW_TO_GUIDE,

@Json(name = "Themes / Apps / Mods")
THEMES_APPS_MODS,

@Json(name = "Accessories")
ACCESSORIES,

UNAVAILABLE
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ data class Thread(
val last_post_username: String = String(),
val node: Node = Node(),
val permalink: String = String(),
val prefix: Prefix? = Prefix.UNAVAILABLE,
val poll: Poll = Poll(),
val replyUrl: String = String(),
val reply_count: Int = 0,
Expand Down

0 comments on commit 43b42b8

Please sign in to comment.