Skip to content

Commit

Permalink
Fix passing of formatted string vararg
Browse files Browse the repository at this point in the history
  • Loading branch information
undroid-dew authored Jan 30, 2024
1 parent 6abd4dd commit 4090497
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fun getResourceString(@StringRes resId: Int) =
InstrumentationRegistry.getInstrumentation().targetContext.resources.getString(resId)

fun getResourceString(@StringRes resId: Int, vararg args: Any) =
InstrumentationRegistry.getInstrumentation().targetContext.resources.getString(resId, args)
InstrumentationRegistry.getInstrumentation().targetContext.resources.getString(resId, *args)

fun getQuantityString(@PluralsRes resId: Int, quantity: Int) =
InstrumentationRegistry.getInstrumentation().targetContext.resources.getQuantityString(resId, quantity)
Expand Down

0 comments on commit 4090497

Please sign in to comment.