-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat: Add atSign to AtSignLoggers' names when feasible. Some code simplification and refactoring #870
Merged
Conversation
This file contains 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
…essages are clearer. For example in AtClientImpl instead of `final _logger = AtSignLogger('AtClientImpl');` we declare `late final AtSignLogger _logger;` and later, in constructor, `_logger = AtSignLogger('AtClientImpl ($_atSign)');` refactor: Changed names of internal variables in AtClientImpl from "currentAtSign" to "atSign" feat: Added setters and getters to AtClient spec for notification and sync services refactor: Reduced usage of AtClientManager.getInstance()
…ign` to prevent uninitialized field error when trying to set previousAtSign so we can later log that we have switched from previousAtSign to _atSign
fix: Moved one-time logic from within the while loop to before it, in `SyncServiceImpl._informSyncProgress`
# Conflicts: # packages/at_client/lib/src/client/at_client_impl.dart # packages/at_client/lib/src/client/at_client_spec.dart # packages/at_client/lib/src/decryption_service/shared_key_decryption.dart # packages/at_client/lib/src/manager/at_client_manager.dart # packages/at_client/lib/src/service/encryption_service.dart # packages/at_client/lib/src/service/notification_service_impl.dart # packages/at_client/test/decryption_service_test.dart
…entManager.notificationService now that both of them are available via the AtClient (AtClient.syncService and AtClient.notificationService). Removed the AtClientManager.notificationService and AtClientManager.syncService instance variables
gkc
changed the title
feat: Add atSign to AtSignLoggers' names when relevant, so that log messages are clearer
feat: Add atSign to AtSignLoggers' names when feasible. Some code simplification and refactoring
Jan 10, 2023
murali-shris
approved these changes
Jan 11, 2023
sitaram-kalluri
approved these changes
Jan 11, 2023
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.
Closes #869
- What I did
final _logger = AtSignLogger('AtClientImpl');
to instead declaringlate final AtSignLogger _logger;
and later, in constructor,_logger = AtSignLogger('AtClientImpl ($_atSign)');
SyncServiceImpl._informSyncProgress
notificationService
andsyncService
. AtClientManager.setCurrentAtSign now sets those values on the AtClientsyncService
andnotificationService
instance variables now that both of them are available via the AtClientnotificationService
andsyncService
instance variables and replaced with getters which will now return_currentAtClient!.syncService
and_currentAtClient!.notificationService
respectively- How to verify it
Tests should pass
- Description for the changelog
feat: Add atSign to AtSignLoggers' names when relevant, so that log messages are clearer
feat: Made notificationService and syncService available via AtClient to enable cleaner simpler code elsewhere