Skip to content

Commit

Permalink
revert old transfer behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
sadespresso committed Oct 20, 2024
1 parent a295748 commit 6e349b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions lib/objectbox/actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ extension AccountActions on Account {
uuid: const Uuid().v4(),
fromAccountUuid: uuid,
toAccountUuid: targetAccount.uuid,
relatedTransactionUuid: fromTransactionUuid,
relatedTransactionUuid: toTransactionUuid,
);

final String resolvedTitle = title ??
Expand All @@ -540,7 +540,7 @@ extension AccountActions on Account {
title: resolvedTitle,
description: description,
extensions: [
transferData.copyWith(relatedTransactionUuid: toTransactionUuid),
transferData.copyWith(relatedTransactionUuid: fromTransactionUuid),
...filteredExtensions,
],
uuidOverride: toTransactionUuid,
Expand Down Expand Up @@ -585,6 +585,11 @@ extension AccountActions on Account {
return ext..setRelatedTransactionUuid(uuid);
}

if (ext.key == Transfer.keyName) {
// Transfer extension is handled separately
return ext;
}

if (ext.relatedTransactionUuid == uuid) {
return ext;
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A personal finance managing app

publish_to: "none" # Remove this line if you wish to publish to pub.dev

version: "0.7.1+60"
version: "0.7.1+61"

environment:
sdk: ">=3.5.0 <4.0.0"
Expand Down

0 comments on commit 6e349b7

Please sign in to comment.