diff --git a/Habitica/AndroidManifest.xml b/Habitica/AndroidManifest.xml
index 8aa988061..8d875260e 100644
--- a/Habitica/AndroidManifest.xml
+++ b/Habitica/AndroidManifest.xml
@@ -116,10 +116,6 @@
android:name=".ui.activities.GiftGemsActivity"
android:label="@string/gift_gems">
-
-
diff --git a/Habitica/build.gradle b/Habitica/build.gradle
index f7c85ced4..e4e3d461a 100644
--- a/Habitica/build.gradle
+++ b/Habitica/build.gradle
@@ -51,11 +51,11 @@ dependencies {
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.retrofit2:adapter-rxjava3:2.9.0'
//Crash Logging
- implementation 'com.google.firebase:firebase-crashlytics:17.2.2'
+ implementation 'com.google.firebase:firebase-crashlytics:17.3.0'
//Dependency Injection
- implementation 'com.google.dagger:dagger:2.29.1'
- kapt 'com.google.dagger:dagger-compiler:2.29.1'
+ implementation 'com.google.dagger:dagger:2.31.2'
+ kapt 'com.google.dagger:dagger-compiler:2.31.2'
compileOnly 'javax.annotation:javax.annotation-api:1.3.2'
compileOnly 'com.github.pengrad:jdk9-deps:1.0'
//App Compatibility and Material Design
@@ -64,34 +64,34 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
// Markdown
- implementation "io.noties.markwon:core:4.6.0"
- implementation "io.noties.markwon:ext-strikethrough:4.6.0"
- implementation "io.noties.markwon:image:4.6.0"
- implementation "io.noties.markwon:recycler:4.6.0"
- implementation "io.noties.markwon:html:4.6.0"
+ implementation "io.noties.markwon:core:4.6.1"
+ implementation "io.noties.markwon:ext-strikethrough:4.6.1"
+ implementation "io.noties.markwon:image:4.6.1"
+ implementation "io.noties.markwon:recycler:4.6.1"
+ implementation "io.noties.markwon:html:4.6.1"
//Eventbus
implementation 'org.greenrobot:eventbus:3.2.0'
// IAP Handling / Verification
implementation 'org.solovyev.android:checkout:1.2.2'
//Facebook
- implementation('com.facebook.android:facebook-android-sdk:7.1.0') {
+ implementation('com.facebook.android:facebook-android-sdk:8.1.0') {
transitive = true
}
implementation 'fr.avianey.com.viewpagerindicator:library:2.4.1@aar'
//RxJava
implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
- implementation 'io.reactivex.rxjava3:rxjava:3.0.6'
+ implementation 'io.reactivex.rxjava3:rxjava:3.0.9'
implementation 'io.reactivex.rxjava3:rxkotlin:3.0.1'
implementation 'io.reactivex.rxjava2:rxjava:2.2.19'
implementation "com.github.akarnokd:rxjava3-bridge:3.0.0"
//Analytics
- implementation 'com.amplitude:android-sdk:2.25.2'
+ implementation 'com.amplitude:android-sdk:2.30.0'
// Fresco Image Management Library
- implementation('com.facebook.fresco:fresco:2.3.0') {
+ implementation('com.facebook.fresco:fresco:2.4.0') {
exclude module: 'bolts-android'
}
- implementation('com.facebook.fresco:animated-gif:2.3.0') {
+ implementation('com.facebook.fresco:animated-gif:2.4.0') {
exclude module: 'bolts-android'
}
//Tests
@@ -110,25 +110,25 @@ dependencies {
//Leak Detection
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.5'
//Push Notifications
- implementation 'com.google.firebase:firebase-core:18.0.0'
- implementation 'com.google.firebase:firebase-messaging:21.0.0'
- implementation 'com.google.firebase:firebase-config:20.0.0'
- implementation 'com.google.firebase:firebase-perf:19.0.9'
- implementation 'com.google.android.gms:play-services-auth:18.1.0'
+ implementation 'com.google.firebase:firebase-core:18.0.1'
+ implementation 'com.google.firebase:firebase-messaging:21.0.1'
+ implementation 'com.google.firebase:firebase-config:20.0.2'
+ implementation 'com.google.firebase:firebase-perf:19.1.0'
+ implementation 'com.google.android.gms:play-services-auth:19.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.nex3z:flow-layout:1.2.2'
implementation 'androidx.core:core-ktx:1.3.2'
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation "androidx.lifecycle:lifecycle-common-java8:2.2.0"
- implementation 'androidx.navigation:navigation-fragment-ktx:2.3.1'
- implementation 'androidx.navigation:navigation-ui-ktx:2.3.1'
+ implementation 'androidx.navigation:navigation-fragment-ktx:2.3.2'
+ implementation 'androidx.navigation:navigation-ui-ktx:2.3.2'
implementation "androidx.paging:paging-runtime-ktx:2.1.2"
implementation 'com.plattysoft.leonids:LeonidsLib:1.3.2'
- implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7'
- implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.3'
+ implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
+ implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2'
- implementation 'com.willowtreeapps:signinwithapplebutton:0.2'
+ implementation 'com.willowtreeapps:signinwithapplebutton:0.3'
implementation project(':shared')
}
@@ -150,8 +150,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 2629
- versionName "3.1"
+ versionCode 2694
+ versionName "3.2"
}
buildFeatures {
diff --git a/Habitica/res/drawable-hdpi/g1g1_promo_left.png b/Habitica/res/drawable-hdpi/g1g1_promo_left.png
index 59dcd684f..7530e505d 100644
Binary files a/Habitica/res/drawable-hdpi/g1g1_promo_left.png and b/Habitica/res/drawable-hdpi/g1g1_promo_left.png differ
diff --git a/Habitica/res/drawable-hdpi/g1g1_promo_left_small.png b/Habitica/res/drawable-hdpi/g1g1_promo_left_small.png
new file mode 100644
index 000000000..ca3893bc5
Binary files /dev/null and b/Habitica/res/drawable-hdpi/g1g1_promo_left_small.png differ
diff --git a/Habitica/res/drawable-hdpi/g1g1_promo_menu_left.png b/Habitica/res/drawable-hdpi/g1g1_promo_menu_left.png
new file mode 100644
index 000000000..f024e8000
Binary files /dev/null and b/Habitica/res/drawable-hdpi/g1g1_promo_menu_left.png differ
diff --git a/Habitica/res/drawable-hdpi/g1g1_promo_menu_right.png b/Habitica/res/drawable-hdpi/g1g1_promo_menu_right.png
new file mode 100644
index 000000000..07a0a816f
Binary files /dev/null and b/Habitica/res/drawable-hdpi/g1g1_promo_menu_right.png differ
diff --git a/Habitica/res/drawable-hdpi/g1g1_promo_right.png b/Habitica/res/drawable-hdpi/g1g1_promo_right.png
index fd03bab4f..410b9f7e5 100644
Binary files a/Habitica/res/drawable-hdpi/g1g1_promo_right.png and b/Habitica/res/drawable-hdpi/g1g1_promo_right.png differ
diff --git a/Habitica/res/drawable-hdpi/g1g1_promo_right_small.png b/Habitica/res/drawable-hdpi/g1g1_promo_right_small.png
new file mode 100644
index 000000000..482f62438
Binary files /dev/null and b/Habitica/res/drawable-hdpi/g1g1_promo_right_small.png differ
diff --git a/Habitica/res/drawable-hdpi/g1g1_sparkle_left.png b/Habitica/res/drawable-hdpi/g1g1_sparkle_left.png
new file mode 100644
index 000000000..5870b55b6
Binary files /dev/null and b/Habitica/res/drawable-hdpi/g1g1_sparkle_left.png differ
diff --git a/Habitica/res/drawable-hdpi/g1g1_sparkle_right.png b/Habitica/res/drawable-hdpi/g1g1_sparkle_right.png
new file mode 100644
index 000000000..1708142bc
Binary files /dev/null and b/Habitica/res/drawable-hdpi/g1g1_sparkle_right.png differ
diff --git a/Habitica/res/drawable-hdpi/no_background.png b/Habitica/res/drawable-hdpi/no_background.png
new file mode 100644
index 000000000..3b4306613
Binary files /dev/null and b/Habitica/res/drawable-hdpi/no_background.png differ
diff --git a/Habitica/res/drawable-hdpi/task_icon_team.png b/Habitica/res/drawable-hdpi/task_icon_team.png
new file mode 100644
index 000000000..5b8c03e38
Binary files /dev/null and b/Habitica/res/drawable-hdpi/task_icon_team.png differ
diff --git a/Habitica/res/drawable-hdpi/team_info_icon.png b/Habitica/res/drawable-hdpi/team_info_icon.png
new file mode 100644
index 000000000..1f0372b42
Binary files /dev/null and b/Habitica/res/drawable-hdpi/team_info_icon.png differ
diff --git a/Habitica/res/drawable-hdpi/won_challenge_icon.png b/Habitica/res/drawable-hdpi/won_challenge_icon.png
new file mode 100644
index 000000000..ca83d23b1
Binary files /dev/null and b/Habitica/res/drawable-hdpi/won_challenge_icon.png differ
diff --git a/Habitica/res/drawable-mdpi/g1g1_promo_left.png b/Habitica/res/drawable-mdpi/g1g1_promo_left.png
index 9f858cd6b..eed4a13cc 100644
Binary files a/Habitica/res/drawable-mdpi/g1g1_promo_left.png and b/Habitica/res/drawable-mdpi/g1g1_promo_left.png differ
diff --git a/Habitica/res/drawable-mdpi/g1g1_promo_left_small.png b/Habitica/res/drawable-mdpi/g1g1_promo_left_small.png
new file mode 100644
index 000000000..bdc4377e4
Binary files /dev/null and b/Habitica/res/drawable-mdpi/g1g1_promo_left_small.png differ
diff --git a/Habitica/res/drawable-mdpi/g1g1_promo_menu_left.png b/Habitica/res/drawable-mdpi/g1g1_promo_menu_left.png
new file mode 100644
index 000000000..7d46ed660
Binary files /dev/null and b/Habitica/res/drawable-mdpi/g1g1_promo_menu_left.png differ
diff --git a/Habitica/res/drawable-mdpi/g1g1_promo_menu_right.png b/Habitica/res/drawable-mdpi/g1g1_promo_menu_right.png
new file mode 100644
index 000000000..077e318f2
Binary files /dev/null and b/Habitica/res/drawable-mdpi/g1g1_promo_menu_right.png differ
diff --git a/Habitica/res/drawable-mdpi/g1g1_promo_right.png b/Habitica/res/drawable-mdpi/g1g1_promo_right.png
index 80d855105..26458f1ad 100644
Binary files a/Habitica/res/drawable-mdpi/g1g1_promo_right.png and b/Habitica/res/drawable-mdpi/g1g1_promo_right.png differ
diff --git a/Habitica/res/drawable-mdpi/g1g1_promo_right_small.png b/Habitica/res/drawable-mdpi/g1g1_promo_right_small.png
new file mode 100644
index 000000000..92eab4fe9
Binary files /dev/null and b/Habitica/res/drawable-mdpi/g1g1_promo_right_small.png differ
diff --git a/Habitica/res/drawable-mdpi/g1g1_sparkle_left.png b/Habitica/res/drawable-mdpi/g1g1_sparkle_left.png
new file mode 100644
index 000000000..32968bfa0
Binary files /dev/null and b/Habitica/res/drawable-mdpi/g1g1_sparkle_left.png differ
diff --git a/Habitica/res/drawable-mdpi/g1g1_sparkle_right.png b/Habitica/res/drawable-mdpi/g1g1_sparkle_right.png
new file mode 100644
index 000000000..37d6eee82
Binary files /dev/null and b/Habitica/res/drawable-mdpi/g1g1_sparkle_right.png differ
diff --git a/Habitica/res/drawable-mdpi/no_background.png b/Habitica/res/drawable-mdpi/no_background.png
new file mode 100644
index 000000000..8c9e7f1ce
Binary files /dev/null and b/Habitica/res/drawable-mdpi/no_background.png differ
diff --git a/Habitica/res/drawable-mdpi/task_icon_team.png b/Habitica/res/drawable-mdpi/task_icon_team.png
new file mode 100644
index 000000000..cea954d3d
Binary files /dev/null and b/Habitica/res/drawable-mdpi/task_icon_team.png differ
diff --git a/Habitica/res/drawable-mdpi/team_info_icon.png b/Habitica/res/drawable-mdpi/team_info_icon.png
new file mode 100644
index 000000000..0e94b23f7
Binary files /dev/null and b/Habitica/res/drawable-mdpi/team_info_icon.png differ
diff --git a/Habitica/res/drawable-mdpi/won_challenge_icon.png b/Habitica/res/drawable-mdpi/won_challenge_icon.png
new file mode 100644
index 000000000..fc62e61a8
Binary files /dev/null and b/Habitica/res/drawable-mdpi/won_challenge_icon.png differ
diff --git a/Habitica/res/drawable-night-hdpi/challenge_won_gem_confetti.png b/Habitica/res/drawable-night-hdpi/challenge_won_gem_confetti.png
new file mode 100644
index 000000000..6eff51109
Binary files /dev/null and b/Habitica/res/drawable-night-hdpi/challenge_won_gem_confetti.png differ
diff --git a/Habitica/res/drawable-night-hdpi/no_background.png b/Habitica/res/drawable-night-hdpi/no_background.png
new file mode 100644
index 000000000..75e93a504
Binary files /dev/null and b/Habitica/res/drawable-night-hdpi/no_background.png differ
diff --git a/Habitica/res/drawable-night-hdpi/won_challenge_icon.png b/Habitica/res/drawable-night-hdpi/won_challenge_icon.png
new file mode 100644
index 000000000..b4e4b76aa
Binary files /dev/null and b/Habitica/res/drawable-night-hdpi/won_challenge_icon.png differ
diff --git a/Habitica/res/drawable-night-mdpi/challenge_won_gem_confetti.png b/Habitica/res/drawable-night-mdpi/challenge_won_gem_confetti.png
new file mode 100644
index 000000000..4e00ffce3
Binary files /dev/null and b/Habitica/res/drawable-night-mdpi/challenge_won_gem_confetti.png differ
diff --git a/Habitica/res/drawable-night-mdpi/no_background.png b/Habitica/res/drawable-night-mdpi/no_background.png
new file mode 100644
index 000000000..2d2e5fe82
Binary files /dev/null and b/Habitica/res/drawable-night-mdpi/no_background.png differ
diff --git a/Habitica/res/drawable-night-mdpi/won_challenge_icon.png b/Habitica/res/drawable-night-mdpi/won_challenge_icon.png
new file mode 100644
index 000000000..defd8f1e8
Binary files /dev/null and b/Habitica/res/drawable-night-mdpi/won_challenge_icon.png differ
diff --git a/Habitica/res/drawable-night-xhdpi/challenge_won_gem_confetti.png b/Habitica/res/drawable-night-xhdpi/challenge_won_gem_confetti.png
new file mode 100644
index 000000000..6573424b6
Binary files /dev/null and b/Habitica/res/drawable-night-xhdpi/challenge_won_gem_confetti.png differ
diff --git a/Habitica/res/drawable-night-xhdpi/no_background.png b/Habitica/res/drawable-night-xhdpi/no_background.png
new file mode 100644
index 000000000..d7ebe62ed
Binary files /dev/null and b/Habitica/res/drawable-night-xhdpi/no_background.png differ
diff --git a/Habitica/res/drawable-night-xhdpi/won_challenge_icon.png b/Habitica/res/drawable-night-xhdpi/won_challenge_icon.png
new file mode 100644
index 000000000..3608f2db4
Binary files /dev/null and b/Habitica/res/drawable-night-xhdpi/won_challenge_icon.png differ
diff --git a/Habitica/res/drawable-night-xxhdpi/challenge_won_gem_confetti.png b/Habitica/res/drawable-night-xxhdpi/challenge_won_gem_confetti.png
new file mode 100644
index 000000000..1340361ea
Binary files /dev/null and b/Habitica/res/drawable-night-xxhdpi/challenge_won_gem_confetti.png differ
diff --git a/Habitica/res/drawable-night-xxhdpi/no_background.png b/Habitica/res/drawable-night-xxhdpi/no_background.png
new file mode 100644
index 000000000..a3e452f26
Binary files /dev/null and b/Habitica/res/drawable-night-xxhdpi/no_background.png differ
diff --git a/Habitica/res/drawable-night-xxhdpi/won_challenge_icon.png b/Habitica/res/drawable-night-xxhdpi/won_challenge_icon.png
new file mode 100644
index 000000000..92f26055e
Binary files /dev/null and b/Habitica/res/drawable-night-xxhdpi/won_challenge_icon.png differ
diff --git a/Habitica/res/drawable-night-xxxhdpi/challenge_won_gem_confetti.png b/Habitica/res/drawable-night-xxxhdpi/challenge_won_gem_confetti.png
new file mode 100644
index 000000000..6c66fb945
Binary files /dev/null and b/Habitica/res/drawable-night-xxxhdpi/challenge_won_gem_confetti.png differ
diff --git a/Habitica/res/drawable-night-xxxhdpi/won_challenge_icon.png b/Habitica/res/drawable-night-xxxhdpi/won_challenge_icon.png
new file mode 100644
index 000000000..92f26055e
Binary files /dev/null and b/Habitica/res/drawable-night-xxxhdpi/won_challenge_icon.png differ
diff --git a/Habitica/res/drawable-xhdpi/g1g1_promo_left.png b/Habitica/res/drawable-xhdpi/g1g1_promo_left.png
index 7d2614f6a..0b37a0491 100644
Binary files a/Habitica/res/drawable-xhdpi/g1g1_promo_left.png and b/Habitica/res/drawable-xhdpi/g1g1_promo_left.png differ
diff --git a/Habitica/res/drawable-xhdpi/g1g1_promo_left_small.png b/Habitica/res/drawable-xhdpi/g1g1_promo_left_small.png
new file mode 100644
index 000000000..bdaaf36b0
Binary files /dev/null and b/Habitica/res/drawable-xhdpi/g1g1_promo_left_small.png differ
diff --git a/Habitica/res/drawable-xhdpi/g1g1_promo_menu_left.png b/Habitica/res/drawable-xhdpi/g1g1_promo_menu_left.png
new file mode 100644
index 000000000..fa4d52f5c
Binary files /dev/null and b/Habitica/res/drawable-xhdpi/g1g1_promo_menu_left.png differ
diff --git a/Habitica/res/drawable-xhdpi/g1g1_promo_menu_right.png b/Habitica/res/drawable-xhdpi/g1g1_promo_menu_right.png
new file mode 100644
index 000000000..5bc571b1a
Binary files /dev/null and b/Habitica/res/drawable-xhdpi/g1g1_promo_menu_right.png differ
diff --git a/Habitica/res/drawable-xhdpi/g1g1_promo_right.png b/Habitica/res/drawable-xhdpi/g1g1_promo_right.png
index b4578e4ee..ebe4225f9 100644
Binary files a/Habitica/res/drawable-xhdpi/g1g1_promo_right.png and b/Habitica/res/drawable-xhdpi/g1g1_promo_right.png differ
diff --git a/Habitica/res/drawable-xhdpi/g1g1_promo_right_small.png b/Habitica/res/drawable-xhdpi/g1g1_promo_right_small.png
new file mode 100644
index 000000000..e2f40b772
Binary files /dev/null and b/Habitica/res/drawable-xhdpi/g1g1_promo_right_small.png differ
diff --git a/Habitica/res/drawable-xhdpi/g1g1_sparkle_left.png b/Habitica/res/drawable-xhdpi/g1g1_sparkle_left.png
new file mode 100644
index 000000000..91682e80b
Binary files /dev/null and b/Habitica/res/drawable-xhdpi/g1g1_sparkle_left.png differ
diff --git a/Habitica/res/drawable-xhdpi/g1g1_sparkle_right.png b/Habitica/res/drawable-xhdpi/g1g1_sparkle_right.png
new file mode 100644
index 000000000..4cae12268
Binary files /dev/null and b/Habitica/res/drawable-xhdpi/g1g1_sparkle_right.png differ
diff --git a/Habitica/res/drawable-xhdpi/no_background.png b/Habitica/res/drawable-xhdpi/no_background.png
new file mode 100644
index 000000000..dc10295c7
Binary files /dev/null and b/Habitica/res/drawable-xhdpi/no_background.png differ
diff --git a/Habitica/res/drawable-xhdpi/task_icon_team.png b/Habitica/res/drawable-xhdpi/task_icon_team.png
new file mode 100644
index 000000000..a32a12e99
Binary files /dev/null and b/Habitica/res/drawable-xhdpi/task_icon_team.png differ
diff --git a/Habitica/res/drawable-xhdpi/team_info_icon.png b/Habitica/res/drawable-xhdpi/team_info_icon.png
new file mode 100644
index 000000000..a28ae3e66
Binary files /dev/null and b/Habitica/res/drawable-xhdpi/team_info_icon.png differ
diff --git a/Habitica/res/drawable-xhdpi/won_challenge_icon.png b/Habitica/res/drawable-xhdpi/won_challenge_icon.png
new file mode 100644
index 000000000..914b8cca8
Binary files /dev/null and b/Habitica/res/drawable-xhdpi/won_challenge_icon.png differ
diff --git a/Habitica/res/drawable-xxhdpi/g1g1_promo_left.png b/Habitica/res/drawable-xxhdpi/g1g1_promo_left.png
index 8604581a8..960b525f3 100644
Binary files a/Habitica/res/drawable-xxhdpi/g1g1_promo_left.png and b/Habitica/res/drawable-xxhdpi/g1g1_promo_left.png differ
diff --git a/Habitica/res/drawable-xxhdpi/g1g1_promo_left_small.png b/Habitica/res/drawable-xxhdpi/g1g1_promo_left_small.png
new file mode 100644
index 000000000..6382735fe
Binary files /dev/null and b/Habitica/res/drawable-xxhdpi/g1g1_promo_left_small.png differ
diff --git a/Habitica/res/drawable-xxhdpi/g1g1_promo_menu_left.png b/Habitica/res/drawable-xxhdpi/g1g1_promo_menu_left.png
new file mode 100644
index 000000000..b2623c1c2
Binary files /dev/null and b/Habitica/res/drawable-xxhdpi/g1g1_promo_menu_left.png differ
diff --git a/Habitica/res/drawable-xxhdpi/g1g1_promo_menu_right.png b/Habitica/res/drawable-xxhdpi/g1g1_promo_menu_right.png
new file mode 100644
index 000000000..d800b10c4
Binary files /dev/null and b/Habitica/res/drawable-xxhdpi/g1g1_promo_menu_right.png differ
diff --git a/Habitica/res/drawable-xxhdpi/g1g1_promo_right.png b/Habitica/res/drawable-xxhdpi/g1g1_promo_right.png
index 6efdd65db..c283f62a8 100644
Binary files a/Habitica/res/drawable-xxhdpi/g1g1_promo_right.png and b/Habitica/res/drawable-xxhdpi/g1g1_promo_right.png differ
diff --git a/Habitica/res/drawable-xxhdpi/g1g1_promo_right_small.png b/Habitica/res/drawable-xxhdpi/g1g1_promo_right_small.png
new file mode 100644
index 000000000..7443adeed
Binary files /dev/null and b/Habitica/res/drawable-xxhdpi/g1g1_promo_right_small.png differ
diff --git a/Habitica/res/drawable-xxhdpi/g1g1_sparkle_left.png b/Habitica/res/drawable-xxhdpi/g1g1_sparkle_left.png
new file mode 100644
index 000000000..7b36e791e
Binary files /dev/null and b/Habitica/res/drawable-xxhdpi/g1g1_sparkle_left.png differ
diff --git a/Habitica/res/drawable-xxhdpi/g1g1_sparkle_right.png b/Habitica/res/drawable-xxhdpi/g1g1_sparkle_right.png
new file mode 100644
index 000000000..18f0845d9
Binary files /dev/null and b/Habitica/res/drawable-xxhdpi/g1g1_sparkle_right.png differ
diff --git a/Habitica/res/drawable-xxhdpi/no_background.png b/Habitica/res/drawable-xxhdpi/no_background.png
new file mode 100644
index 000000000..ae58b4a5e
Binary files /dev/null and b/Habitica/res/drawable-xxhdpi/no_background.png differ
diff --git a/Habitica/res/drawable-xxhdpi/task_icon_team.png b/Habitica/res/drawable-xxhdpi/task_icon_team.png
new file mode 100644
index 000000000..9e566f7c0
Binary files /dev/null and b/Habitica/res/drawable-xxhdpi/task_icon_team.png differ
diff --git a/Habitica/res/drawable-xxhdpi/team_info_icon.png b/Habitica/res/drawable-xxhdpi/team_info_icon.png
new file mode 100644
index 000000000..8145895e4
Binary files /dev/null and b/Habitica/res/drawable-xxhdpi/team_info_icon.png differ
diff --git a/Habitica/res/drawable-xxhdpi/won_challenge_icon.png b/Habitica/res/drawable-xxhdpi/won_challenge_icon.png
new file mode 100644
index 000000000..c68d6d205
Binary files /dev/null and b/Habitica/res/drawable-xxhdpi/won_challenge_icon.png differ
diff --git a/Habitica/res/drawable-xxxhdpi/g1g1_promo_left.png b/Habitica/res/drawable-xxxhdpi/g1g1_promo_left.png
index 80d6813de..a7c52f6a5 100644
Binary files a/Habitica/res/drawable-xxxhdpi/g1g1_promo_left.png and b/Habitica/res/drawable-xxxhdpi/g1g1_promo_left.png differ
diff --git a/Habitica/res/drawable-xxxhdpi/g1g1_promo_left_small.png b/Habitica/res/drawable-xxxhdpi/g1g1_promo_left_small.png
new file mode 100644
index 000000000..06d2a689a
Binary files /dev/null and b/Habitica/res/drawable-xxxhdpi/g1g1_promo_left_small.png differ
diff --git a/Habitica/res/drawable-xxxhdpi/g1g1_promo_menu_left.png b/Habitica/res/drawable-xxxhdpi/g1g1_promo_menu_left.png
new file mode 100644
index 000000000..b6b968bdb
Binary files /dev/null and b/Habitica/res/drawable-xxxhdpi/g1g1_promo_menu_left.png differ
diff --git a/Habitica/res/drawable-xxxhdpi/g1g1_promo_menu_right.png b/Habitica/res/drawable-xxxhdpi/g1g1_promo_menu_right.png
new file mode 100644
index 000000000..1910abcce
Binary files /dev/null and b/Habitica/res/drawable-xxxhdpi/g1g1_promo_menu_right.png differ
diff --git a/Habitica/res/drawable-xxxhdpi/g1g1_promo_right.png b/Habitica/res/drawable-xxxhdpi/g1g1_promo_right.png
index 796d90bef..b5414eea9 100644
Binary files a/Habitica/res/drawable-xxxhdpi/g1g1_promo_right.png and b/Habitica/res/drawable-xxxhdpi/g1g1_promo_right.png differ
diff --git a/Habitica/res/drawable-xxxhdpi/g1g1_promo_right_small.png b/Habitica/res/drawable-xxxhdpi/g1g1_promo_right_small.png
new file mode 100644
index 000000000..aac553c1b
Binary files /dev/null and b/Habitica/res/drawable-xxxhdpi/g1g1_promo_right_small.png differ
diff --git a/Habitica/res/drawable-xxxhdpi/g1g1_sparkle_left.png b/Habitica/res/drawable-xxxhdpi/g1g1_sparkle_left.png
new file mode 100644
index 000000000..ff9023e67
Binary files /dev/null and b/Habitica/res/drawable-xxxhdpi/g1g1_sparkle_left.png differ
diff --git a/Habitica/res/drawable-xxxhdpi/g1g1_sparkle_right.png b/Habitica/res/drawable-xxxhdpi/g1g1_sparkle_right.png
new file mode 100644
index 000000000..03b6c18d7
Binary files /dev/null and b/Habitica/res/drawable-xxxhdpi/g1g1_sparkle_right.png differ
diff --git a/Habitica/res/drawable-xxxhdpi/task_icon_team.png b/Habitica/res/drawable-xxxhdpi/task_icon_team.png
new file mode 100644
index 000000000..ef9b0acf5
Binary files /dev/null and b/Habitica/res/drawable-xxxhdpi/task_icon_team.png differ
diff --git a/Habitica/res/drawable-xxxhdpi/team_info_icon.png b/Habitica/res/drawable-xxxhdpi/team_info_icon.png
new file mode 100644
index 000000000..8982e1eac
Binary files /dev/null and b/Habitica/res/drawable-xxxhdpi/team_info_icon.png differ
diff --git a/Habitica/res/drawable/g1g1_menu_background.xml b/Habitica/res/drawable/g1g1_menu_background.xml
new file mode 100644
index 000000000..df3114871
--- /dev/null
+++ b/Habitica/res/drawable/g1g1_menu_background.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Habitica/res/drawable/g1g1_promo_background.xml b/Habitica/res/drawable/g1g1_promo_background.xml
new file mode 100644
index 000000000..2c7932f4c
--- /dev/null
+++ b/Habitica/res/drawable/g1g1_promo_background.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Habitica/res/drawable/g1g1_promo_pill_bg.xml b/Habitica/res/drawable/g1g1_promo_pill_bg.xml
new file mode 100644
index 000000000..c6ef244f0
--- /dev/null
+++ b/Habitica/res/drawable/g1g1_promo_pill_bg.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Habitica/res/drawable/layout_rounded_bg_brand_400.xml b/Habitica/res/drawable/layout_rounded_bg_brand_400.xml
new file mode 100644
index 000000000..6a9cc53d0
--- /dev/null
+++ b/Habitica/res/drawable/layout_rounded_bg_brand_400.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Habitica/res/drawable/no_party_background_gradient.xml b/Habitica/res/drawable/no_party_background_gradient.xml
index 792a5b12d..a72529e44 100644
--- a/Habitica/res/drawable/no_party_background_gradient.xml
+++ b/Habitica/res/drawable/no_party_background_gradient.xml
@@ -4,8 +4,8 @@
diff --git a/Habitica/res/drawable/rounded_purple_square.xml b/Habitica/res/drawable/rounded_purple_square.xml
index 043026ceb..bed89759c 100644
--- a/Habitica/res/drawable/rounded_purple_square.xml
+++ b/Habitica/res/drawable/rounded_purple_square.xml
@@ -2,6 +2,6 @@
-
+
\ No newline at end of file
diff --git a/Habitica/res/layout/achievement_challenge_item.xml b/Habitica/res/layout/achievement_challenge_item.xml
index 0fff98a27..e78a2845a 100644
--- a/Habitica/res/layout/achievement_challenge_item.xml
+++ b/Habitica/res/layout/achievement_challenge_item.xml
@@ -7,15 +7,14 @@
android:gravity="center_vertical"
android:paddingTop="13dp"
android:paddingBottom="13dp">
-
@@ -38,7 +38,6 @@
@@ -58,9 +56,6 @@
android:layout_gravity="fill_horizontal"
android:hint="@string/new_challenge_title"
android:id="@+id/create_challenge_title"
- android:textColor="@color/white"
- android:textColorHighlight="?textColorPrimaryDark"
- android:textColorHint="?textColorPrimaryDark"
tools:text="Get in shape"
android:inputType="text" />
@@ -69,22 +64,18 @@
+ app:hintTextAppearance="@style/TextAppearance.AppCompat"
+ android:layout_marginBottom="12dp"
+ android:layout_marginTop="12dp">
+ android:minLines="3" />
@@ -107,7 +98,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="23dp"
android:text="@string/gem_reward"
- android:textColor="#cc000000" />
+ android:textColor="@color/text_primary" />
@@ -125,13 +116,14 @@
android:layout_height="wrap_content"
android:layout_marginTop="28dp">
-
+ android:tint="@color/text_brand_neon"
+ android:src="@drawable/challenge_gem_add_button"/>
-
+ android:tint="@color/text_brand_neon"
+ android:src="@drawable/challenge_gem_remove_button"/>
@@ -167,14 +160,14 @@
android:layout_height="wrap_content"
android:layout_marginTop="26dp"
android:text="@string/location"
- android:textColor="#cc000000" />
+ android:textColor="@color/text_primary" />
+ android:textColor="@color/text_primary" />
@@ -203,7 +195,7 @@
android:hint="@string/identify_your_challenge_with_a_tag"
android:maxLines="1"
android:textColor="@color/text_secondary"
- android:textColorHint="#61000000" />
+ android:textColorHint="@color/text_ternary" />
@@ -211,6 +203,7 @@
style="@style/Subheader2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginTop="20dp"
android:text="@string/tasks" />
-
-
-
diff --git a/Habitica/res/layout/activity_gift1get1_info.xml b/Habitica/res/layout/activity_gift1get1_info.xml
deleted file mode 100644
index dd6c47ec5..000000000
--- a/Habitica/res/layout/activity_gift1get1_info.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Habitica/res/layout/activity_gift_gems.xml b/Habitica/res/layout/activity_gift_gems.xml
index 3c2046b70..d494d0732 100644
--- a/Habitica/res/layout/activity_gift_gems.xml
+++ b/Habitica/res/layout/activity_gift_gems.xml
@@ -20,7 +20,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
- android:theme="@style/Toolbar"
+ android:background="?attr/colorContentBackground"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark"/>
diff --git a/Habitica/res/layout/activity_gift_subscription.xml b/Habitica/res/layout/activity_gift_subscription.xml
index 2a7a98388..b66f4cdb3 100644
--- a/Habitica/res/layout/activity_gift_subscription.xml
+++ b/Habitica/res/layout/activity_gift_subscription.xml
@@ -16,7 +16,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
- android:theme="@style/Toolbar"
+ android:background="?attr/colorContentBackground"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark"/>
@@ -76,7 +76,7 @@
android:id="@+id/subscription1MonthView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- app:recurringText="@string/one_month"
+ app:recurringText="@string/one_month_one_time"
app:gemCapText="@string/subscribe1month_gemcap"
app:isNonRecurring="true"/>
@@ -84,7 +84,7 @@
android:id="@+id/subscription3MonthView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- app:recurringText="@string/three_months"
+ app:recurringText="@string/three_months_one_time"
app:gemCapText="@string/subscribe3month_gemcap"
app:isNonRecurring="true"
app:hourGlassCount="1" />
@@ -92,7 +92,7 @@
android:id="@+id/subscription6MonthView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- app:recurringText="@string/six_months"
+ app:recurringText="@string/six_months_one_time"
app:gemCapText="@string/subscribe6month_gemcap"
app:isNonRecurring="true"
app:hourGlassCount="2" />
@@ -100,9 +100,10 @@
android:id="@+id/subscription12MonthView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- app:recurringText="@string/twelve_months"
+ app:recurringText="@string/twelve_months_one_time"
app:gemCapText="@string/subscribe12month_gemcap"
app:isNonRecurring="true"
+ app:flagText="@string/save_20"
app:hourGlassCount="4" >
@@ -120,20 +121,35 @@
android:id="@+id/gift_subscription_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@color/teal_50"
- android:padding="@dimen/spacing_large"
+ android:background="@drawable/g1g1_menu_background"
+ android:paddingHorizontal="32dp"
+ android:paddingVertical="16dp"
android:gravity="center_horizontal"
android:orientation="vertical">
+
+
+
+
-
+ android:paddingBottom="20dp">
-
-
+ android:scrollbars="vertical"/>
@@ -138,4 +128,4 @@
android:id="@+id/privacySpinner" />
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/Habitica/res/layout/activity_intro.xml b/Habitica/res/layout/activity_intro.xml
index f11fe1000..b6e1f23c1 100644
--- a/Habitica/res/layout/activity_intro.xml
+++ b/Habitica/res/layout/activity_intro.xml
@@ -27,7 +27,7 @@
android:layout_alignParentEnd="true"
android:layout_marginEnd="6dp"
android:layout_alignParentTop="true"
- android:layout_marginTop="6dp"
+ android:layout_marginTop="40dp"
android:textColor="@android:color/white"
android:background="@color/transparent" />
diff --git a/Habitica/res/layout/activity_prefs.xml b/Habitica/res/layout/activity_prefs.xml
index 8667bdae2..36641ca4f 100644
--- a/Habitica/res/layout/activity_prefs.xml
+++ b/Habitica/res/layout/activity_prefs.xml
@@ -22,13 +22,23 @@
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark"/>
+
-
+
+
\ No newline at end of file
diff --git a/Habitica/res/layout/challenge_add_task_item.xml b/Habitica/res/layout/challenge_add_task_item.xml
index 9a7a08479..d84169f50 100644
--- a/Habitica/res/layout/challenge_add_task_item.xml
+++ b/Habitica/res/layout/challenge_add_task_item.xml
@@ -4,12 +4,9 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="#FFF"
android:orientation="vertical"
android:gravity="center">
-
-
-
-
+
\ No newline at end of file
diff --git a/Habitica/res/layout/checklist_item_row.xml b/Habitica/res/layout/checklist_item_row.xml
index 142af01f4..55ae48abf 100644
--- a/Habitica/res/layout/checklist_item_row.xml
+++ b/Habitica/res/layout/checklist_item_row.xml
@@ -30,7 +30,7 @@
android:scaleType="center"
android:src="@drawable/checkmark" />
-
-
+
+
-
+ android:layout_gravity="center">
+
-
-
+ android:layout_width="76dp"
+ android:layout_height="76dp"
+ android:layout_gravity="start"
+ app:roundedCornerRadius="6dp"
+ app:roundingBorderWidth="6dp"
+ android:scaleType="fitEnd" />
+
+
+
+
\ No newline at end of file
diff --git a/Habitica/res/layout/customization_grid_item.xml b/Habitica/res/layout/customization_grid_item.xml
index c9203ce35..5d9ba5d57 100644
--- a/Habitica/res/layout/customization_grid_item.xml
+++ b/Habitica/res/layout/customization_grid_item.xml
@@ -20,6 +20,7 @@
android:layout_width="60dp"
android:layout_height="76dp"
android:layout_gravity="start"
+ app:roundedCornerRadius="6dp"
android:scaleType="fitEnd" />
+
+
+
+
\ No newline at end of file
diff --git a/Habitica/res/layout/dialog_pet_suggest_hatch.xml b/Habitica/res/layout/dialog_pet_suggest_hatch.xml
index ba4c4e72e..64059998a 100644
--- a/Habitica/res/layout/dialog_pet_suggest_hatch.xml
+++ b/Habitica/res/layout/dialog_pet_suggest_hatch.xml
@@ -30,7 +30,7 @@
-
\ No newline at end of file
diff --git a/Habitica/res/layout/dialog_won_challenge.xml b/Habitica/res/layout/dialog_won_challenge.xml
index 4308e178f..382743b05 100644
--- a/Habitica/res/layout/dialog_won_challenge.xml
+++ b/Habitica/res/layout/dialog_won_challenge.xml
@@ -4,18 +4,40 @@
android:layout_height="match_parent"
android:gravity="center_horizontal">
-
+ android:layout_gravity="center"
+ android:src="@drawable/challenge_won_gem_confetti" />
+
+
+
+
+
+
-
-
-
-
-
-
+ android:visibility="gone"
+ tools:visibility="visible">
+
+ android:orientation="horizontal"
+ android:gravity="center_vertical">
diff --git a/Habitica/res/layout/fragment_no_party.xml b/Habitica/res/layout/fragment_no_party.xml
index 882a198c0..cb300b5f2 100644
--- a/Habitica/res/layout/fragment_no_party.xml
+++ b/Habitica/res/layout/fragment_no_party.xml
@@ -81,8 +81,7 @@
android:id="@+id/createPartyButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- style="@style/HabiticaButton.Offset"
- android:background="@drawable/layout_rounded_bg_window"
+ style="@style/HabiticaButton.Gray"
android:text="@string/create_party"
android:layout_marginTop="@dimen/spacing_large"/>
@@ -106,6 +105,7 @@
style="@style/Body2"
android:text="@string/join_party_description"
android:textColor="@color/text_quad"
+ android:textColorLink="@color/text_brand_neon"
android:gravity="center"
android:layout_marginStart="@dimen/spacing_large"
android:layout_marginEnd="@dimen/spacing_large"/>
@@ -114,9 +114,7 @@
android:id="@+id/username_textview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textColor="?colorAccent"
- style="@style/HabiticaButton.Offset"
- android:background="@drawable/layout_rounded_bg_window"
+ style="@style/HabiticaButton.Gray"
android:layout_marginTop="@dimen/spacing_large"
android:layout_marginBottom="@dimen/spacing_large"/>
diff --git a/Habitica/res/layout/fragment_party_detail.xml b/Habitica/res/layout/fragment_party_detail.xml
index 26777ec2a..1d3c6a34a 100644
--- a/Habitica/res/layout/fragment_party_detail.xml
+++ b/Habitica/res/layout/fragment_party_detail.xml
@@ -118,6 +118,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
+ android:gravity="center_vertical"
android:visibility="gone">
+
+ android:lineSpacingExtra="3dp"/>
+ android:lineSpacingExtra="3dp"/>
\ No newline at end of file
diff --git a/Habitica/res/layout/fragment_quest_detail.xml b/Habitica/res/layout/fragment_quest_detail.xml
index cb551814a..c1cfa082d 100644
--- a/Habitica/res/layout/fragment_quest_detail.xml
+++ b/Habitica/res/layout/fragment_quest_detail.xml
@@ -106,6 +106,7 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone"
+ android:gravity="center_vertical"
android:padding="@dimen/content_border">
-
-
+
+
+
\ No newline at end of file
diff --git a/Habitica/res/values-de/strings.xml b/Habitica/res/values-de/strings.xml
index 2ab6ff1c5..774e94355 100644
--- a/Habitica/res/values-de/strings.xml
+++ b/Habitica/res/values-de/strings.xml
@@ -913,7 +913,7 @@ Die Quest-Schriftrolle wird an den Quest-Besitzer zurückgegeben.
1 Monat verbleibend
vor %d Wochen
vor einer Woche
- vor %d Monat(en)
+ vor %d Monaten
vor einem Monat
Möchtest Du jemandem eine glänzende Edelsteinbeute zuteil werden lassen\?
Mit Deinen aktuellen Filtern sind keine To-Dos sichtbar.
diff --git a/Habitica/res/values-en-rGB/strings.xml b/Habitica/res/values-en-rGB/strings.xml
index facc5c800..2dcb99287 100644
--- a/Habitica/res/values-en-rGB/strings.xml
+++ b/Habitica/res/values-en-rGB/strings.xml
@@ -758,7 +758,7 @@
Keep Challenges
You invited a friend (or friends) who joined you on your adventure!
Invited a Friend
- You put themselves to the test by joining a Challenge!
+ You put yourself to the test by joining a Challenge!
Joined a Challenge
Ventured into the social side of Habitica by joining a Guild!
Joined a Guild
@@ -916,7 +916,7 @@
1 month remaining
%dw ago
1w ago
- %d month ago
+ %d months ago
1 month ago
Using Skill
Your Username and/or Password was incorrect.
diff --git a/Habitica/res/values-fr/strings.xml b/Habitica/res/values-fr/strings.xml
index 93d634e2a..d9c045255 100644
--- a/Habitica/res/values-fr/strings.xml
+++ b/Habitica/res/values-fr/strings.xml
@@ -733,7 +733,7 @@
Vous avez obtenu un succès !
Voir les succès
Voir les nouveautés
- Vous ouvrez la boite et trouvez %@
+ Vous ouvrez la boite et trouvez %s
%s ne fait plus partie du groupe
Transférer
Confirmez-vous vouloir retirer %s du groupe \?
diff --git a/Habitica/res/values-ja/strings.xml b/Habitica/res/values-ja/strings.xml
index c3d536934..80b92d9ac 100644
--- a/Habitica/res/values-ja/strings.xml
+++ b/Habitica/res/values-ja/strings.xml
@@ -846,7 +846,7 @@
すべての乗騎を集めた実績、「乗騎使い」を手に入れました!
乗騎使い
全てのペットを集めたため、「獣使い」の実績を獲得しました!
- 宝箱を開け、%@を見つけました
+ 宝箱を開け、%sを見つけました
%sはグループから解除されました
移譲する
本当に%sをグループから解除しますか?
diff --git a/Habitica/res/values/colors.xml b/Habitica/res/values/colors.xml
index 0f6b6c80a..fbc8e3eef 100644
--- a/Habitica/res/values/colors.xml
+++ b/Habitica/res/values/colors.xml
@@ -72,9 +72,6 @@
@color/yellow_100
@color/blue_100
- @color/brand_300
- @color/brand_50
-
@color/brand_500
diff --git a/Habitica/res/values/strings.xml b/Habitica/res/values/strings.xml
index 36ca0f37f..99a8add56 100644
--- a/Habitica/res/values/strings.xml
+++ b/Habitica/res/values/strings.xml
@@ -243,7 +243,7 @@
Are you sure you want to cancel this quest? All invitation acceptances will be lost. The quest owner will retain possession of the quest scroll.
Are you sure? Only %1$d of your %2$d party members have joined this quest! Quests start automatically when all players have joined or rejected the invitation.
1 month ago
- %d month ago
+ %d months ago
1w ago
%dw ago
1d ago
@@ -273,7 +273,7 @@
You\'ve found %d quest items
You found %s in the Armoire
- You rummage in the Armoire and find %1$s %2$s. What\'s that doing in here?
+ You rummage in the Armoire and find%1$s %2$s. What\'s that doing in here?
You wrestle with the Armoire and gain Experience. Take that!
Sell (%d Gold)
Hatch with potion
@@ -438,7 +438,7 @@
Subscription Status
Leave Challenge
- You can choose to keep this Challenge\'s tasks on your personal task board or delete them when you leave
+ You can choose to keep this Challenge\'s tasks on your personal task board or delete them when you leave
Leave & Keep Tasks
Leave & Delete Tasks
Remove
@@ -550,6 +550,7 @@
Started by %s
Are you sure you want to abort this mission? It will abort it for everyone in your party and all progress will be lost. The quest scroll will be returned to the quest owner.
Reloading Content
+ Reloaded Content
k
m
b
@@ -655,7 +656,7 @@
The colored usernames you see in chat represent a person’s contributor tier. The higher the tier, the more the person has contributed to habitica through art, code, the community, or more!
Open navigation drawer
Close navigation drawer
- World Boss
+ World Boss
Boss Art
World Boss Description
Rage Strikes: %d/%d
@@ -876,7 +877,7 @@
Joined a Guild
Ventured into the social side of Habitica by joining a Guild!
Joined a Challenge
- You put themselves to the test by joining a Challenge!
+ You put yourself to the test by joining a Challenge!
Invited a Friend
You invited a friend (or friends) who joined you on your adventure!
Keep Challenges
@@ -1046,7 +1047,7 @@
There are so many Pets to collect, you’re bound to have a favorite. If you feed them, they may just grow…
Every Pet has a specific food they enjoy! Experiment to find out which will grow your Pet the fastest
Equipment can be practical or just fashionable. Raise your stats to get all sorts of benefits to your avatar
- Completing tasks gives you a chance to find eggs, hatching potions, and pet food.
+ Completing tasks gives you a chance to find eggs, hatching potions, and pet food.
Head to your Items and try combining your new Egg and Hatching Potion!
Go to Items
You found new items!
@@ -1124,7 +1125,17 @@
Hurray!
You won a Challenge
Congratulations!
- %s selected you as the winner! Your win has been recorded in your Achievements.
+ %s selected you as the winner! Your win has been recorded in your Achievements.]]>
You were selected as the winner! Your win has been recorded in your Achievements.
Claim %d Gems
+ In honor of the season of giving we\'re bringing back a very special promotion. Now when you gift somebody a subscription, you get the same sub for yourself for free!
+ Tap ‘Gift a Subscription’ and type in the username of the account you’d like to gift to. From there, pick the sub length you’d like to gift and check out. Your account will automatically be rewarded with the same level of subscription you just gifted.
+ This is a limited time event that starts on %s (13:00 UTC) and will end %s (01:00 UTC). This promotion only applies when you gift to another Habitican. If you or your gift recipient already have a subscription, the gifted subscription will add months of credit that will only be used after the current subscription is cancelled or expires.
+ Gift a sub and get a sub for free until %s
+ 1 month one-time subscription
+ 3 month one-time subscription
+ 6 month one-time subscription
+ 12 month one-time subscription
+ Teams
+ Team Information
diff --git a/Habitica/res/xml/preferences_fragment.xml b/Habitica/res/xml/preferences_fragment.xml
index 5b07f12c0..75852e598 100644
--- a/Habitica/res/xml/preferences_fragment.xml
+++ b/Habitica/res/xml/preferences_fragment.xml
@@ -118,7 +118,8 @@
+ android:layout="@layout/preference_child_summary"
+ app:isPreferenceVisible="false"/>
diff --git a/Habitica/res/xml/remote_config_defaults.xml b/Habitica/res/xml/remote_config_defaults.xml
index 3819edc7e..072e49af5 100644
--- a/Habitica/res/xml/remote_config_defaults.xml
+++ b/Habitica/res/xml/remote_config_defaults.xml
@@ -5,10 +5,6 @@
maxChatLength
3000
-
- enableGiftOneGetOne
- false
-
shopSpriteSuffix
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/HabiticaBaseApplication.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/HabiticaBaseApplication.kt
index 9deca9f11..042b6e886 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/HabiticaBaseApplication.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/HabiticaBaseApplication.kt
@@ -102,6 +102,7 @@ abstract class HabiticaBaseApplication : Application() {
val builder = RealmConfiguration.Builder()
.schemaVersion(1)
.deleteRealmIfMigrationNeeded()
+ .allowWritesOnUiThread(true)
try {
Realm.setDefaultConfiguration(builder.build())
} catch (ignored: UnsatisfiedLinkError) {
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/HabiticaPurchaseVerifier.java b/Habitica/src/main/java/com/habitrpg/android/habitica/HabiticaPurchaseVerifier.java
deleted file mode 100644
index 8d086df2f..000000000
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/HabiticaPurchaseVerifier.java
+++ /dev/null
@@ -1,214 +0,0 @@
-package com.habitrpg.android.habitica;
-
-import android.content.Context;
-import android.content.SharedPreferences;
-
-import androidx.annotation.NonNull;
-import androidx.preference.PreferenceManager;
-
-import com.google.firebase.analytics.FirebaseAnalytics;
-import com.habitrpg.android.habitica.data.ApiClient;
-import com.habitrpg.android.habitica.events.ConsumablePurchasedEvent;
-import com.habitrpg.android.habitica.events.UserSubscribedEvent;
-import com.habitrpg.android.habitica.helpers.PurchaseTypes;
-import com.habitrpg.android.habitica.models.IAPGift;
-import com.habitrpg.android.habitica.models.PurchaseValidationRequest;
-import com.habitrpg.android.habitica.models.SubscriptionValidationRequest;
-import com.habitrpg.android.habitica.models.Transaction;
-import com.habitrpg.android.habitica.models.responses.ErrorResponse;
-
-import org.greenrobot.eventbus.EventBus;
-import org.json.JSONObject;
-import org.solovyev.android.checkout.BasePurchaseVerifier;
-import org.solovyev.android.checkout.Purchase;
-import org.solovyev.android.checkout.RequestListener;
-import org.solovyev.android.checkout.ResponseCodes;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import retrofit2.HttpException;
-
-/**
- * Created by Negue on 26.11.2015.
- */
-public class HabiticaPurchaseVerifier extends BasePurchaseVerifier {
-
- private static final String PURCHASED_PRODUCTS_KEY = "PURCHASED_PRODUCTS";
- private static final String PENDING_GIFTS_KEY = "PENDING_GIFTS";
- private final ApiClient apiClient;
- private Set purchasedOrderList = new HashSet<>();
- private static Map pendingGifts = new HashMap<>();
- private static SharedPreferences preferences;
- private Context context;
-
- public HabiticaPurchaseVerifier(Context context, ApiClient apiClient) {
- preferences = PreferenceManager.getDefaultSharedPreferences(context);
- this.context = context;
-
- preferences.getStringSet(PURCHASED_PRODUCTS_KEY, purchasedOrderList);
- pendingGifts = loadPendingGifts();
-
- this.apiClient = apiClient;
- }
-
- @Override
- protected void doVerify(@NonNull final List purchases, @NonNull final RequestListener> requestListener) {
- final List verifiedPurchases = new ArrayList<>(purchases.size());
-
- for (final Purchase purchase : purchases) {
- if (purchasedOrderList.contains(purchase.orderId)) {
- verifiedPurchases.add(purchase);
-
- requestListener.onSuccess(verifiedPurchases);
- } else {
- if (PurchaseTypes.allGemTypes.contains(purchase.sku)) {
- PurchaseValidationRequest validationRequest = new PurchaseValidationRequest();
- validationRequest.setSku(purchase.sku);
- validationRequest.setTransaction(new Transaction());
- validationRequest.getTransaction().setReceipt(purchase.data);
- validationRequest.getTransaction().setSignature(purchase.signature);
- if (pendingGifts.containsKey(purchase.sku)) {
- validationRequest.setGift(new IAPGift());
- validationRequest.getGift().uuid = pendingGifts.get(purchase.sku);
- }
-
- apiClient.validatePurchase(validationRequest).subscribe(purchaseValidationResult -> {
- purchasedOrderList.add(purchase.orderId);
-
- requestListener.onSuccess(verifiedPurchases);
- EventBus.getDefault().post(new ConsumablePurchasedEvent(purchase));
- removeGift(purchase.sku);
- }, throwable -> {
- if (throwable.getClass().equals(retrofit2.HttpException.class)) {
- HttpException error = (HttpException) throwable;
- ErrorResponse res = apiClient.getErrorResponse((HttpException) throwable);
- if (error.code() == 401) {
- if (res.message != null && res.message.equals("RECEIPT_ALREADY_USED")) {
- purchasedOrderList.add(purchase.orderId);
-
- requestListener.onSuccess(verifiedPurchases);
- EventBus.getDefault().post(new ConsumablePurchasedEvent(purchase));
- removeGift(purchase.sku);
- return;
- }
- }
- }
- requestListener.onError(ResponseCodes.ERROR, new Exception());
- });
- } else if (PurchaseTypes.allSubscriptionNoRenewTypes.contains(purchase.sku)) {
- PurchaseValidationRequest validationRequest = new PurchaseValidationRequest();
- validationRequest.setSku(purchase.sku);
- validationRequest.setTransaction(new Transaction());
- validationRequest.getTransaction().setReceipt(purchase.data);
- validationRequest.getTransaction().setSignature(purchase.signature);
- if (pendingGifts.containsKey(purchase.sku)) {
- validationRequest.setGift(new IAPGift());
- validationRequest.getGift().uuid = pendingGifts.get(purchase.sku);
- }
-
- apiClient.validateNoRenewSubscription(validationRequest).subscribe(purchaseValidationResult -> {
- purchasedOrderList.add(purchase.orderId);
- requestListener.onSuccess(verifiedPurchases);
- EventBus.getDefault().post(new ConsumablePurchasedEvent(purchase));
- removeGift(purchase.sku);
- }, throwable -> {
- if (throwable.getClass().equals(retrofit2.HttpException.class)) {
- HttpException error = (HttpException)throwable;
- ErrorResponse res = apiClient.getErrorResponse((HttpException) throwable);
- if (error.code() == 401) {
- if (res.message != null && res.message.equals("RECEIPT_ALREADY_USED")) {
- purchasedOrderList.add(purchase.orderId);
-
- requestListener.onSuccess(verifiedPurchases);
- EventBus.getDefault().post(new ConsumablePurchasedEvent(purchase));
- removeGift(purchase.sku);
- return;
- }
- }
- }
- requestListener.onError(ResponseCodes.ERROR, new Exception());
- });
- } else if (PurchaseTypes.allSubscriptionTypes.contains(purchase.sku)) {
- SubscriptionValidationRequest validationRequest = new SubscriptionValidationRequest();
- validationRequest.setSku(purchase.sku);
- validationRequest.setTransaction(new Transaction());
- validationRequest.getTransaction().setReceipt(purchase.data);
- validationRequest.getTransaction().setSignature(purchase.signature);
- apiClient.validateSubscription(validationRequest).subscribe(purchaseValidationResult -> {
- purchasedOrderList.add(purchase.orderId);
-
- verifiedPurchases.add(purchase);
-
- requestListener.onSuccess(verifiedPurchases);
- FirebaseAnalytics.getInstance(context).logEvent("user_subscribed", null);
- EventBus.getDefault().post(new UserSubscribedEvent());
- }, throwable -> {
- if (throwable.getClass().equals(retrofit2.HttpException.class)) {
- HttpException error = (HttpException) throwable;
- ErrorResponse res = apiClient.getErrorResponse((HttpException) throwable);
- if (error.code() == 401) {
- if (res.message != null && res.message.equals("RECEIPT_ALREADY_USED")) {
- purchasedOrderList.add(purchase.orderId);
-
- verifiedPurchases.add(purchase);
-
- requestListener.onSuccess(verifiedPurchases);
- return;
- }
- }
- }
- requestListener.onError(ResponseCodes.ERROR, new Exception());
- });
- }
- }
- }
-
- SharedPreferences.Editor edit = preferences.edit();
- edit.putStringSet(PURCHASED_PRODUCTS_KEY, purchasedOrderList);
- edit.apply();
-
- savePendingGifts();
- }
-
- public static void addGift(String sku, String userID) {
- pendingGifts.put(sku, userID);
- savePendingGifts();
- }
-
- private static void removeGift(String sku) {
- pendingGifts.remove(sku);
- savePendingGifts();
- }
-
- private static void savePendingGifts(){
- JSONObject jsonObject = new JSONObject(pendingGifts);
- String jsonString = jsonObject.toString();
- SharedPreferences.Editor editor = preferences.edit();
- editor.remove(PENDING_GIFTS_KEY).apply();
- editor.putString(PENDING_GIFTS_KEY, jsonString);
- editor.commit();
- }
-
- private Map loadPendingGifts() {
- Map outputMap = new HashMap<>();
- try{
- String jsonString = preferences.getString(PENDING_GIFTS_KEY, (new JSONObject()).toString());
- JSONObject jsonObject = new JSONObject(jsonString);
- Iterator keysItr = jsonObject.keys();
- while(keysItr.hasNext()) {
- String key = keysItr.next();
- String value = (String) jsonObject.get(key);
- outputMap.put(key, value);
- }
- }catch(Exception e){
- e.printStackTrace();
- }
- return outputMap;
- }
-}
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/HabiticaPurchaseVerifier.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/HabiticaPurchaseVerifier.kt
new file mode 100644
index 000000000..748d4be8f
--- /dev/null
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/HabiticaPurchaseVerifier.kt
@@ -0,0 +1,163 @@
+package com.habitrpg.android.habitica
+
+import android.content.Context
+import android.content.SharedPreferences
+import androidx.preference.PreferenceManager
+import com.google.firebase.analytics.FirebaseAnalytics
+import com.google.firebase.crashlytics.FirebaseCrashlytics
+import com.habitrpg.android.habitica.data.ApiClient
+import com.habitrpg.android.habitica.events.ConsumablePurchasedEvent
+import com.habitrpg.android.habitica.events.UserSubscribedEvent
+import com.habitrpg.android.habitica.helpers.PurchaseTypes
+import com.habitrpg.android.habitica.models.*
+import org.greenrobot.eventbus.EventBus
+import org.json.JSONObject
+import org.solovyev.android.checkout.BasePurchaseVerifier
+import org.solovyev.android.checkout.Purchase
+import org.solovyev.android.checkout.RequestListener
+import org.solovyev.android.checkout.ResponseCodes
+import retrofit2.HttpException
+import java.util.*
+
+/**
+ * Created by Negue on 26.11.2015.
+ */
+class HabiticaPurchaseVerifier(context: Context, apiClient: ApiClient) : BasePurchaseVerifier() {
+ private val apiClient: ApiClient
+ private val purchasedOrderList: MutableSet = HashSet()
+ private val context: Context
+ override fun doVerify(purchases: List, requestListener: RequestListener>) {
+ val verifiedPurchases: MutableList = ArrayList(purchases.size)
+ for (purchase in purchases) {
+ if (purchasedOrderList.contains(purchase.orderId)) {
+ verifiedPurchases.add(purchase)
+ requestListener.onSuccess(verifiedPurchases)
+ } else {
+ when {
+ PurchaseTypes.allGemTypes.contains(purchase.sku) -> {
+ val validationRequest = buildValidationRequest(purchase)
+ apiClient.validatePurchase(validationRequest).subscribe({
+ purchasedOrderList.add(purchase.orderId)
+ requestListener.onSuccess(verifiedPurchases)
+ EventBus.getDefault().post(ConsumablePurchasedEvent(purchase))
+ removeGift(purchase.sku)
+ }) { throwable: Throwable ->
+ handleError(throwable, purchase, requestListener, verifiedPurchases)
+ }
+ }
+ PurchaseTypes.allSubscriptionNoRenewTypes.contains(purchase.sku) -> {
+ val validationRequest = buildValidationRequest(purchase)
+ apiClient.validateNoRenewSubscription(validationRequest).subscribe({
+ purchasedOrderList.add(purchase.orderId)
+ requestListener.onSuccess(verifiedPurchases)
+ EventBus.getDefault().post(ConsumablePurchasedEvent(purchase))
+ removeGift(purchase.sku)
+ }) { throwable: Throwable ->
+ handleError(throwable, purchase, requestListener, verifiedPurchases)
+ }
+ }
+ PurchaseTypes.allSubscriptionTypes.contains(purchase.sku) -> {
+ val validationRequest = SubscriptionValidationRequest()
+ validationRequest.sku = purchase.sku
+ validationRequest.transaction = Transaction()
+ validationRequest.transaction?.receipt = purchase.data
+ validationRequest.transaction?.signature = purchase.signature
+ apiClient.validateSubscription(validationRequest).subscribe({
+ purchasedOrderList.add(purchase.orderId)
+ verifiedPurchases.add(purchase)
+ requestListener.onSuccess(verifiedPurchases)
+ FirebaseAnalytics.getInstance(context).logEvent("user_subscribed", null)
+ EventBus.getDefault().post(UserSubscribedEvent())
+ }) { throwable: Throwable ->
+ handleError(throwable, purchase, requestListener, verifiedPurchases)
+ }
+ }
+ }
+ }
+ }
+ val edit = preferences?.edit()
+ edit?.putStringSet(PURCHASED_PRODUCTS_KEY, purchasedOrderList)
+ edit?.apply()
+ savePendingGifts()
+ }
+
+ private fun buildValidationRequest(purchase: Purchase): PurchaseValidationRequest {
+ val validationRequest = PurchaseValidationRequest()
+ validationRequest.sku = purchase.sku
+ validationRequest.transaction = Transaction()
+ validationRequest.transaction?.receipt = purchase.data
+ validationRequest.transaction?.signature = purchase.signature
+ if (pendingGifts.containsKey(purchase.sku)) {
+ validationRequest.gift = IAPGift()
+ validationRequest.gift?.uuid = pendingGifts[purchase.sku]
+ }
+ return validationRequest
+ }
+
+ private fun handleError(throwable: Throwable, purchase: Purchase, requestListener: RequestListener>, verifiedPurchases: MutableList) {
+ (throwable as? HttpException)?.let {error ->
+ if (error.code() == 401) {
+ val res = apiClient.getErrorResponse(throwable)
+ if (res.message != null && res.message == "RECEIPT_ALREADY_USED") {
+ purchasedOrderList.add(purchase.orderId)
+ requestListener.onSuccess(verifiedPurchases)
+ EventBus.getDefault().post(ConsumablePurchasedEvent(purchase))
+ removeGift(purchase.sku)
+ return
+ }
+ }
+ }
+ FirebaseCrashlytics.getInstance().recordException(throwable)
+ requestListener.onError(ResponseCodes.ERROR, Exception())
+ }
+
+ private fun loadPendingGifts(): MutableMap {
+ val outputMap: MutableMap = HashMap()
+ try {
+ val jsonString = preferences?.getString(PENDING_GIFTS_KEY, JSONObject().toString())
+ val jsonObject = JSONObject(jsonString)
+ val keysItr = jsonObject.keys()
+ while (keysItr.hasNext()) {
+ val key = keysItr.next()
+ val value = jsonObject[key] as String
+ outputMap[key] = value
+ }
+ } catch (e: Exception) {
+ e.printStackTrace()
+ }
+ return outputMap
+ }
+
+ companion object {
+ private const val PURCHASED_PRODUCTS_KEY = "PURCHASED_PRODUCTS"
+ private const val PENDING_GIFTS_KEY = "PENDING_GIFTS"
+ private var pendingGifts: MutableMap = HashMap()
+ private var preferences: SharedPreferences? = null
+ fun addGift(sku: String?, userID: String?) {
+ pendingGifts[sku] = userID
+ savePendingGifts()
+ }
+
+ private fun removeGift(sku: String) {
+ pendingGifts.remove(sku)
+ savePendingGifts()
+ }
+
+ private fun savePendingGifts() {
+ val jsonObject = JSONObject(pendingGifts as Map<*, *>)
+ val jsonString = jsonObject.toString()
+ val editor = preferences?.edit()
+ editor?.remove(PENDING_GIFTS_KEY)
+ editor?.putString(PENDING_GIFTS_KEY, jsonString)
+ editor?.apply()
+ }
+ }
+
+ init {
+ preferences = PreferenceManager.getDefaultSharedPreferences(context)
+ this.context = context
+ preferences?.getStringSet(PURCHASED_PRODUCTS_KEY, purchasedOrderList)
+ pendingGifts = loadPendingGifts()
+ this.apiClient = apiClient
+ }
+}
\ No newline at end of file
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/api/ApiService.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/api/ApiService.kt
index 55131a5f2..d299f51b3 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/api/ApiService.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/api/ApiService.kt
@@ -392,4 +392,12 @@ interface ApiService {
@POST("user/reroll")
fun reroll(): Flowable>
+
+ // Team Plans
+
+ @GET("group-plans")
+ fun getTeamPlans(): Flowable>>
+
+ @GET("tasks/group/{groupID}")
+ fun getTeamPlanTasks(@Path("groupID") groupId: String): Flowable>
}
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/components/UserComponent.java b/Habitica/src/main/java/com/habitrpg/android/habitica/components/UserComponent.java
index bb4f665cc..96ff76300 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/components/UserComponent.java
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/components/UserComponent.java
@@ -97,6 +97,7 @@ import com.habitrpg.android.habitica.ui.fragments.support.FAQOverviewFragment;
import com.habitrpg.android.habitica.ui.fragments.support.SupportMainFragment;
import com.habitrpg.android.habitica.ui.fragments.tasks.TaskRecyclerViewFragment;
import com.habitrpg.android.habitica.ui.fragments.tasks.TasksFragment;
+import com.habitrpg.android.habitica.ui.fragments.tasks.TeamBoardFragment;
import com.habitrpg.android.habitica.ui.viewmodels.GroupViewModel;
import com.habitrpg.android.habitica.ui.viewmodels.InboxViewModel;
import com.habitrpg.android.habitica.ui.viewmodels.NotificationsViewModel;
@@ -337,4 +338,6 @@ public interface UserComponent {
void inject(AdventureGuideActivity adventureGuideFragment);
void inject(PromoInfoFragment promoInfoFragment);
+
+ void inject(@NotNull TeamBoardFragment teamBoardFragment);
}
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/data/ApiClient.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/data/ApiClient.kt
index e4e31eff4..b8de6d940 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/data/ApiClient.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/data/ApiClient.kt
@@ -262,4 +262,6 @@ interface ApiClient {
fun transferGems(giftedID: String, amount: Int): Flowable
fun unlinkAllTasks(challengeID: String?, keepOption: String): Flowable
fun blockMember(userID: String): Flowable>
+ fun getTeamPlans(): Flowable>
+ fun getTeamPlanTasks(teamID: String): Flowable
}
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/data/UserRepository.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/data/UserRepository.kt
index f920a9692..2cd201072 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/data/UserRepository.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/data/UserRepository.kt
@@ -4,11 +4,13 @@ import com.habitrpg.android.habitica.data.local.UserQuestStatus
import com.habitrpg.android.habitica.models.Achievement
import com.habitrpg.android.habitica.models.QuestAchievement
import com.habitrpg.android.habitica.models.Skill
+import com.habitrpg.android.habitica.models.TeamPlan
import com.habitrpg.android.habitica.models.inventory.Customization
import com.habitrpg.android.habitica.models.inventory.CustomizationSet
import com.habitrpg.android.habitica.models.responses.SkillResponse
import com.habitrpg.android.habitica.models.responses.UnlockResponse
import com.habitrpg.android.habitica.models.responses.VerifyUsernameResponse
+import com.habitrpg.android.habitica.models.social.Group
import com.habitrpg.android.habitica.models.tasks.Task
import com.habitrpg.android.habitica.models.user.Stats
import com.habitrpg.android.habitica.models.user.User
@@ -20,15 +22,15 @@ interface UserRepository : BaseRepository {
fun getUser(): Flowable
fun getUser(userID: String): Flowable
- fun updateUser(user: User?, updateData: Map): Flowable
- fun updateUser(user: User?, key: String, value: Any): Flowable
+ fun updateUser(updateData: Map): Flowable
+ fun updateUser(key: String, value: Any): Flowable
fun retrieveUser(withTasks: Boolean): Flowable
fun retrieveUser(withTasks: Boolean = false, forced: Boolean = false, overrideExisting: Boolean = false): Flowable
fun revive(user: User): Flowable
- fun resetTutorial(user: User?)
+ fun resetTutorial()
fun sleep(user: User): Flowable
@@ -47,7 +49,7 @@ interface UserRepository : BaseRepository {
fun changeClass(selectedClass: String): Flowable
fun unlockPath(user: User?, customization: Customization): Flowable
- fun unlockPath(user: User, set: CustomizationSet): Flowable
+ fun unlockPath(set: CustomizationSet): Flowable
fun runCron(tasks: MutableList)
fun runCron()
@@ -58,7 +60,7 @@ interface UserRepository : BaseRepository {
fun changeCustomDayStart(dayStartTime: Int): Flowable
- fun updateLanguage(user: User?, languageCode: String): Flowable
+ fun updateLanguage(languageCode: String): Flowable
fun resetAccount(): Flowable
fun deleteAccount(password: String): Flowable
@@ -70,7 +72,7 @@ interface UserRepository : BaseRepository {
fun updatePassword(oldPassword: String, newPassword: String, newPasswordConfirmation: String): Flowable
fun verifyUsername(username: String): Flowable
- fun allocatePoint(user: User?, stat: String): Flowable
+ fun allocatePoint(stat: String): Flowable
fun bulkAllocatePoints(user: User?, strength: Int, intelligence: Int, constitution: Int, perception: Int): Flowable
fun useCustomization(user: User?, type: String, category: String?, identifier: String): Flowable
@@ -81,4 +83,8 @@ interface UserRepository : BaseRepository {
fun getUserQuestStatus(): Flowable
fun reroll(): Flowable
+ fun retrieveTeamPlans(): Flowable>
+ fun getTeamPlans(): Flowable>
+ fun retrieveTeamPlan(teamID: String): Flowable
+ fun getTeamPlan(teamID: String): Flowable
}
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/ApiClientImpl.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/ApiClientImpl.kt
index f79c174f4..a47d6c05e 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/ApiClientImpl.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/ApiClientImpl.kt
@@ -780,6 +780,14 @@ class ApiClientImpl//private OnHabitsAPIResult mResultListener;
return apiService.transferGems(mapOf(Pair("toUserId", giftedID), Pair("gemAmount", amount))).compose(configureApiCallObserver())
}
+ override fun getTeamPlans(): Flowable> {
+ return apiService.getTeamPlans().compose(configureApiCallObserver())
+ }
+
+ override fun getTeamPlanTasks(teamID: String): Flowable {
+ return apiService.getTeamPlanTasks(teamID).compose(configureApiCallObserver())
+ }
+
override fun bulkAllocatePoints(strength: Int, intelligence: Int, constitution: Int, perception: Int): Flowable {
val body = HashMap>()
val stats = HashMap()
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/ContentRepositoryImpl.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/ContentRepositoryImpl.kt
index e2e6c0707..61caa63e7 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/ContentRepositoryImpl.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/ContentRepositoryImpl.kt
@@ -46,6 +46,7 @@ abstract class ContentRepositoryImpl(localRepository
val editor = PreferenceManager.getDefaultSharedPreferences(context).edit()
editor.putString("currentEvent", it.currentEventKey)
+ editor.putString("currentEventPromo", it.currentEventPromo)
editor.putLong("currentEventStartDate", it.currentEventStartDate?.time ?: 0)
editor.putLong("currentEventEndDate", it.currentEventEndDate?.time ?: 0)
editor.apply()
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/InventoryRepositoryImpl.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/InventoryRepositoryImpl.kt
index 5febec2fd..32e5f70ab 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/InventoryRepositoryImpl.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/InventoryRepositoryImpl.kt
@@ -137,7 +137,7 @@ class InventoryRepositoryImpl(localRepository: InventoryLocalRepository, apiClie
localRepository.executeTransaction {
val liveItem = localRepository.getLiveObject(ownedItem)
val liveUser = localRepository.getLiveObject(user)
- liveItem?.numberOwned = 1 - (liveItem?.numberOwned ?: 0)
+ liveItem?.numberOwned = (liveItem?.numberOwned ?: 0) - 1
liveUser?.stats?.gp = (user.stats?.gp ?: 0.0) + item.value
}
}
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/TaskRepositoryImpl.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/TaskRepositoryImpl.kt
index c1cb335bf..b1939df49 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/TaskRepositoryImpl.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/TaskRepositoryImpl.kt
@@ -35,8 +35,8 @@ class TaskRepositoryImpl(localRepository: TaskLocalRepository, apiClient: ApiCli
override fun getCurrentUserTasks(taskType: String): Flowable> =
this.localRepository.getTasks(taskType, userID)
- override fun saveTasks(userId: String, order: TasksOrder, tasks: TaskList) {
- localRepository.saveTasks(userId, order, tasks)
+ override fun saveTasks(ownerID: String, order: TasksOrder, tasks: TaskList) {
+ localRepository.saveTasks(ownerID, order, tasks)
}
override fun retrieveTasks(userId: String, tasksOrder: TasksOrder): Flowable {
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/UserRepositoryImpl.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/UserRepositoryImpl.kt
index b9772ca7c..7b623d4ba 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/UserRepositoryImpl.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/data/implementation/UserRepositoryImpl.kt
@@ -10,11 +10,13 @@ import com.habitrpg.android.habitica.helpers.RxErrorHandler
import com.habitrpg.android.habitica.models.Achievement
import com.habitrpg.android.habitica.models.QuestAchievement
import com.habitrpg.android.habitica.models.Skill
+import com.habitrpg.android.habitica.models.TeamPlan
import com.habitrpg.android.habitica.models.inventory.Customization
import com.habitrpg.android.habitica.models.inventory.CustomizationSet
import com.habitrpg.android.habitica.models.responses.SkillResponse
import com.habitrpg.android.habitica.models.responses.UnlockResponse
import com.habitrpg.android.habitica.models.responses.VerifyUsernameResponse
+import com.habitrpg.android.habitica.models.social.Group
import com.habitrpg.android.habitica.models.tasks.Task
import com.habitrpg.android.habitica.models.user.Stats
import com.habitrpg.android.habitica.models.user.User
@@ -33,14 +35,16 @@ class UserRepositoryImpl(localRepository: UserLocalRepository, apiClient: ApiCli
override fun getUser(userID: String): Flowable = localRepository.getUser(userID)
- override fun updateUser(user: User?, updateData: Map): Flowable {
- return apiClient.updateUser(updateData).map { newUser -> mergeUser(user, newUser) }
+ override fun updateUser(updateData: Map): Flowable {
+ return Flowable.zip(apiClient.updateUser(updateData),
+ localRepository.getUser(userID).firstElement().toFlowable(),
+ { newUser, user -> mergeUser(user, newUser) })
}
- override fun updateUser(user: User?, key: String, value: Any): Flowable {
+ override fun updateUser(key: String, value: Any): Flowable {
val updateData = HashMap()
updateData[key] = value
- return updateUser(user, updateData)
+ return updateUser(updateData)
}
override fun retrieveUser(withTasks: Boolean): Flowable =
@@ -68,7 +72,7 @@ class UserRepositoryImpl(localRepository: UserLocalRepository, apiClient: ApiCli
val timeZone = calendar.timeZone
val offset = -TimeUnit.MINUTES.convert(timeZone.getOffset(calendar.timeInMillis).toLong(), TimeUnit.MILLISECONDS)
if (offset.toInt() != user.preferences?.timezoneOffset ?: 0) {
- return@flatMap updateUser(user, "preferences.timezoneOffset", offset.toString())
+ return@flatMap updateUser("preferences.timezoneOffset", offset.toString())
} else {
return@flatMap Flowable.just(user)
}
@@ -80,8 +84,9 @@ class UserRepositoryImpl(localRepository: UserLocalRepository, apiClient: ApiCli
override fun revive(user: User): Flowable =
apiClient.revive().map { newUser -> mergeUser(user, newUser) }
+ .flatMap { retrieveUser(false, true) }
- override fun resetTutorial(user: User?) {
+ override fun resetTutorial() {
localRepository.getTutorialSteps()
.firstElement()
.map