Skip to content

Commit

Permalink
added comment to the change
Browse files Browse the repository at this point in the history
  • Loading branch information
Banji Jolaoso committed Jul 29, 2022
1 parent cc85d73 commit 176863b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,9 @@ JSONObject getHostedUIJSON(final AWSConfiguration awsConfig) {
Log.w(TAG,
"Failed to parse HostedUI settings from store", e);
}

// Since there is no file watcher to keep track of when config file changes, this logic is intended to always check if the config file is different from mstore cache and updates the later accordingly.
// If config file cannot be loaded, the mstore data still prevails.
if (hostedUIJSONFromJSON != null && (hostedUIJSON == null || hostedUIJSON.toString() != hostedUIJSONFromJSON.toString())) {
hostedUIJSON = new JSONObject(hostedUIJSONFromJSON.toString());
mStore.set(HOSTED_UI_KEY, hostedUIJSON.toString());
Expand Down

0 comments on commit 176863b

Please sign in to comment.