fix(content): 연령제한 노출 조건을 공통 정책으로 통일한다
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package kr.co.vividnext.sodalive.common
|
||||
|
||||
object AdultContentVisibilityPolicy {
|
||||
private const val COUNTRY_CODE_KR = "KR"
|
||||
|
||||
fun shouldShowAdultRestrictionSetting(
|
||||
countryCode: String,
|
||||
isAdultContentVisible: Boolean,
|
||||
isAuth: Boolean
|
||||
): Boolean {
|
||||
if (!isAdultContentVisible) {
|
||||
return false
|
||||
}
|
||||
|
||||
val isKoreanCountry = countryCode.ifBlank { COUNTRY_CODE_KR } == COUNTRY_CODE_KR
|
||||
return !isKoreanCountry || isAuth
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user