Skip to content

A local-first personal finance app

Fix new transactions account notes not clearing (#4914)

Alec Bakholdin2215c131a57d
diff --git a/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx b/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx
index c9462dc5e5..43b9d32664 100644
--- a/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx
+++ b/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx
@@ -482,6 +482,13 @@ const TransactionEditInner = memo(function TransactionEditInner({
);
const { grouped: categoryGroups } = useCategories();
+ useEffect(() => {
+ if (window.history.length === 1) {
+ window.history.replaceState(null, 'Actual Budget', '/');
+ window.history.pushState(null, 'Add Transaction', '/transactions/new');
+ }
+ }, []);
+
const [transaction, ...childTransactions] = transactions;
const { editingField, onRequestActiveEdit, onClearActiveEdit } =
diff --git a/upcoming-release-notes/4914.md b/upcoming-release-notes/4914.md
new file mode 100644
index 0000000000..a987c14ad2
--- /dev/null
+++ b/upcoming-release-notes/4914.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [alecbakholdin]
+---
+
+Fixed issue with account and notes not clearing when launching action from PWA