fix(dm): DeepLinkActivity chat path 라우팅을 보정한다
This commit is contained in:
@@ -44,7 +44,7 @@ class DeepLinkActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
if (SodaLiveApp.isAppInForeground && deepLinkExtras != null && isUserCreatorChat(deepLinkExtras)) {
|
||||
if (SodaLiveApp.isAppInForeground && deepLinkExtras != null && isDmChatDeepLink(deepLinkExtras)) {
|
||||
if (routeForegroundDeepLink(deepLinkExtras)) {
|
||||
finish()
|
||||
return
|
||||
@@ -114,7 +114,6 @@ class DeepLinkActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
putQuery("room_id")
|
||||
putQuery("chat_type")
|
||||
putQuery("channel_id")
|
||||
putQuery("message_id")
|
||||
putQuery("audition_id")
|
||||
@@ -140,7 +139,6 @@ class DeepLinkActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
copyString("chat_type")
|
||||
copyString("room_id")
|
||||
copyString("channel_id")
|
||||
copyString("message_id")
|
||||
@@ -277,7 +275,7 @@ class DeepLinkActivity : AppCompatActivity() {
|
||||
val communityPostId = bundle.getString(Constants.EXTRA_COMMUNITY_POST_ID)?.toLongOrNull()
|
||||
?: bundle.getLong(Constants.EXTRA_COMMUNITY_POST_ID).takeIf { it > 0 }
|
||||
|
||||
if (isUserCreatorChat(bundle) && roomId != null && roomId > 0) {
|
||||
if (isDmChatDeepLink(bundle) && roomId != null && roomId > 0) {
|
||||
startActivity(DmChatRoomActivity.newIntentByRoomId(applicationContext, roomId))
|
||||
return true
|
||||
}
|
||||
@@ -332,8 +330,8 @@ class DeepLinkActivity : AppCompatActivity() {
|
||||
return routeByDeepLinkValue(deepLinkValue = deepLinkValue, deepLinkValueId = deepLinkValueId)
|
||||
}
|
||||
|
||||
private fun isUserCreatorChat(bundle: Bundle): Boolean {
|
||||
return bundle.getString("chat_type") == "USER_CREATOR"
|
||||
private fun isDmChatDeepLink(bundle: Bundle): Boolean {
|
||||
return bundle.getString("deep_link_value") == "chat"
|
||||
}
|
||||
|
||||
private fun routeByDeepLinkValue(deepLinkValue: String?, deepLinkValueId: Long?): Boolean {
|
||||
@@ -442,6 +440,12 @@ class DeepLinkActivity : AppCompatActivity() {
|
||||
putIfAbsent("deep_link_sub5", pathId)
|
||||
}
|
||||
|
||||
"chat" -> {
|
||||
putIfAbsent("room_id", pathId)
|
||||
putIfAbsent("deep_link_value", "chat")
|
||||
putIfAbsent("deep_link_sub5", pathId)
|
||||
}
|
||||
|
||||
"content" -> {
|
||||
putIfAbsent("content_id", pathId)
|
||||
putIfAbsent("deep_link_value", "content")
|
||||
|
||||
Reference in New Issue
Block a user