fix minor issues

This commit is contained in:
Phillip Thelen 2017-07-21 14:14:06 +02:00
parent 012a2d8f56
commit bddb7a7a11
3 changed files with 3 additions and 3 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="1920"
android:versionCode="1921"
android:versionName="1.1.5"
android:screenOrientation="portrait"
android:installLocation="auto" >

View file

@ -41,7 +41,7 @@ public class TagRepositoryImpl extends BaseRepositoryImpl<TagLocalRepository> im
@Override
public Observable<Tag> createTags(Collection<Tag> tags) {
return Observable.defer(() -> Observable.from(tags))
.filter(tag -> !tag.getName().isEmpty())
.filter(tag -> tag.getName() != null && !tag.getName().isEmpty())
.flatMap(this::createTag);
}

View file

@ -311,7 +311,7 @@ public class TaskFormActivity extends BaseActivity implements AdapterView.OnItem
btnDelete.setOnClickListener(view -> new AlertDialog.Builder(view.getContext())
.setTitle(getString(R.string.taskform_delete_title))
.setMessage(getString(R.string.taskform_delete_message)).setPositiveButton(getString(R.string.yes), (dialog, which) -> {
if (task != null) {
if (task != null && task.isValid()) {
taskRepository.deleteTask(task.getId());
}