Deactivate Cards toggle when card dismissed via swipe-down#71
Conversation
…smiss card Agent-Logs-Url: https://github.com/ProLoser/funcheapmap/sessions/fd9bf64e-94de-41fb-902c-73a19cd9e723 Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
| hideEventCard(); | ||
| cardModeEnabled = false; | ||
| localStorage.setItem('cardMode', false); | ||
| updateCardToggleButton(); |
There was a problem hiding this comment.
@copilot Seems like updateCardToggleButton should do most of this stuff (maybe taking an argument) instead of being called after mutations are made to reflect the changes
There was a problem hiding this comment.
Done in a970a9e. updateCardToggleButton now accepts an optional enabled argument — when provided it sets cardModeEnabled and persists to localStorage before updating the button. Both the swipe-down path and the toggle-click handler now just call updateCardToggleButton(value) with no external mutations.
Agent-Logs-Url: https://github.com/ProLoser/funcheapmap/sessions/92ff3ff7-a708-4317-856d-d3fa1407aedf Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
|
@copilot updateCardToggleButton should call show/hide and probably should never be called without an argument |
…ment Agent-Logs-Url: https://github.com/ProLoser/funcheapmap/sessions/dbeb9231-760a-439b-870b-d2d910d3254a Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
Done in bfdc58f. |
|
updateCardToggleButtonto accept optionalenabledargument and internalizecardModeEnabledmutation +localStoragepersistenceshowEventCard/hideEventCardcalls insideupdateCardToggleButton; remove them from callersupdateCardToggleButtonnow always requires an argument (init call passescardModeEnabledexplicitly)