mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-19 04:14:12 +00:00
fix npc banner handling
This commit is contained in:
parent
cf9ab0a833
commit
5110cc2766
4 changed files with 7 additions and 7 deletions
|
|
@ -60,7 +60,7 @@ interface UserRepository : BaseRepository {
|
|||
|
||||
suspend fun updateLanguage(languageCode: String): User?
|
||||
|
||||
suspend fun resetAccount(): User?
|
||||
suspend fun resetAccount(password: String): User?
|
||||
suspend fun deleteAccount(password: String): Void?
|
||||
|
||||
suspend fun sendPasswordResetEmail(email: String): Void?
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ class AppConfigManager(contentRepository: ContentRepository?) : com.habitrpg.com
|
|||
|
||||
private val remoteConfig = FirebaseRemoteConfig.getInstance()
|
||||
|
||||
fun shopSpriteSuffix(): String {
|
||||
return worldState?.npcImageSuffix ?: remoteConfig.getString("shopSpriteSuffix")
|
||||
fun shopSpriteSuffix(): String? {
|
||||
return worldState?.npcImageSuffix
|
||||
}
|
||||
|
||||
fun maxChatLength(): Long {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class ShopRecyclerAdapter : androidx.recyclerview.widget.RecyclerView.Adapter<Vi
|
|||
|
||||
var changeClassEvents: ((String) -> Unit)? = null
|
||||
|
||||
var shopSpriteSuffix: String = ""
|
||||
var shopSpriteSuffix: String? = null
|
||||
set(value) {
|
||||
field = value
|
||||
if (items.size > 0) {
|
||||
|
|
@ -274,7 +274,7 @@ class ShopRecyclerAdapter : androidx.recyclerview.widget.RecyclerView.Adapter<Vi
|
|||
binding.descriptionView.movementMethod = LinkMovementMethod.getInstance()
|
||||
}
|
||||
|
||||
fun bind(shop: Shop, shopSpriteSuffix: String) {
|
||||
fun bind(shop: Shop, shopSpriteSuffix: String?) {
|
||||
binding.npcBannerView.shopSpriteSuffix = shopSpriteSuffix
|
||||
binding.npcBannerView.identifier = shop.identifier
|
||||
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ import kotlin.math.roundToInt
|
|||
class NPCBannerView(context: Context, attrs: AttributeSet?) : FrameLayout(context, attrs) {
|
||||
private val binding = NpcBannerBinding.inflate(context.layoutInflater, this)
|
||||
|
||||
var shopSpriteSuffix: String = ""
|
||||
var shopSpriteSuffix: String? = null
|
||||
set(value) {
|
||||
field = if (value.isEmpty() || value.startsWith("_")) {
|
||||
field = if (value == null || value.isEmpty() || value.startsWith("_")) {
|
||||
value
|
||||
} else {
|
||||
"_$value"
|
||||
|
|
|
|||
Loading…
Reference in a new issue