fix task scoring

This commit is contained in:
Phillip Thelen 2017-04-07 10:09:51 +02:00
parent b6c760bc6b
commit 752325a3a0
4 changed files with 5 additions and 7 deletions

View file

@ -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="167"
android:versionCode="168"
android:versionName="1.0"
android:screenOrientation="portrait"
android:installLocation="auto" >

View file

@ -12,7 +12,6 @@
android:scrollbarSize="3dp"
android:scrollbarThumbVertical="@color/md_grey_500"
android:scrollbars="vertical"
android:fitsSystemWindows="true"
android:clipToPadding="false"
android:paddingBottom="?attr/actionBarSize"/>

View file

@ -17,7 +17,6 @@
android:scrollbarSize="3dp"
android:scrollbarThumbVertical="@color/md_grey_500"
android:scrollbars="vertical"
android:fitsSystemWindows="true"
android:clipToPadding="false"
android:paddingBottom="?attr/actionBarSize" />

View file

@ -1449,13 +1449,13 @@ public class MainActivity extends BaseActivity implements Action1<Throwable>, Ha
switch (event.Task.type) {
case Task.TYPE_DAILY: {
dailyCheckUseCase.observable(new DailyCheckUseCase.RequestValues(event.Task, !event.Task.getCompleted()))
.subscribe(res -> EventBus.getDefault().post(new TaskUpdatedEvent(event.Task)), error -> {
.subscribe(new TaskScoringCallback(this, event.Task.getId()), error -> {
});
}
break;
case Task.TYPE_TODO: {
todoCheckUseCase.observable(new TodoCheckUseCase.RequestValues(event.Task, !event.Task.getCompleted()))
.subscribe(res -> EventBus.getDefault().post(new TaskUpdatedEvent(event.Task)), error -> {
.subscribe(new TaskScoringCallback(this, event.Task.getId()), error -> {
});
}
break;
@ -1465,14 +1465,14 @@ public class MainActivity extends BaseActivity implements Action1<Throwable>, Ha
@Subscribe
public void onEvent(ChecklistCheckedCommand event) {
checklistCheckUseCase.observable(new ChecklistCheckUseCase.RequestValues(event.task.getId(), event.item.getId()))
.subscribe(res -> EventBus.getDefault().post(new TaskUpdatedEvent(event.task)), error -> {
.subscribe(new TaskUpdateCallback(), error -> {
});
}
@Subscribe
public void onEvent(HabitScoreEvent event) {
habitScoreUseCase.observable(new HabitScoreUseCase.RequestValues(event.habit, event.Up))
.subscribe(res -> onTaskDataReceived(res, event.habit), error -> {
.subscribe(new TaskScoringCallback(this, event.habit.getId()), error -> {
});
}