-
Notifications
You must be signed in to change notification settings - Fork 350
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
refactor(llc, core, ui): update X-Stream-Client header for enhanced client identification #2131
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2131 +/- ##
==========================================
- Coverage 60.49% 60.47% -0.02%
==========================================
Files 382 384 +2
Lines 23782 23827 +45
==========================================
+ Hits 14386 14410 +24
- Misses 9396 9417 +21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
SystemEnvironmentManager({ | ||
SystemEnvironment environment = const SystemEnvironment( | ||
sdkName: 'stream-chat', | ||
sdkIdentifier: 'dart', | ||
sdkVersion: PACKAGE_VERSION, | ||
), | ||
}) : _environment = environment; |
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.
We don't want to have people change these values. What do you think of creating 2 constructors like this? (simplified)
SystemEnvironmentManager({ | |
SystemEnvironment environment = const SystemEnvironment( | |
sdkName: 'stream-chat', | |
sdkIdentifier: 'dart', | |
sdkVersion: PACKAGE_VERSION, | |
), | |
}) : _environment = environment; | |
SystemEnvironmentManager.llc() : sdkIdentifier = 'dart'; | |
SystemEnvironmentManager.core() : sdkIdentifier = 'core'; | |
SystemEnvironmentManager.flutter() : sdkIdentifier = 'flutter'; |
For Core and Flutter I would add an AppConfig
parameter, which only contains the app specific settings, such as appName and appVersion. We can make more variables required there.
String? deviceModel; | ||
|
||
try { | ||
switch (CurrentPlatform.type) { |
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.
Following my other comment, I would move this to an AppConfig
class which can be used both by core and flutter.
Resolves: FLU-31
Description of the pull request
Aligned the
X-Stream-Client
header with the other SDK's based on the notion doc.