TP-52122 | Addressed PR comment to include vararg & function renaming (#9068)

This commit is contained in:
Ujjwal Kumar
2023-12-22 14:35:55 +05:30
committed by GitHub
parent b68071865d
commit 7f0c8ab7f6
8 changed files with 46 additions and 47 deletions

View File

@@ -14,13 +14,13 @@ import javax.inject.Inject
interface ResourceProvider {
fun getStringFromResId(@StringRes resId: Int, vararg formatArg: Any): String
fun getString(@StringRes resId: Int, vararg formatArg: Any): String
}
class ResourceProviderImpl @Inject constructor(@ApplicationContext val context: Context) :
ResourceProvider {
override fun getStringFromResId(@StringRes resId: Int, vararg formatArg: Any): String {
return context.getString(resId)
override fun getString(@StringRes resId: Int, vararg formatArg: Any): String {
return context.getString(resId, formatArg)
}
}