immich
immich copied to clipboard
feat(mobile): update hidden status of a Person
Description
We now have the ability to hide a person from the mobile app (before only via the web app). To do so, you have to go on a person detail page (currently called PersonResultPage) and on the three dots you can select to Hide or Unhide a person.
We also have the possibility to see everyone on the PeopleCollectionPage (people with hidden) and people without hidden (default) by clicking on a toggle icon on the top right corner (see screenshot).
I've done some refactoring to make it works
- Move the Person class from the Interface class of a repository to it's own class (from IPersonApiRepository to domain/models/Person.dart)
- Remove unused page (allPlaces, AllPeoples) and unused widgets (explore_grid) - It would have been arduous to refactor them for something not being used.
- I passed a full Person object in PersonResultPage instead of adding only the isHidden from a person, so future feature will be able to use stuff from person (I will need the thumbnailPath for another PR for example) or if we want to display favorite, etc etc
How Has This Been Tested?
Go on the people collection page
- check if it shows all the people without the hidden
- click on the icon on the top right; check if hidden people are now showing
Go on the person page; click on the top three dots icon; select :
- Hide a person; check if it's correctly hidden
- Unhide a person; check if it's correctly unhidden
Screenshots (if appropriate)

Checklist:
- [x] I have performed a self-review of my own code
- [x] I have made corresponding changes to the documentation if applicable
- [x] I have no unrelated changes in the PR.
- [x] I have confirmed that any new dependencies are strictly necessary.
- [x] I have written tests for new code (if applicable)
- [x] I have followed naming conventions/patterns in the surrounding code
- [x] All code in
src/services/uses repositories implementations for database calls, filesystem operations, etc. - [x] All code in
src/repositories/is pretty basic/simple and does not have any immich specific logic (that belongs insrc/services/)