mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-18 03:39:00 +00:00
fix yesterdaily issue
This commit is contained in:
parent
fa18ebceab
commit
c24af7f8a0
6 changed files with 10 additions and 5 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="1908"
|
||||
android:versionCode="1909"
|
||||
android:versionName="1.1.1"
|
||||
android:screenOrientation="portrait"
|
||||
android:installLocation="auto" >
|
||||
|
|
|
|||
|
|
@ -162,6 +162,7 @@ public class ApiClientImpl implements Action1<Throwable>, ApiClient {
|
|||
this.context = context;
|
||||
this.crashlyticsProxy = crashlyticsProxy;
|
||||
this.popupNotificationsManager = popupNotificationsManager;
|
||||
this.popupNotificationsManager.setApiClient(this);
|
||||
|
||||
HabiticaBaseApplication.getComponent().inject(this);
|
||||
crashlyticsProxy.setUserIdentifier(this.hostConfig.getUser());
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ public class TaskRepositoryImpl extends BaseRepositoryImpl<TaskLocalRepository>
|
|||
|
||||
@Override
|
||||
public Observable<TaskList> updateDailiesIsDue(Date date) {
|
||||
DateFormat formatter = new SimpleDateFormat("YYYY-MM-dd", Locale.US);
|
||||
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd", Locale.US);
|
||||
return apiClient.getTasks("dailys", formatter.format(date))
|
||||
.doOnNext(localRepository::updateIsdue);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,11 @@ public class UserRepositoryImpl extends BaseRepositoryImpl<UserLocalRepository>
|
|||
lastSync = new Date();
|
||||
return apiClient.retrieveUser(withTasks)
|
||||
.doOnNext(localRepository::saveUser)
|
||||
.doOnNext(user -> taskRepository.saveTasks(user.getId(), user.getTasksOrder(), user.tasks))
|
||||
.doOnNext(user -> {
|
||||
if (withTasks) {
|
||||
taskRepository.saveTasks(user.getId(), user.getTasksOrder(), user.tasks);
|
||||
}
|
||||
})
|
||||
.flatMap(user -> {
|
||||
Calendar calendar = new GregorianCalendar();
|
||||
TimeZone timeZone = calendar.getTimeZone();
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public class NotifyUserUseCase extends UseCase<NotifyUserUseCase.RequestValues,
|
|||
builder.append(" Gold");
|
||||
}
|
||||
if (mp > 0) {
|
||||
builder.append(" + ").append(String.valueOf(round(mp, 2))).append(" Magic");
|
||||
builder.append(" + ").append(String.valueOf(round(mp, 2))).append(" Mana");
|
||||
}
|
||||
|
||||
return new Pair<>(builder, displayType);
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public class SkillTasksActivity extends BaseActivity {
|
|||
fragment.taskType = Task.TYPE_DAILY;
|
||||
break;
|
||||
default:
|
||||
fragment.taskType = Task.TYPE_REWARD;
|
||||
fragment.taskType = Task.TYPE_TODO;
|
||||
}
|
||||
|
||||
compositeSubscription.add(fragment.getTaskSelectionEvents().subscribe(task -> taskSelected(task), RxErrorHandler.handleEmptyError()));
|
||||
|
|
|
|||
Loading…
Reference in a new issue