Skip to content

Commit

Permalink
Refactor: clean up and format
Browse files Browse the repository at this point in the history
  • Loading branch information
guanlisheng committed Dec 26, 2024
1 parent 40ae1db commit 4e2b262
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public MmxCursorLoader(Context context) {
public MmxCursorLoader(Context context, Uri uri, Select query) {
// String[] projection, String selection, String[] selectionArgs, String sortOrder
super(context, uri, query.projection, query.selection, query.selectionArgs, query.sort);

}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import android.content.Context;
import android.database.Cursor;
import android.text.TextUtils;
import android.util.Log;
import android.util.LongSparseArray;
import android.widget.Toast;

Expand Down Expand Up @@ -228,7 +227,7 @@ public long getBaseCurrencyId() {
// could not get base currency from the system. Use Euro?
//Currency euro = repo.loadCurrency("EUR");
//result = euro.getCurrencyId();
Log.w("CurrencyService", "system default currency is null!");
Timber.tag("CurrencyService").w("system default currency is null!");
result = 2;
} else {
CurrencyRepository repo = getRepository();
Expand All @@ -238,7 +237,7 @@ public long getBaseCurrencyId() {
result = defaultCurrency.getCurrencyId();
} else {
// currency not found.
Log.w("CurrencyService", "currency " + systemCurrency.getCurrencyCode() +
Timber.tag("CurrencyService").w("currency " + systemCurrency.getCurrencyCode() +
"not found!");
result = 2;
}
Expand Down Expand Up @@ -490,7 +489,7 @@ public void updateExchangeRate(long currencyId) {
}

public void updateExchangeRates(List<Currency> currencies){
if (currencies == null || currencies.size() <= 0) return;
if (currencies == null || currencies.size() == 0) return;

String symbol;
String baseCurrencySymbol = getBaseCurrencyCode();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public Loader<Cursor> onCreateLoader(int id, Bundle args) {
String whereClause = null;
String[] selectionArgs = null;
if (!TextUtils.isEmpty(mCurFilter)) {
whereClause = Payee.PAYEENAME + " LIKE ?"; // + mCurFilter + "%'";
whereClause = Payee.PAYEENAME + " LIKE ?";
selectionArgs = new String[]{mCurFilter + '%'};
}
PayeeRepository repo = new PayeeRepository(getActivity());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public Loader<Cursor> onCreateLoader(int id, Bundle args) {
String whereClause = "ACTIVE = 1";
String[] selectionArgs = null;
if (!TextUtils.isEmpty(mCurFilter)) {
whereClause += " AND " + Tag.TAGNAME + " LIKE ?"; // + mCurFilter + "%'";
whereClause += " AND " + Tag.TAGNAME + " LIKE ?";
selectionArgs = new String[]{mCurFilter + '%'};
}
TagRepository repo = new TagRepository(getActivity());
Expand Down

0 comments on commit 4e2b262

Please sign in to comment.