Skip to content

Commit 55e5911

Browse files
committed
refactor: move common variables to constants
1 parent 6b13ed6 commit 55e5911

File tree

5 files changed

+192
-174
lines changed

5 files changed

+192
-174
lines changed

data/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dependencies {
2323
implementation (libs.ktor.content.negotiation)
2424
implementation (libs.ktor.logging)
2525
implementation (projects.common.preference)
26+
implementation (projects.common.resources)
2627
implementation (projects.gateway)
2728
implementation (libs.blankj.utilcodex)
2829
testImplementation(libs.junit)

data/src/main/java/com/my/kizzy/data/rpc/Constants.kt

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,54 @@
1212

1313
package com.my.kizzy.data.rpc
1414

15+
import com.my.kizzy.resources.R
16+
1517
object Constants {
1618
const val NINTENDO_LINK =
1719
"https://media.discordapp.net/attachments/948828217312178227/1018855932496719932/default.png"
1820
const val WII_U_LINK =
1921
"https://media.discordapp.net/attachments/948828217312178227/1020010414576255017/default.png"
2022
const val XBOX_LINK =
2123
"https://media.discordapp.net/attachments/1009061802593763398/1049675792952598599/1670332610733.png"
22-
const val N3DS_LINK = "https://media.discordapp.net/attachments/948828217312178227/1040885415864967279/3ds.png"
24+
const val N3DS_LINK =
25+
"https://media.discordapp.net/attachments/948828217312178227/1040885415864967279/3ds.png"
2326
const val NINTENDO = "Nintendo Switch"
2427
const val NINTENDO_3DS = "Nintendo-3DS"
2528
const val WII_U = "Wii-U"
2629
const val XBOX = "Xbox"
2730
const val APPLICATION_ID = "962990036020756480"
2831
const val IMGUR_CLIENT_ID = "d70305e7c3ac5c6"
29-
const val ONLINE = "online"
30-
const val DND = "dnd"
3132
const val APP_DIRECTORY = "App Directory"
3233
const val DOWNLOADS_DIRECTORY = "Downloads Directory"
3334
const val MAX_ALLOWED_CHARACTER_LENGTH = 32
3435
/*
3536
See https://discord.com/developers/docs/reference#snowflakes
3637
*/
3738
val MAX_APPLICATION_ID_LENGTH_RANGE = 18..19
39+
40+
val ACTIVITY_TYPE = mapOf(
41+
"Playing" to 0,
42+
"Streaming" to 1,
43+
"Listening" to 2,
44+
"Watching" to 3,
45+
"Competing" to 5
46+
)
47+
val ACTIVITY_STATUS = mapOf(
48+
R.string.status_online to "online",
49+
R.string.status_idle to "idle",
50+
R.string.status_dnd to "dnd",
51+
R.string.status_offline to "offline",
52+
R.string.status_invisible_offline to "invisible"
53+
)
54+
55+
val ACTIVITY_PLATFORMS = mapOf(
56+
"Android" to "android",
57+
"Desktop" to "desktop",
58+
"Embedded" to "embedded",
59+
"IOS" to "ios",
60+
"PlayStation 4" to "ps4",
61+
"PlayStation 5" to "ps5",
62+
"Samsung" to "samsung",
63+
"Xbox" to "xbox",
64+
)
3865
}

0 commit comments

Comments
 (0)