HabitRPG / habitica-ios

Native iOS app for Habitica
GNU General Public License v3.0
712 stars 235 forks source link

Pet detail view incorrect when equipped #1282

Closed toonswyzen closed 1 year ago

toonswyzen commented 1 year ago

Describe the bug If the user has a pet equipped, the pet detail view incorrectly displays the "Unequip" action. The action remains "Equip" while the pet is already equipped.

To Reproduce Steps to reproduce the behavior:

  1. Open the app
  2. Navigate to Inventory -> Pets & Mounts page via the hamburger menu
  3. Select a pet to go to the details page of that pet
  4. Press the pet to show the Equip button -> press the button to equip the pet
  5. Press the pet again to show the Unequip button -> The button displays "Equip" while the pet is already equipped.

Expected behavior If the pet is already equipped, the button should display "Unequip" (similar to mounts)

Screenshots Screenshot

Smartphone (please complete the following information):

toonswyzen commented 1 year ago

(accidentally closed the issue)

The issue seems to reside in: https://github.com/HabitRPG/habitica-ios/blob/e1e0fed05e164cde9e3d8e674328da2effdff587/HabitRPG/UI/Inventory/Stable/PetDetailViewController.swift#L60

The app does not check if the pet is already equipped.

saraolson commented 1 year ago

Thanks for your report! Hopefully we can also get the little teal star marker on equipped pets soon to improve this experience even more.