diff --git a/Habitica/AndroidManifest.xml b/Habitica/AndroidManifest.xml index 5c6b423e4..a3d5da8d7 100644 --- a/Habitica/AndroidManifest.xml +++ b/Habitica/AndroidManifest.xml @@ -2,7 +2,7 @@ diff --git a/Habitica/build.gradle b/Habitica/build.gradle index 471126949..45b3d0748 100644 --- a/Habitica/build.gradle +++ b/Habitica/build.gradle @@ -41,7 +41,7 @@ repositories { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) + compile fileTree(include: ['*.jar'], dir: 'libs') //Networking compile 'com.squareup.okhttp3:okhttp:3.8.1' compile 'com.squareup.okhttp3:logging-interceptor:3.8.1' @@ -51,16 +51,13 @@ dependencies { } compile 'com.squareup.retrofit2:converter-gson:2.3.0' compile 'com.squareup.retrofit2:adapter-rxjava:2.3.0' - //Crash Logging releaseCompile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') { transitive = true; } - // View Elements Binding :) compile 'com.jakewharton:butterknife:8.6.0' apt 'com.jakewharton:butterknife-compiler:8.6.0' - //Dependency Injection compile 'com.google.dagger:dagger:2.11' apt 'com.google.dagger:dagger-compiler:2.11' @@ -74,47 +71,34 @@ dependencies { compile 'com.android.support:recyclerview-v7:25.3.1' compile 'com.android.support:preference-v14:25.3.1' compile 'com.android.support:multidex:1.0.1' - //QR Code compile 'com.github.kenglxn.QRGen:android:2.2.0' - // Emojis compile 'com.github.viirus:emoji-lib:0.0.4' - // Markdown compile 'com.commonsware.cwac:anddown:0.3.0' - // About View for all dependent Libraries, we are using compile('com.mikepenz:aboutlibraries:5.9.4@aar') { transitive = true } - // a better fab alternative compile 'com.github.clans:fab:1.6.4' - //Eventbus compile 'org.greenrobot:eventbus:3.0.0' - // IAP Handling / Verification compile 'org.solovyev.android:checkout:1.0.1' - //Facebook compile('com.facebook.android:facebook-android-sdk:4.19.0') { transitive = true } - compile 'fr.avianey.com.viewpagerindicator:library:2.4.1@aar' - // lodash/underscore compile 'com.github.javadev:underscore:1.23' - //RxJava compile 'io.reactivex:rxandroid:1.2.1' compile 'io.reactivex:rxjava:1.3.0' - //Analytics compile 'com.amplitude:android-sdk:2.13.3' - // Fresco Image Management Library compile('com.facebook.fresco:fresco:1.3.0') { exclude module: 'bolts-android' @@ -123,34 +107,27 @@ dependencies { exclude module: 'bolts-android' } //Tests - testCompile "junit:junit:4.10" - testCompile "org.assertj:assertj-core:1.7.0" + testCompile 'junit:junit:4.10' + testCompile 'org.assertj:assertj-core:1.7.0' testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1' - testCompile "org.robolectric:robolectric:3.3.2" + testCompile 'org.robolectric:robolectric:3.3.2' testCompile 'org.robolectric:shadows-multidex:3.3.2' - testCompile "org.robolectric:shadows-support-v4:3.3.2" - testCompile "org.mockito:mockito-core:2.8.9" + testCompile 'org.robolectric:shadows-support-v4:3.3.2' + testCompile 'org.mockito:mockito-core:2.8.9' testCompile 'org.powermock:powermock-api-mockito2:1.7.0' testCompile 'org.powermock:powermock-module-junit4-rule-agent:1.7.0' testCompile 'org.powermock:powermock-module-junit4-rule:1.7.0' testCompile 'org.powermock:powermock-module-junit4:1.7.0' - //Leak Detection debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1' releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1' - //Push Notifications compile 'com.google.firebase:firebase-core:10.2.0' compile 'com.google.firebase:firebase-messaging:10.2.0' - compile 'com.google.android.gms:play-services-auth:10.2.0' - compile 'org.apmem.tools:layouts:1.10@aar' - compile 'com.roughike:bottom-bar:2.3.1' - compile 'io.realm:android-adapters:2.1.0' - compile(project(':seeds-sdk')) { exclude group: 'com.google.android.gms' exclude group: 'com.android.support', module: 'multidex' diff --git a/Habitica/res/layout/fragment_party_detail.xml b/Habitica/res/layout/fragment_party_detail.xml index a23a4ca3b..733c4ba74 100644 --- a/Habitica/res/layout/fragment_party_detail.xml +++ b/Habitica/res/layout/fragment_party_detail.xml @@ -113,7 +113,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" tools:text="3 Participants" - android:textColor="@color/gray_300"/> + android:textColor="@color/gray_300" + android:visibility="gone"/> - + @Override public Observable retrieveTasks(String userId, TasksOrder tasksOrder, Date dueDate) { - DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd", Locale.US); + DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.US); return this.apiClient.getTasks("dailys", formatter.format(dueDate)) .doOnNext(res -> this.localRepository.saveTasks(userId, tasksOrder, res)); } @@ -244,7 +244,7 @@ public class TaskRepositoryImpl extends BaseRepositoryImpl @Override public Observable updateDailiesIsDue(Date date) { - DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd", Locale.US); + DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.US); return apiClient.getTasks("dailys", formatter.format(date)) .flatMap(localRepository::updateIsdue); } diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/data/local/implementation/RealmInventoryLocalRepository.java b/Habitica/src/main/java/com/habitrpg/android/habitica/data/local/implementation/RealmInventoryLocalRepository.java index b60a5da83..348d966e9 100644 --- a/Habitica/src/main/java/com/habitrpg/android/habitica/data/local/implementation/RealmInventoryLocalRepository.java +++ b/Habitica/src/main/java/com/habitrpg/android/habitica/data/local/implementation/RealmInventoryLocalRepository.java @@ -161,6 +161,9 @@ public class RealmInventoryLocalRepository extends RealmContentLocalRepository i @Override public Observable> getOwnedMounts(String animalType, String animalGroup) { + if (animalGroup == null) { + animalGroup = ""; + } animalGroup = animalGroup.replace("pets", "mounts").replace("Pets", "Mounts"); return realm.where(Mount.class) .equalTo("animalGroup", animalGroup) diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/fragments/GemsPurchaseFragment.java b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/fragments/GemsPurchaseFragment.java index 18660865f..8fa14a72f 100644 --- a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/fragments/GemsPurchaseFragment.java +++ b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/fragments/GemsPurchaseFragment.java @@ -119,23 +119,7 @@ public class GemsPurchaseFragment extends BaseFragment implements GemPurchaseAct } public void purchaseGems(String sku) { - // check if the user already bought and if it hasn't validated yet - billingRequests.isPurchased(ProductTypes.IN_APP, sku, new RequestListener() { - @Override - public void onSuccess(@NonNull Boolean aBoolean) { - if (!aBoolean) { - // no current product exist - final ActivityCheckout checkout = listener.getActivityCheckout(); - Log.d("GEM", sku); - billingRequests.purchase(ProductTypes.IN_APP, sku, null, checkout.getPurchaseFlow()); - } - } - - @Override - public void onError(int i, @NonNull Exception e) { - crashlyticsProxy.fabricLogE("Purchase", "Error", e); - } - }); - + final ActivityCheckout checkout = listener.getActivityCheckout(); + billingRequests.purchase(ProductTypes.IN_APP, sku, null, checkout.getPurchaseFlow()); } } diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/fragments/social/party/PartyDetailFragment.java b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/fragments/social/party/PartyDetailFragment.java index 2ede01b90..d0c1b0512 100644 --- a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/fragments/social/party/PartyDetailFragment.java +++ b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/fragments/social/party/PartyDetailFragment.java @@ -8,6 +8,8 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; +import android.widget.LinearLayout; +import android.widget.ListView; import android.widget.TextView; import com.facebook.drawee.view.SimpleDraweeView; @@ -85,6 +87,8 @@ public class PartyDetailFragment extends BaseFragment { Button questCancelButton; @BindView(R.id.quest_progress_view) QuestProgressView questProgressView; + @BindView(R.id.quest_participant_list) + LinearLayout questParticipantList; public String partyId;