-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Addressbook deletion update contacts list and groups #288
Conversation
Codecov Report
@@ Coverage Diff @@
## master #288 +/- ##
==========================================
- Coverage 14.82% 14.46% -0.36%
==========================================
Files 55 55
Lines 1221 1244 +23
==========================================
- Hits 181 180 -1
- Misses 1040 1064 +24
Continue to review full report at Codecov.
|
45ee59b
to
865389f
Compare
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
f6a573b
to
d94ba8c
Compare
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
97777e7
to
59ef2d6
Compare
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nitpicks. Changes look good and make sense otherwise!
@@ -92,6 +77,22 @@ angular.module('contactsApp') | |||
}); }); | |||
}); | |||
|
|||
AddressBookService.registerObserverCallback(function(ev) { | |||
$timeout(function() { $scope.$apply(function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest to wrap the line after the curly brace
@@ -235,4 +236,24 @@ angular.module('contactsApp') | |||
return $routeParams.uid; | |||
}; | |||
|
|||
ctrl.getFirstContact = function(contactId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the method's name is a bit misleading. From the name I would expect it to return a contact, but apparently it doesn't really return anything but change another state. For the sake of readability I'd suggest to rename this accordingly, maybe to something like selectFirstContact
? :)
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@ChristophWurst thanks! |
@irgendwie @Henni 🔔 😉 |
Code looks fine, but couldn't really test it as I couldn't figure out address books at all or they were really buggy (rifling through three contacts in three different address books, the address book field in the detail view doesn't update correctly to reflect the address book that contact is in for example). |
@daniellandau you mean the dropdown? Aside from that, anything else? |
Well, mainly that. I don't know if the problem is only with the dropdown, or if state is getting clobbered too. If I do a hard refresh and then immediately (without clicking through to different contacts) remove the address book of the currently selected contact, it gets removed from the list and focus moves to the nearest contact (yay, that's correct!). If on the other hand I click a bunch of contacts and the dropdowns get out of sync the story is different. For example I have two contacts, Now that I tested some more, it seems that the "select nearest" functionality works as intended, but |
@daniellandau I don't understand what you say by "the dropdown gets out of sync", could you do a screencast or shot of what you encounter please? |
@daniellandau this is coming from your lazy loading I think: |
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Yep, that was it, I'm not done yet, but pretty close. So we basically reduced from addressbookCount*20 requests to 20 requests! 🙌 TODO:
|
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Allclear! |
LGTM 👍 |
Fix #287
Testing: