Closed RyanTG closed 3 months ago
Will get a fix in for that. From the perspective of the API, would it be difficult to remove the location data from recent activity?
On the website, it seems like when a location is deleted, we would need some sort of function that looks up the user_submissions that contain that location_id and then clears out the location_id field. We don't have anything like that right now. But if you think that's the best solution, we could look into it.
Oh no, it's enough of an edge-case, not necessary. We just can't offer the ability to the user to remove the item from the activity feed in this case... again edge-case, so no worries.
Does this seem ok? On the attempt to navigate to the location details screen, if the location is gone, pop the alert and go back. From a previously saved search, we had to fetch the location details before navigating to the location to begin with (why we don't get the flash of initially navigating to location details). We could fetch the location details here as well to avoid this glitchy behavior, but the trade-off would be making double requests for every navigation to a location from the activity feed. With how much this is an edge case, I figured we'd be fine with this, but happy to update depending on how you feel.
Branch if you'd like to play with it.
https://github.com/pinballmap/pbm-react/assets/7720282/af32ba2e-ce4f-4dd7-94bd-ef2bc7321e69
I'm definitely ok with that extra movement, as it is. It kind of shows "look, we tried, but it's gone!"
Sometimes locations have been deleted, but are listed in activity in Recent Activity. Clicking recent activity items is supposed to open that location screen. But if the location has been deleted, the screen just spins.
One current example is to search for Omaha, NE. Then go to recent activity and scroll down until you see activity for Billy Frogg’s Grill & Bar. That’s a deleted location example.