-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/colored asset icons fix #1704
Feature/colored asset icons fix #1704
Conversation
fun getAssetIcon(iconName: String?, fallback: Icon = fallbackIcon): Icon | ||
|
||
fun getWhiteAssetIcon(iconName: String?, fallback: Icon = fallbackIcon): Icon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I gave a few suggestions for the interface here:
- The idea of having fallback icon being exposed by AssetIconProvider looks good. However I think we can make the the interface clearer if
getAssetIcon
wont allow for nullableiconName
. Instead, we can create an extension function that allows nullability and has the same signature that is currently present in the interface directly. This way we will simplify the interface itself - Instead of creating a separate instance of
getWhiteAssetIcon
how about we make a functiongetAssetIcon(iconName, iconType)
and implementgetWhiteAssetIcon
in a form of extension? This way you wont need to icon formatting logic twice sincegetAssetIcon(iconName)
can easily delegate its work togetAssetIcon(iconName, iconType)
by passingiconType=selectedIconType
...e-assets/src/main/java/io/novafoundation/nova/feature_assets/di/AssetsFeatureDependencies.kt
Show resolved
Hide resolved
@@ -18,13 +18,13 @@ class AssetsListInteractor( | |||
private val accountRepository: AccountRepository, | |||
private val nftRepository: NftRepository, | |||
private val bannerVisibilityRepository: BannerVisibilityRepository, | |||
private val assetsViewModeRepository: AssetsViewModeRepository | |||
private val assetsViewModeService: AssetsViewModeRepository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should change it back to assetsViewModeRepository
to much the class name
val currentChains = chainDao.joinChainInfoFlow().map { chains -> | ||
chains.map { mapChainLocalToChain(it, gson) } | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can revert it back to mapList
|
||
fun getAssetIcon(iconName: String?, fallback: Icon = fallbackIcon): Icon | ||
fun getAssetIconOrFallback(iconName: String): Icon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why there is orFallback
in the name?
#86966j47d