mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-10-31 08:15:02 +00:00
Introduce simplePluralStringResource methods, as Composable and in StringProvider.
This commit is contained in:
+5
@@ -27,4 +27,9 @@ class PreviewStringProvider(
|
||||
override fun getQuantityString(@PluralsRes resId: Int, quantity: Int, vararg formatArgs: Any?): String {
|
||||
return resources.getQuantityString(resId, quantity, *formatArgs)
|
||||
}
|
||||
|
||||
override fun getSimpleQuantityString(resIdForOne: Int, resIdForOthers: Int, quantity: Int, vararg formatArgs: Any?): String {
|
||||
val resId = if (quantity == 1) resIdForOne else resIdForOthers
|
||||
return resources.getString(resId, *formatArgs)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user