Skip to content

feat: implement pinned friends functionality in ConnectViewModel and UI#61

Merged
dk-a-dev merged 4 commits intoGDGVIT:v3from
JothishKamal:v3
Aug 7, 2025
Merged

feat: implement pinned friends functionality in ConnectViewModel and UI#61
dk-a-dev merged 4 commits intoGDGVIT:v3from
JothishKamal:v3

Conversation

@JothishKamal
Copy link
Collaborator

Pull Request Type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Purpose

  • WHAT is this PR for?
    This PR introduces a "pinned friends" feature on the Connect screen, enabling users to pin up to three friends for easier access.

Approach

  • HOW does this change fulfill the purpose?
    • Added pinnedFriends state in ConnectViewModel backed by SharedPreferences.
    • Methods implemented to pin, unpin, check pin status, and initialize pinned friends.
    • UI updated to show pinned friends at the top of the list, maintaining their order.
    • FriendCard component updated with a pin/unpin icon, with a toast shown when exceeding the pin limit.
    • State management and imports added across components to support the feature.

Does this PR introduce any new bug?

  • Yes
  • No
  • Maybe

Issue Reference: (No issue link provided)

Other information

  • Toast feedback is included when a user attempts to pin more than 3 friends.
  • The feature ensures pinned friends are displayed consistently across app sessions using persistent storage.

Did you learn something new?

  • Learned to integrate UI state with persistent storage using SharedPreferences.
  • Implemented logic to handle limited-size pinned lists with feedback in UI.

@JothishKamal JothishKamal requested a review from iamyajat as a code owner August 7, 2025 08:06
@dk-a-dev
Copy link
Contributor

dk-a-dev commented Aug 7, 2025

Attach screen shot of ui

@JothishKamal
Copy link
Collaborator Author

Attach screen shot of ui

image

@dk-a-dev dk-a-dev merged commit b19ce01 into GDGVIT:v3 Aug 7, 2025
2 checks passed
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.

2 participants

Comments