Skip to content

Commit

Permalink
codinguser#876 - Logs and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanGarf committed Jun 13, 2020
1 parent 5db92fb commit 453252e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,13 @@ public long getID(@NonNull String uid){
if (cursor.moveToFirst()) {
result = cursor.getLong(cursor.getColumnIndexOrThrow(DatabaseSchema.CommonColumns._ID));
} else {
throw new IllegalArgumentException(mTableName + " with GUID " + uid + " does not exist in the db");
throw new IllegalArgumentException("UID ("
+ uid
+ ") does not exist in Table ("
+ mTableName
+ ") of db ("
+ mDb.getPath()
+ ")");
}
} finally {
cursor.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,19 @@ protected void onResume() {

@Override
protected void onStart() {

super.onStart();

if (BuildConfig.CAN_REQUEST_RATING) {
RateThisApp.init(rateAppConfig);
RateThisApp.onStart(this);
RateThisApp.showRateDialogIfNeeded(this);
}

Log.i(LOG_TAG,
"New active db (" + GnuCashApplication.getActiveDb()
.getPath() + ")");

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,9 @@ protected void onResume() {
*/
private void setTitleIndicatorColor() {

int iColor = AccountsDbAdapter.getActiveAccountColorResource(getCurrentAccountUID());
final String currentAccountUID = getCurrentAccountUID();

int iColor = AccountsDbAdapter.getActiveAccountColorResource(currentAccountUID);

mTabLayout.setBackgroundColor(iColor);

Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/org/gnucash/android/util/BookUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ public static void activateBook(@NonNull String bookUID){
* @param bookUID GUID of the book to be loaded
*/
public static void loadBook(@NonNull String bookUID){

activateBook(bookUID);

AccountsActivity.start(GnuCashApplication.getAppContext());
}
}

0 comments on commit 453252e

Please sign in to comment.