Handle duplicated contacts in favorite List#983
Merged
AlaaElattar merged 5 commits intodevelopmentfrom Apr 24, 2025
Merged
Conversation
zaelgohary
reviewed
Apr 10, 2025
Comment on lines
40
to
57
| _loadFavouriteContacts() async { | ||
| myPkidContacts = await getPkidContacts(); | ||
| myPkidContacts = | ||
| myPkidContacts.where((c) => c.type == widget.chainType).toList(); | ||
| final allContacts = await getPkidContacts(); | ||
|
|
||
| final seen = <String>{}; | ||
| final filtered = <PkidContact>[]; | ||
|
|
||
| for (final c in allContacts) { | ||
| if (c.type != widget.chainType) continue; | ||
|
|
||
| final key = '${c.address}_${c.type}'; | ||
| if (seen.add(key)) { | ||
| filtered.add(c); | ||
| } | ||
| } | ||
|
|
||
| myPkidContacts = filtered; | ||
| setState(() {}); | ||
| } |
Contributor
There was a problem hiding this comment.
I don't think this is necessary. Should be filtered once this is merged.
AhmedHanafy725
requested changes
Apr 13, 2025
Contributor
AhmedHanafy725
left a comment
There was a problem hiding this comment.
The current solution doesn't fix the issue
1 task
Contributor
Author
|
Contributor
Author
|
|
||
| final isDuplicate = allContacts.any((c) => c.address == contactAddress); | ||
|
|
||
| if (isDuplicate) { |
Contributor
There was a problem hiding this comment.
What if we are in the edit flow, and the address is not changed? it will be misleading
Contributor
Author
There was a problem hiding this comment.
should be fixed.
AhmedHanafy725
approved these changes
Apr 23, 2025
AlaaElattar
added a commit
that referenced
this pull request
Apr 28, 2025
* handle duplicated contacts * undo latest solution * fix adding duplicated wallet in fav list * Fixed the duplicated contacts issue * update condition when editing address
AlaaElattar
added a commit
that referenced
this pull request
Apr 30, 2025
* WIP: adding notifications pgk * fix ios issue and show notification with offline nodes * remove unused import && undo changes in podfile.lock * WIP: adding permissions for android * WIP: downgrade background_fetch * WIP: downgrade background_fetch * clear cached background_fetch * specify ndk version * undo nkd version setup * WIP: add debug logs * WIP: debug background_fetch version * update pubspec.lock * update build.gradle * WIP: remove gradle cache * fix command * WIP: Update build.gradle * WIP: fix space * undo latest commit * add maven url in build.gradle * Add close button for confirmation dialog (#976) * add close button for confirmation dialog * add cancel btn in bridge also * Handle non-loading for delete wallet (#973) * add timeout 1 min for deleting wallet * update error messages * Prevent PIN Entry Attempts During 30 Second Lockout Period (#989) * keep user locked after the many attempts * update pin screen to include live counter * Fix transactions paginations (#992) * Fix transactions pagination, use pagingToken instead of offset * Edit listTransactions to return stream instead of list * Update stellar client ref * handle duplicated daily (#986) * Update the packages version for background_fetch & flutter_local_notifications * Request to enable the notification service on android * Revert the changes in the wrong manifest file * Update the gradle repos * Update build gradle dependencies * Update the manifest permissions * only show notifications for nodes down last 2 days && group notifications * remove unused import * update checking nodes for last 7 days * Update app/lib/services/background_service.dart Co-authored-by: AhmedHanafy725 <41957921+AhmedHanafy725@users.noreply.github.com> * apply pr comments && apply the exponential notification * handle notification grouping * handled tapping on notification * Hide show phrase (#995) * Handle duplicated contacts in favorite List (#983) * handle duplicated contacts * undo latest solution * fix adding duplicated wallet in fav list * Fixed the duplicated contacts issue * update condition when editing address * Fix auth timeout routing (#1000) * Creating app lifecycle observer and use it in main.dart w navigator key, Replace Navigator routes w navigator key * Remove unused code * Revert navigator key changes from screens * Revert main screen changes * fix ios issue and show notification with offline nodes * update pubspec.lock * fix workflow * fix equation && workflow * undo the equation * fixed time conversion --------- Co-authored-by: Zainab Elgohary <40770501+zaelgohary@users.noreply.github.com> Co-authored-by: AhmedHanafy725 <hanafya@incubaid.com> Co-authored-by: AhmedHanafy725 <41957921+AhmedHanafy725@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Changes
Related Issues
Tested Scenarios