fix(BreadActivity): remove dead bottom-nav/toolbar cruft causing startup NPE - #248
Merged
Merged
Conversation
…tup NPE The "Techdebt/improve shop" refactor (d0886db) deleted initializeViews(), which was the only place binding bottomNav, menuBut, drawerLayout, primaryPrice, and secondaryPrice via findViewById. The refactor left onCreate/setListeners still dereferencing those never-assigned fields, so BreadActivity crashed with a guaranteed NullPointerException on BottomNavigationView.setOnNavigationItemSelectedListener on every launch. These views were already non-functional before the crash: the bottom nav's menu was only ever wired up via a design-time-only tools:menu attribute (never inflated at runtime), and primaryPrice/secondaryPrice had no code left to populate their text. Rather than resurrect dead legacy UI, remove it outright: drop the associated fields, listeners, and R.id.bottomNav/menuBut/drawerLayout/primary_price/secondary_price views plus the now-unreferenced R.menu.bottom_nav_menu resource, and fix the layout refs that pointed at the removed views. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
kcw-grunt
approved these changes
Jul 22, 2026
kcw-grunt
left a comment
Collaborator
There was a problem hiding this comment.
Removes the ancient XML Android tab bar which was causing crashes
kcw-grunt
pushed a commit
that referenced
this pull request
Jul 27, 2026
Resolves conflicts to unblock PR #253: - app/build.gradle.kts: kept v4.10.6 (202506345) over main's older v4.10.4 - gradle/libs.versions.toml: kept the ReLinker dependency addition - app/src/main/res/layout/activity_bread.xml: kept this branch's removal of dead primary_price/secondary_price/menuBut views (fix(BreadActivity) #248 NPE fix) over main's pre-fix version of the layout - bw-gdlib submodule: kept 5c2faab0 (this branch), which is a direct descendant of main's c8ca278 pin (fast-forward, not a real divergence) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
📱 Description
This PR removes dead code from BreadActivity that was causing startup NPE issues. The bottom navigation bar, toolbar price buttons, and associated menu drawer logic have been removed as they are no longer used in the production Compose-based Send workflow. This cleanup eliminates unused UI components and their event listeners that were creating initialization problems.
Summary
BreadActivitycrashed with a guaranteed NullPointerException onBottomNavigationView.setOnNavigationItemSelectedListenerduringonCreate. TheinitializeViews()method that boundbottomNav,menuBut,drawerLayout,primaryPrice, andsecondaryPriceviafindViewByIdwas deleted in the "Techdebt/improve shop" refactor, but the code still dereferenced those fields.tools:menuattribute, never inflated at runtime; nothing populatedprimaryPrice/secondaryPricetext). Rather than resurrect dead legacy UI, this removes it outright.BreadActivity.java, theR.id.bottomNav/menuBut/drawerLayout/primary_price/secondary_priceviews inactivity_bread.xml, the now-unreferencedR.menu.bottom_nav_menuresource, and fixes the layout refs that pointed at the removed views.Supersedes #247 (closed — that PR was opened under kcw-grunt, which GitHub disallows requesting as a reviewer on its own PR).
Test plan
./gradlew :app:compileBrainwalletDebugJavaWithJavacpasses./gradlew :app:processBrainwalletDebugResourcespasses (no dangling resource refs)BreadActivityno longer crashes on openPlatform
🎯 Type of Change
📋 Changes
New Components Added
None
Modifications
Removals
📊 Statistics
🔗 Related Issues
🧪 Tests Status
📸 Screenshots/Videos
🎯 Reviewers
@kcw-grunt, @josikie
Draft Status: This PR is currently in draft mode and ready for review feedback.