This repository has been archived by the owner on May 6, 2024. It is now read-only.
iOS - Update web view cookie with in-app selected language #1333
Closed
Closed
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
d09b027
Update web view cookie with in-app selected language
mumer92 19a70cf
get preferred localizations from Bundle
mumer92 5bdfe91
make host name generic for cookie
mumer92 915a62b
extract root domain from host name
mumer92 3a7bec3
move language cookie to extension
mumer92 b85f53b
fix github comments, move wekwebview extension to seperate file, upda…
mumer92 9a97c4d
fix github comments
mumer92 86ab8b8
delete file
mumer92 49e0dd3
fix github comments
mumer92 5b2a243
Merge branch 'master' into umer/LEARNER-7498
mumer92 df7bec3
Update web view cookie with in-app selected language
mumer92 9a9176d
get preferred localizations from Bundle
mumer92 4906220
make host name generic for cookie
mumer92 8e9d4ea
extract root domain from host name
mumer92 ff1748f
move language cookie to extension
mumer92 6370b3b
fix github comments, move wekwebview extension to seperate file, upda…
mumer92 ba8bc26
fix github comments
mumer92 d680f2f
delete file
mumer92 ef87091
fix github comments
mumer92 fa7fdf6
Merge branch 'umer/LEARNER-7498' of github.com:edx/edx-app-ios into u…
mumer92 b35657f
update language cookie when app language is changed
mumer92 2de8811
check for device langue and cookie language
mumer92 faa823b
get language code
mumer92 4aa2d4b
cleanup
mumer92 bf6b1e3
add return statement
mumer92 ab260ca
set cache
mumer92 07e3ac6
compare cookie value if it exists
mumer92 afcf622
update cookie on language default case
mumer92 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
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
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.
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 can not read the language code from the existing cookie? My thinking is that there are two cases.
Cookie exists
If cookie exists then check if the cookie language value is not equal to the current app selected language then update the cookie with language otherwise do nothing.
Cookie Not exist
If cookie do not exist then create the new cookie with the app selected language the set it.
I don't think there is a need to use userDefaults whats your thoughts on it?
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.
Please have a look into updated logic.