mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-19 20:29:02 +00:00
fix minor issues
This commit is contained in:
parent
45ee45ff17
commit
f7dc8f936b
5 changed files with 6 additions and 9 deletions
|
|
@ -2,7 +2,7 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.habitrpg.android.habitica"
|
||||
android:versionCode="1894"
|
||||
android:versionCode="1896"
|
||||
android:versionName="1.1"
|
||||
android:screenOrientation="portrait"
|
||||
android:installLocation="auto" >
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<string name="SP_APIToken" translatable="false">APIToken</string>
|
||||
<string name="SP_username" translatable="false">Username</string>
|
||||
<string name="SP_email" translatable="false">E-mail</string>
|
||||
<string name="base_url" translatable="false">https://habitica.com</string>
|
||||
<string name="base_url" translatable="false">https://habitrpg-beta.herokuapp.com</string>
|
||||
|
||||
<!-- Local notification actions -->
|
||||
<string name="accept_party_invite" translatable="false">ACCEPT_PARTY_INVITE</string>
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class TaskRepositoryImpl extends BaseRepositoryImpl<TaskLocalRepository>
|
|||
@Override
|
||||
public Observable<TaskScoringResult> taskChecked(@Nullable User user, Task task, boolean up, boolean force) {
|
||||
long now = new Date().getTime();
|
||||
if (lastTaskAction > now-500 || force) {
|
||||
if (lastTaskAction > now-500 && !force) {
|
||||
return Observable.just(null);
|
||||
}
|
||||
lastTaskAction = now;
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ public class User extends RealmObject {
|
|||
return party != null && party.id != null && party.id.length() > 0;
|
||||
}
|
||||
|
||||
public boolean getNeedsCron() {
|
||||
public Boolean getNeedsCron() {
|
||||
return needsCron;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.habitrpg.android.habitica.ui.views.yesterdailies;
|
|||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
|
@ -24,7 +23,6 @@ import java.util.List;
|
|||
import butterknife.BindColor;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import io.realm.RealmResults;
|
||||
|
||||
public class YesterdailyDialog extends AlertDialog {
|
||||
|
||||
|
|
@ -103,9 +101,8 @@ public class YesterdailyDialog extends AlertDialog {
|
|||
public static void showDialogIfNeeded(Activity activity, String userId, UserRepository userRepository, TaskRepository taskRepository) {
|
||||
if (userRepository != null && userId != null) {
|
||||
userRepository.getUser(userId).first()
|
||||
.filter(User::getNeedsCron)
|
||||
.flatMap(user -> taskRepository.getTasks(Task.TYPE_DAILY, userId))
|
||||
.first()
|
||||
.filter(user -> user != null && user.getNeedsCron() != null && user.getNeedsCron())
|
||||
.flatMap(user -> taskRepository.getTasks(Task.TYPE_DAILY, userId).first())
|
||||
.map(tasks -> tasks.where().equalTo("isDue", true).equalTo("completed", false).equalTo("yesterDaily", true).findAll())
|
||||
.flatMap(taskRepository::getTaskCopies)
|
||||
.subscribe(tasks -> {
|
||||
|
|
|
|||
Loading…
Reference in a new issue