mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-13 17:51:57 +00:00
Relase 3.5.1.3
This commit is contained in:
parent
3ebe6d37c8
commit
890345ae49
9 changed files with 41 additions and 21 deletions
|
|
@ -15,7 +15,7 @@ buildscript {
|
|||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.1.0'
|
||||
classpath 'com.android.tools.build:gradle:7.1.2'
|
||||
classpath 'net.sourceforge.pmd:pmd-java:5.5.3'
|
||||
}
|
||||
}
|
||||
|
|
@ -103,7 +103,7 @@ dependencies {
|
|||
implementation 'androidx.compose.material:material:1.0.5'
|
||||
implementation 'androidx.compose.animation:animation:1.0.5'
|
||||
implementation 'androidx.compose.ui:ui-tooling:1.0.5'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.4.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.4.1'
|
||||
implementation "com.google.accompanist:accompanist-appcompat-theme:0.16.0"
|
||||
|
||||
|
||||
|
|
@ -116,15 +116,15 @@ dependencies {
|
|||
implementation 'com.google.firebase:firebase-messaging-ktx'
|
||||
implementation 'com.google.firebase:firebase-config-ktx'
|
||||
implementation 'com.google.firebase:firebase-perf-ktx'
|
||||
implementation 'com.google.android.gms:play-services-auth:20.0.1'
|
||||
implementation 'com.google.android.gms:play-services-auth:20.1.0'
|
||||
implementation 'com.nex3z:flow-layout:1.2.2'
|
||||
|
||||
implementation 'androidx.core:core-ktx:1.7.0'
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0"
|
||||
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.4.0"
|
||||
implementation "androidx.lifecycle:lifecycle-common-java8:2.4.0"
|
||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.4.0'
|
||||
implementation 'androidx.navigation:navigation-ui-ktx:2.4.0'
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1"
|
||||
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.4.1"
|
||||
implementation "androidx.lifecycle:lifecycle-common-java8:2.4.1"
|
||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.4.1'
|
||||
implementation 'androidx.navigation:navigation-ui-ktx:2.4.1'
|
||||
implementation 'com.plattysoft.leonids:LeonidsLib:1.3.2'
|
||||
implementation "androidx.fragment:fragment-ktx:1.4.1"
|
||||
implementation "androidx.paging:paging-runtime-ktx:3.1.0"
|
||||
|
|
@ -159,8 +159,8 @@ android {
|
|||
buildConfigField "String", "TESTING_LEVEL", "\"production\""
|
||||
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 3262
|
||||
versionName "3.5.1.2"
|
||||
versionCode 3270
|
||||
versionName "3.5.1.3"
|
||||
|
||||
targetSdkVersion 32
|
||||
|
||||
|
|
|
|||
|
|
@ -312,13 +312,7 @@ class UserRepositoryImpl(localRepository: UserLocalRepository, apiClient: ApiCli
|
|||
user
|
||||
}
|
||||
if (tasks.isNotEmpty()) {
|
||||
val scoringList = mutableListOf<Map<String, String>>()
|
||||
for (task in tasks) {
|
||||
val map = mutableMapOf<String, String>()
|
||||
map["id"] = task.id ?: ""
|
||||
map["direction"] = TaskDirection.UP.text
|
||||
scoringList.add(map)
|
||||
}
|
||||
val scoringList = tasks.map { mapOf(Pair("id", it.id ?: ""), Pair("direction", TaskDirection.UP.text)) }
|
||||
observable = observable.flatMap { taskRepository.bulkScoreTasks(scoringList).firstElement() }
|
||||
}
|
||||
observable.flatMap { apiClient.runCron().firstElement() }
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ class NotificationsManager {
|
|||
|
||||
Notification.Type.ACHIEVEMENT_GENERIC.type -> true
|
||||
Notification.Type.ACHIEVEMENT_ONBOARDING_COMPLETE.type -> true
|
||||
Notification.Type.LOGIN_INCENTIVE.type -> true
|
||||
else -> false
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -206,8 +206,12 @@ open class PurchaseHandler(
|
|||
}
|
||||
}
|
||||
PurchaseTypes.allSubscriptionTypes.contains(sku) -> {
|
||||
if (userViewModel.user.value?.purchased?.plan?.isActive == true) {
|
||||
return
|
||||
val plan = userViewModel.user.value?.purchased?.plan
|
||||
if (plan?.isActive == true) {
|
||||
if (plan.additionalData?.data?.orderId == purchase.orderId &&
|
||||
(plan.dateTerminated != null == purchase.isAutoRenewing)) {
|
||||
return
|
||||
}
|
||||
}
|
||||
val validationRequest = SubscriptionValidationRequest()
|
||||
validationRequest.sku = sku
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
package com.habitrpg.android.habitica.models.user
|
||||
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class AdditionalSubscriptionInfo: RealmObject() {
|
||||
var data: GoogleSubscriptionData? = null
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.habitrpg.android.habitica.models.user
|
||||
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.RealmClass
|
||||
|
||||
@RealmClass(embedded = true)
|
||||
open class GoogleSubscriptionData : RealmObject() {
|
||||
var orderId: String? = null
|
||||
var productId: String? = null
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
package com.habitrpg.android.habitica.models.user
|
||||
|
||||
import android.util.Log
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
|
|
@ -22,6 +21,7 @@ open class SubscriptionPlan : RealmObject(), BaseObject {
|
|||
var quantity: Int? = null
|
||||
var consecutive: SubscriptionPlanConsecutive? = null
|
||||
var mysteryItemCount = 0
|
||||
var additionalData: AdditionalSubscriptionInfo? = null
|
||||
|
||||
@SerializedName("owner")
|
||||
var ownerID: String? = null
|
||||
|
|
|
|||
|
|
@ -137,6 +137,8 @@ object DataBindingUtils {
|
|||
tempMap["Pet-HatchingPotion_Windup"] = "gif"
|
||||
tempMap["Pet_HatchingPotion_Windup"] = "gif"
|
||||
tempMap["quest_solarSystem"] = "gif"
|
||||
tempMap["quest_virtualpet"] = "gif"
|
||||
tempMap["Pet_HatchingPotion_VirtualPet"] = "gif"
|
||||
FILEFORMAT_MAP = Collections.unmodifiableMap(tempMap)
|
||||
|
||||
val tempNameMap = HashMap<String, String>()
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ buildscript {
|
|||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.1.0'
|
||||
classpath 'com.android.tools.build:gradle:7.1.2'
|
||||
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
|
||||
classpath 'com.google.gms:google-services:4.3.10'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
|
||||
|
|
|
|||
Loading…
Reference in a new issue