[PR #1933] [MERGED] Fix switching budget from rollover budget to report budget and immediately back does not work #4029

Closed
opened 2026-02-28 20:50:30 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/1933
Author: @paulsukow
Created: 11/19/2023
Status: Merged
Merged: 11/21/2023
Merged by: @joel-jeremy

Base: masterHead: budget-type-switch-bug-fix


📝 Commits (2)

  • e83c03b Fix switching budget from rollover budget to report budget and immediately back does not work
  • 06fcd46 Pr Changes

📊 Changes

5 files changed (+50 additions, -19 deletions)

View changed files

📝 packages/desktop-client/src/components/Titlebar.tsx (+24 -6)
📝 packages/desktop-client/src/components/budget/MobileBudget.js (+7 -2)
📝 packages/desktop-client/src/components/budget/index.tsx (+10 -5)
📝 packages/desktop-client/src/components/budget/util.ts (+3 -6)
upcoming-release-notes/1933.md (+6 -0)

📄 Description

Fix for https://github.com/actualbudget/actual/pull/1915.

The issue was that TitlebarProvider has a pub/sub event pattern and the onTitlebarEvent listener was only set on first render of the budget screen, so the props.budgetType in the function context was always set to the original value. To fix it I pulled the logic for the new budget type out of the onTitlebarEvent function and into the tool bar component. If there was an additional budget type in the future, then the toolbar button could be changed to a drop down menu and the onTitlebarEvent function would not need to change.

This is my first pr on this project and I'm open to suggestions on a different way to fix this.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/1933 **Author:** [@paulsukow](https://github.com/paulsukow) **Created:** 11/19/2023 **Status:** ✅ Merged **Merged:** 11/21/2023 **Merged by:** [@joel-jeremy](https://github.com/joel-jeremy) **Base:** `master` ← **Head:** `budget-type-switch-bug-fix` --- ### 📝 Commits (2) - [`e83c03b`](https://github.com/actualbudget/actual/commit/e83c03b59c547e94f7c295f37cfeec5d08e5af54) Fix switching budget from rollover budget to report budget and immediately back does not work - [`06fcd46`](https://github.com/actualbudget/actual/commit/06fcd46a2225225c89c729524e62443196967c22) Pr Changes ### 📊 Changes **5 files changed** (+50 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/Titlebar.tsx` (+24 -6) 📝 `packages/desktop-client/src/components/budget/MobileBudget.js` (+7 -2) 📝 `packages/desktop-client/src/components/budget/index.tsx` (+10 -5) 📝 `packages/desktop-client/src/components/budget/util.ts` (+3 -6) ➕ `upcoming-release-notes/1933.md` (+6 -0) </details> ### 📄 Description Fix for https://github.com/actualbudget/actual/pull/1915. The issue was that TitlebarProvider has a pub/sub event pattern and the onTitlebarEvent listener was only set on first render of the budget screen, so the props.budgetType in the function context was always set to the original value. To fix it I pulled the logic for the new budget type out of the onTitlebarEvent function and into the tool bar component. If there was an additional budget type in the future, then the toolbar button could be changed to a drop down menu and the onTitlebarEvent function would not need to change. This is my first pr on this project and I'm open to suggestions on a different way to fix this. <!-- Thank you for submitting a pull request! Make sure to follow the instructions to write release notes for your PR — it should only take a minute or two: https://github.com/actualbudget/docs#writing-good-release-notes --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-02-28 20:50:30 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#4029