mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-23 22:27:15 +00:00
Fix issue with quest completion dialog
This commit is contained in:
parent
c9f459e1b7
commit
826873e4b8
6 changed files with 12 additions and 6 deletions
|
|
@ -153,7 +153,7 @@ android {
|
|||
multiDexEnabled true
|
||||
resConfigs "en", "bg", "de", "en-rGB", "es", "fr", "hr-rHR", "in", "it", "iw", "ja", "ko", "lt", "nl", "pl", "pt-rBR", "pt-rPT", "ru", "tr", "zh", "zh-rTW"
|
||||
|
||||
versionCode 2375
|
||||
versionCode 2380
|
||||
versionName "2.5"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@
|
|||
<string name="login_incentive_count">Unlock by checking into Habitica %d times.</string>
|
||||
<string name="create_account">Unlock by creating an account</string>
|
||||
<string name="party_invite_short">Invite Friends</string>
|
||||
<string name="login_incentive_short">login into Habitica regularly</string>
|
||||
<string name="login_incentive_short">log into Habitica regularly</string>
|
||||
<string name="login_incentive_short_count">%d Checkins</string>
|
||||
<string name="create_account_short">create an account</string>
|
||||
<string name="successful_purchase">Purchased %1$s</string>
|
||||
|
|
@ -953,4 +953,5 @@
|
|||
<string name="unlock_previous_short">Finish Quest %d</string>
|
||||
<string name="unlock_level_short">Level %d</string>
|
||||
<string name="not_participating">You are not participating</string>
|
||||
<string name="quest_completed">Quest completed!</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -352,6 +352,10 @@ class UserRepositoryImpl(localRepository: UserLocalRepository, apiClient: ApiCli
|
|||
if (newUser.profile != null) {
|
||||
copiedUser.profile = newUser.profile
|
||||
}
|
||||
if (newUser.party != null) {
|
||||
copiedUser.party = newUser.party
|
||||
}
|
||||
copiedUser.needsCron = newUser.needsCron
|
||||
copiedUser.versionNumber = newUser.versionNumber
|
||||
|
||||
localRepository.saveUser(copiedUser)
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ open class ShopItem : RealmObject() {
|
|||
fun shortLockedReason(context: Context): String? {
|
||||
return when {
|
||||
unlockCondition != null -> {
|
||||
unlockCondition?.readableUnlockCondition(context)
|
||||
unlockCondition?.shortReadableUnlockCondition(context)
|
||||
}
|
||||
previous != null -> {
|
||||
try {
|
||||
|
|
@ -110,7 +110,7 @@ open class ShopItem : RealmObject() {
|
|||
fun lockedReason(context: Context): String? {
|
||||
return when {
|
||||
unlockCondition != null -> {
|
||||
unlockCondition?.shortReadableUnlockCondition(context)
|
||||
unlockCondition?.readableUnlockCondition(context)
|
||||
}
|
||||
previous != null -> {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ import com.habitrpg.android.habitica.data.*
|
|||
import com.habitrpg.android.habitica.databinding.ActivityMainBinding
|
||||
import com.habitrpg.android.habitica.events.*
|
||||
import com.habitrpg.android.habitica.events.commands.FeedCommand
|
||||
import com.habitrpg.android.habitica.extensions.DateUtils
|
||||
import com.habitrpg.android.habitica.extensions.dpToPx
|
||||
import com.habitrpg.android.habitica.extensions.subscribeWithErrorHandler
|
||||
import com.habitrpg.android.habitica.helpers.*
|
||||
|
|
@ -356,6 +355,8 @@ open class MainActivity : BaseActivity(), TutorialView.OnTutorialReaction {
|
|||
if (quest?.completed?.isNotBlank() == true) {
|
||||
compositeSubscription.add(inventoryRepository.getQuestContent(user?.party?.quest?.completed ?: "").firstElement().subscribe {
|
||||
QuestCompletedDialog.showWithQuest(this, it)
|
||||
|
||||
userRepository.updateUser(user, "party.quest.completed", "").subscribe(Consumer {}, RxErrorHandler.handleEmptyError())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ buildscript {
|
|||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.6.0-rc01'
|
||||
classpath 'com.android.tools.build:gradle:3.6.0-rc03'
|
||||
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
|
||||
classpath 'com.google.gms:google-services:4.3.3'
|
||||
classpath "io.realm:realm-gradle-plugin:6.0.2"
|
||||
|
|
|
|||
Loading…
Reference in a new issue