Fix: demo data issues and category reorder with subcategories#515
Merged
lucaantonelli merged 3 commits intoRIP-Comm:mainfrom Feb 27, 2026
Merged
Fix: demo data issues and category reorder with subcategories#515lucaantonelli merged 3 commits intoRIP-Comm:mainfrom
lucaantonelli merged 3 commits intoRIP-Comm:mainfrom
Conversation
Collaborator
|
LGTM |
Mattia-Sacchi
pushed a commit
to Mattia-Sacchi/sossoldi
that referenced
this pull request
Mar 6, 2026
…mm#515) * Fix demo data * Dart format * Fix category reordering when subcategories are added
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Description
Fixes several issues in the
fillDemoDatafunction that caused incorrect or incomplete data to be inserted into the database, leading to unexpected behaviour when using the demo mode.Also fixes a bug in
reorderCategorieswhere the presence of subcategories in the full category list caused drag indices to map to the wrong items, this is a general bug that affects any user who has created subcategories, not just demo data.Closes: #507
📱 Changes
countNetWorthandpositioncolumns to thebankAccountdemo INSERT. All 3 accounts were defaulting toposition = 0causing undefined ordering, andcountNetWorthwas omitted entirelypositioncolumn to thecategoryTransactiondemo INSERT. All 7 categories were defaulting toposition = 0causing undefined orderingcolorto match its parent "Home" (2→1). The app enforces colour inheritance when creating subcategories viaaddSubcategory()idCategory = 0instead ofnull,0is not a valid category id; transfers have no category and must storeNULLreorderCategoriesapplying drag indices against the full flat list (parents + subcategories) instead of the parent-only list shown in the UI. Dragging any category while subcategories existed would reorder the wrong item🧪 Testing Instructions
Behaviour
🔍 Checklist for reviewers