Skip to content

Commit a054ae9

Browse files
authored
fix: experimental rpc not forwarding type (#454)
1 parent aa178ad commit a054ae9

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ package com.my.kizzy.data.rpc
1414

1515
data class CommonRpc(
1616
val name: String = "",
17+
val type: Int? = null,
1718
val details: String? = "",
1819
val state: String? = "",
1920
val partyCurrentSize: Int? = null,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ class KizzyRPC(
323323
name = commonRpc.name,
324324
details = commonRpc.details?.takeIf { it.isNotEmpty() }?.sanitize(),
325325
state = commonRpc.state?.takeIf { it.isNotEmpty() }?.sanitize(),
326-
type = Prefs[CUSTOM_ACTIVITY_TYPE, 0],
326+
type = commonRpc.type ?: Prefs[CUSTOM_ACTIVITY_TYPE, 0],
327327
platform = commonRpc.platform?.sanitize(),
328328
timestamps = time.takeIf { enableTimestamps == true },
329329
assets = Assets(

feature_rpc_base/src/main/java/com/my/kizzy/feature_rpc_base/services/ExperimentalRpc.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ class ExperimentalRpc : Service() {
322322
kizzyRPC.updateRPC(
323323
commonRpc = CommonRpc(
324324
name = finalName ?: "",
325+
type = appActivityTypes[effectivePackageName] ?: 0,
325326
details = finalDetails,
326327
state = finalState,
327328
largeImage = finalLargeImage,

0 commit comments

Comments
 (0)