Skip to content

Commit

Permalink
Merge pull request #2019 from moneymanagerex/orm
Browse files Browse the repository at this point in the history
Refactor: upgrade dagger to v2.54 and clean up subcategoryId code
  • Loading branch information
guanlisheng authored Dec 28, 2024
2 parents 5537633 + a582a47 commit b3009c8
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ dependencies {
implementation fileTree(dir: 'sqlite3mc', include: ['*.aar', '*.jar'], exclude: [])
annotationProcessor 'org.parceler:parceler:1.1.13'
// Dagger 2
implementation 'com.google.dagger:dagger:2.53.1'
annotationProcessor 'com.google.dagger:dagger-compiler:2.53.1'
implementation 'com.google.dagger:dagger:2.54'
annotationProcessor 'com.google.dagger:dagger-compiler:2.54'
// picasso
implementation 'com.squareup.picasso:picasso:2.71828'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public void setName(String value) {
}

public String getBasename() { return getString(BASENAME);}
public void setBasename(String value) { setString(BASENAME, value);}

public void setBasename(String value) { setString(BASENAME, value);}
}


Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class SplitCategory
public static final String SPLITTRANSAMOUNT = "SPLITTRANSAMOUNT";
public static final String NOTES = "NOTES";

public static SplitCategory create(long transactionId, long categoryId, long subcategoryId, TransactionTypes parentTransactionType, Money amount, String notes) {
public static SplitCategory create(long transactionId, long categoryId, TransactionTypes parentTransactionType, Money amount, String notes) {
SplitCategory entity = new SplitCategory();

entity.setId(Constants.NOT_SET);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class SplitRecurringCategory
public static final String SPLITTRANSAMOUNT = "SPLITTRANSAMOUNT";
public static final String NOTES = "NOTES";

public static SplitRecurringCategory create(long transactionId, long categoryId, long subcategoryId,
public static SplitRecurringCategory create(long transactionId, long categoryId,
TransactionTypes parentTransactionType, Money amount, String notes) {
SplitRecurringCategory entity = new SplitRecurringCategory();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ public static ISplitTransaction create(String entityClassName, TransactionTypes

if (entityClassName != null && entityClassName.contains(recurringSplitName)) {
entity = SplitRecurringCategory.create(Constants.NOT_SET, Constants.NOT_SET,
Constants.NOT_SET, parentTransactionType, MoneyFactory.fromDouble(0), Constants.EMPTY_STRING);
parentTransactionType, MoneyFactory.fromDouble(0), Constants.EMPTY_STRING);
} else {
entity = SplitCategory.create(Constants.NOT_SET, Constants.NOT_SET,
Constants.NOT_SET, parentTransactionType, MoneyFactory.fromDouble(0), Constants.EMPTY_STRING);
parentTransactionType, MoneyFactory.fromDouble(0), Constants.EMPTY_STRING);
}

return entity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ public static void createSplitTransaction() {
txRepo.insert(tx);
// split categories
SplitCategoryRepository splitRepo = new SplitCategoryRepository(context);
SplitCategory split1 = SplitCategory.create(tx.getId(), 1, -1,
SplitCategory split1 = SplitCategory.create(tx.getId(), 1,
tx.getTransactionType(), MoneyFactory.fromDouble(25), "Note 1");
splitRepo.insert(split1);
SplitCategory split2 = SplitCategory.create(tx.getId(), 1, -1,
SplitCategory split2 = SplitCategory.create(tx.getId(), 1,
tx.getTransactionType(), MoneyFactory.fromDouble(25), "Note 2");
splitRepo.insert(split2);
}
Expand Down

0 comments on commit b3009c8

Please sign in to comment.