Skip to content

Implemented contact details everywhere#336

Merged
naveensingh merged 6 commits into
FossifyOrg:masterfrom
miapuffia:implement-contact-details-everywhere
Mar 25, 2025
Merged

Implemented contact details everywhere#336
naveensingh merged 6 commits into
FossifyOrg:masterfrom
miapuffia:implement-contact-details-everywhere

Conversation

@miapuffia
Copy link
Copy Markdown
Contributor

What is it?

  • Bugfix
  • Feature
  • Codebase improvement

Description of the changes in your PR

  • Open contact details on contact image click
  • Applies to contact page, favorites page, call history page, and dialer page

Fixes the following issue(s)

Acknowledgement

@miapuffia
Copy link
Copy Markdown
Contributor Author

Current issues:

  • Tapping the profile icon bypasses the click listener of the recycler view. As such, it doesn't cause animations and you can't long tap on it to enter selection mode.
  • In the call history page, tapping the profile icon of a non-contact will start a call like previous behavior. I know there's a way to open contact details for non-contacts (my default phone app does this) but I couldn't find the intent to use.

@Aga-C
Copy link
Copy Markdown
Contributor

Aga-C commented Mar 24, 2025

Applies to contact page

It was already working fine on contacts tab, without the problems you've described. You shouldn't overwrite it there.

@miapuffia
Copy link
Copy Markdown
Contributor Author

Applies to contact page

It was already working fine on contacts tab, without the problems you've described. You shouldn't overwrite it there.

The reason I added that to the contacts page is because the same adapter is used for the dialpad. If dialpad gets its own adapter that wouldn't be necessary (my other PR) does this)

@Aga-C
Copy link
Copy Markdown
Contributor

Aga-C commented Mar 24, 2025

If dialpad gets its own adapter that wouldn't be necessary

I bet that even now it's not necessary. The same adapter is used by Dialpad and Favorites, yet they have a different item click action.

@miapuffia
Copy link
Copy Markdown
Contributor Author

miapuffia commented Mar 24, 2025

I don't handle the profile icon click in that item click action function as there's no parameter to indicate what specific part was clicked. The only way I could tell what was clicked is to either handle it in the adapter or rework MyRecyclerViewAdapter to provide on onclick action that specifies what view was clicked.

I could add a parameter to the contact adapter to enable this functionality or specify a profile click action that's null by default.

@naveensingh
Copy link
Copy Markdown
Member

naveensingh commented Mar 24, 2025

Tapping the profile icon bypasses the click listener of the recycler view. As such, it doesn't cause animations and you can't long tap on it to enter selection mode.

It'll require a bit more change but you should be able to solve this by setting a long click listener on the image view and then call viewLongClicked() from the parent view holder (see parent adapter class).

I could add a parameter to the contact adapter to enable this functionality or specify a profile click action that's null by default.

That should do it, a lambda named imageClicked or something:

  • When it is set to null (default), a listener should not be set on the image view.
  • The click should be handled by the fragment/activity using the adapter and not the adapter itself.

@miapuffia
Copy link
Copy Markdown
Contributor Author

Got those changes in, removing draft status

@miapuffia miapuffia marked this pull request as ready for review March 24, 2025 09:52
@Aga-C
Copy link
Copy Markdown
Contributor

Aga-C commented Mar 24, 2025

As such, it doesn't cause animations

Have you tried to also fix this?

@miapuffia
Copy link
Copy Markdown
Contributor Author

Animations are fixed in the latest commit

@naveensingh naveensingh self-assigned this Mar 24, 2025
@naveensingh
Copy link
Copy Markdown
Member

naveensingh commented Mar 24, 2025

As such, it doesn't cause animations

Exactly which animation are we talking about here? Do you mean the ripple effect that is displayed over the whole list item?

If yes, then that is okay. It is rather misleading to show a ripple over the whole list when only the icon is being clicked. The icon now serves as a distinct button so I think you can safely drop commit 4b3101a. A circular ripple effect over the icon itself would be nice but it's really not important.

@miapuffia
Copy link
Copy Markdown
Contributor Author

I went ahead and switched to a ripple animation on the icon itself. That was the only animation missing AFAIK

@naveensingh
Copy link
Copy Markdown
Member

naveensingh commented Mar 24, 2025

I went ahead and switched to a ripple animation on the icon itself.

About that, found two issues:

  • On the contacts tab, the ripple shouldn't be displayed unconditionally, right now tapping the list item also triggers the icon ripple. As in, the ripple should only be added when profileIconClick is not null.
  • On the call history tab, the ripple is square shaped, it should be circular like in other places.

@miapuffia
Copy link
Copy Markdown
Contributor Author

Good catch, fixed now

@naveensingh
Copy link
Copy Markdown
Member

Looks good now, thanks!

@naveensingh naveensingh merged commit baa1d68 into FossifyOrg:master Mar 25, 2025
@miapuffia miapuffia deleted the implement-contact-details-everywhere branch March 26, 2025 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tapping profile pic should show contact details.

3 participants