refactor(home): single string-based avatar path; profile delegate goes parameterless - #857
refactor(home): single string-based avatar path; profile delegate goes parameterless#857QuantumExplorer wants to merge 1 commit into
Conversation
…s parameterless DWDPAvatarView's typed setter and configureAsCurrentUser were copy-paste twins; both now delegate to one configureWithUsername:avatarURLString: core (percent-encoding applied inside, same letter fallback). The typed blockchainIdentity property survives only for the DashSync-backed invitation screens, marked TODO(invitations-sdk-rebuild). HomeViewDelegate's homeView(_:didUpdateProfile:unreadNotifications:) carried a DSBlockchainIdentity into HomeView and duplicated the visibility + notification-bell logic that refreshIdentityAvatar() already owns. The delegate is now a parameterless homeViewDidUpdateProfile() funneling into refreshIdentityAvatar(), removing the last DSBlockchainIdentity reference from HomeView.swift. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Closing as superseded: the DashSync unlink has since completed on develop — none of the files this PR touches reference DSBlockchainIdentity anymore, and DWDPAvatarView.h/.m (where most of this diff lives) have been deleted entirely. The HomeView delegate was also reshaped independently (homeView(_:didUpdateProfileWithUnreadNotifications:)). Nothing left to rebase. |
What
Shrinks the Home surface's
DSBlockchainIdentityfootprint to just the deliberate DashSync-vs-SDK discriminators, ahead of the invitations SDK rebuild:DWDPAvatarView:setBlockchainIdentity:andconfigureAsCurrentUserwere copy-paste twins. Both now delegate to a singleconfigureWithUsername:avatarURLString:core (percent-encoding applied inside, identical letter-fallback and SDWebImage behavior). The typedblockchainIdentityproperty is kept only for the DashSync-backed invitation screens — markedTODO(invitations-sdk-rebuild)so it's deleted with that rebuild; no invitation files are touched.HomeViewDelegate:homeView(_:didUpdateProfile: DSBlockchainIdentity?, unreadNotifications:)became parameterlesshomeViewDidUpdateProfile(). The old callback duplicated the visibility + notification-bell logicrefreshIdentityAvatar()already owns; it now just funnels there.HomeView.setIdentity()collapses from 17 lines to 2, andHomeView.swiftno longer referencesDSBlockchainIdentityat all.Net −42 lines. Deliberately left alone:
updateAvatarContent(identity:)and theprofileAction()editor branch (real DashSync-vs-SDK path discriminators), and everything underInvites/.Behavior notes
setIdentity()skipped pushing profile data unless registration was.done/completed;refreshIdentityAvatar()reads the central state unconditionally but visibility still gates onhasIdentity, so the only observable difference is on the deprecated DashSync invitation arm mid-registration (dev-only).Verification
../platformis mid-transition (checked out onv4.1-dev, which is missing 4 of the 5 APIs the app's pin branch carries), so no dashwallet build compiles right now — failure is entirely in the SwiftDashSDK package, upstream of the app target. Once the pin branch is reconciled andDashSDKFFI.xcframeworkrebuilt, this needs onedashpayarm64-sim build + a smoke of the home avatar (letter + profile image for an SDK-registered identity) before merge.🤖 Generated with Claude Code