-
Notifications
You must be signed in to change notification settings - Fork 5
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
Deprecate startEngagementWithConfig method #835
Deprecate startEngagementWithConfig method #835
Conversation
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 would also update Testing App to pass RemoteConfiguration
using configure
31f1975
to
6635dff
Compare
features: Features = .all, | ||
sceneProvider: SceneProvider? = nil | ||
) throws { | ||
try startEngagement( |
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.
Do we need to store theme there?
self.theme = theme
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.
Yes because if this is removed, the warning comes on and says this method is infinite recursion
I would also ask you to add unit test for applying RemoteConfiguration over Theme (few values would be enough). Just to ensure it's applied. |
/// Deprectated, use ``Glia.startEngagement(engagementKind:in queueIds:features:sceneProvider:)`` instead. | ||
/// Use ``configure(with configuration:uiConfig:assetsBuilder:completion:)`` to pass in ``RemoteConfiguration``. | ||
@available(*, deprecated, message: """ | ||
Deprectated, use ``Glia.startEngagement(engagementKind:in queueIds:features:sceneProvider:)`` instead. |
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.
Deprecated
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.
fixed 768c529
) | ||
} | ||
|
||
/// Deprectated, use ``Glia.startEngagement(engagementKind:in queueIds:features:sceneProvider:)`` instead. |
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.
Same, Deprecated
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.
fixed 768c529
/// Deprectated, use ``Glia.startEngagement(engagementKind:in queueIds:features:sceneProvider:)`` instead. | ||
/// Use ``configure(with configuration:uiConfig:theme:assetsBuilder:completion:)`` to pass in ``RemoteConfiguration``. | ||
@available(*, deprecated, message: """ | ||
Deprectated, use ``Glia.startEngagement(engagementKind:in queueIds:features:sceneProvider:)`` instead. |
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.
Also here
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.
fixed 768c529
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.
Left comment about Theme recreation.
try Glia.sharedInstance.configure(with: configuration) { [weak self] result in | ||
try Glia.sharedInstance.configure( | ||
with: configuration, | ||
theme: Theme() |
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.
Why does theme have to reconstructed here every time 'authenticate' is tapped?
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.
Because if I remove this parameter, Xcode picks the old configure method instead and deprecation warning appears.
!squash |
e424849
to
c7c4b99
Compare
This PR deprecates startEngagementWithConfig method and moves it to deprecated methods file MOB-2817
c7c4b99
to
c4f297e
Compare
Jira issue:
https://glia.atlassian.net/browse/MOB-2817
What was solved?
This PR deprecates startEngagementWithConfig method and moves it to the deprecated methods file. This PR also replaces configure method with new one that takes Theme as a parameter. In addition, startEngagement method is deprecated and replaced with a new one that doesn't have Theme as parameter.
Release notes:
Additional info:
Screenshots: