Show additional info for unit and currency converter (#720)
* Now for conversion patterns such as "TO > FROM" and "TO - FROM" are accepted Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx> * Added help URL for unit converter Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx> * Localized supported units are now shown on a screen that can be invoked from unit converter settings Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx> * Made localizable titles for dimensions and preferences Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx> * Show currency units on list if enabled. Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx> * Supported units are now listed inline instead of a separate screen. Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx> --------- Signed-off-by: Guillermo Villafuerte <gvillafu@comunidad.unam.mx>
This commit is contained in:
@@ -161,6 +161,12 @@ class CurrencyRepository(
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun getKnownUnits(): List<String> {
|
||||
return withContext(Dispatchers.IO) {
|
||||
AppDatabase.getInstance(context).currencyDao().getAllCurrencies().map { it.symbol }
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun isValidCurrency(symbol: String): Boolean {
|
||||
val isoSymbol = currencySymbolAliases[symbol] ?: symbol
|
||||
return withContext(Dispatchers.IO) {
|
||||
|
||||
Reference in New Issue
Block a user