Skip to content

Commit

Permalink
1) Fix entity selector for new transaction 2) Create a public Bitrise…
Browse files Browse the repository at this point in the history
… repo
  • Loading branch information
dsolonenko committed Dec 10, 2019
1 parent 2cbb137 commit 95aa8a3
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Financisto

[![Build Status](https://app.bitrise.io/app/3544bb7db476c945/status.svg?token=xoX8HAeUbuvWg-n2JiAK6g&branch=master)](https://app.bitrise.io/app/3544bb7db476c945)
[![Build Status](https://app.bitrise.io/app/a4284a64a52e1063/status.svg?token=-JUe6I0K_79mxYjxLGp9BA&branch=master)](https://app.bitrise.io/app/a4284a64a52e1063)

## About

Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ android {
minSdkVersion 19
targetSdkVersion 28
versionCode 122
versionName "1.8.2"
versionName "1.8.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
javaCompileOptions {
Expand Down Expand Up @@ -110,6 +110,6 @@ dependencies {
implementation fileTree(include: '**/*.jar', dir: 'libs')

testImplementation 'junit:junit:4.12'
testImplementation 'androidx.test:core:1.0.0'
testImplementation 'androidx.test:core:1.2.0'
testImplementation 'org.robolectric:robolectric:4.2.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ void hideFilter() {
filterLayout.setVisibility(View.GONE);
listLayout.setVisibility(View.VISIBLE);
}

boolean isFilterOn() {
return filterLayout.getVisibility() == View.VISIBLE;
}
}

FilterNode addFilterNode(LinearLayout layout, int id, int actBtnId, int clearBtnId, int labelId, int defaultValueResId, int showListId, int closeFilterId, int showFilterId) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
/*******************************************************************************
* Copyright (c) 2010 Denis Solonenko.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v2.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* Contributors:
* Denis Solonenko - initial API and implementation
******************************************************************************/
package ru.orangesoftware.financisto.activity;

import android.app.AlertDialog;
Expand Down Expand Up @@ -264,6 +254,9 @@ private void setAttributeData(View v, Attribute a) {
protected void onClick(final View v, final int id) {
switch (id) {
case R.id.category:
case R.id.category_show_filter:
case R.id.category_close_filter:
case R.id.category_show_list:
parentCatSelector.onClick(R.id.category);
break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,15 +358,11 @@ public static void updateCheckedEntities(List<? extends MyEntity> list, String[]
}

void createNewEntity() {
if (text != null && selectedEntityId == 0) {
T e = em.findOrInsertEntityByTitle(entityClass, filterText());
if (filterNode != null && filterNode.isFilterOn() && selectedEntityId == 0) {
String filterText = autoCompleteView.getText().toString();
T e = em.findOrInsertEntityByTitle(entityClass, filterText);
selectEntity(e);
}
}

private String filterText() {
if (text == null) return "";
return text.getText().toString();
}

}
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@ subprojects {
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
}
}
}

tasks.matching {it instanceof Test}.all {
testLogging.events = ["failed", "passed", "skipped"]
}

0 comments on commit 95aa8a3

Please sign in to comment.