necouchman commented on code in PR #1135:
URL: https://github.com/apache/guacamole-client/pull/1135#discussion_r2604683744
##########
guacamole/src/main/frontend/src/app/settings/services/preferenceService.js:
##########
@@ -168,8 +177,16 @@ angular.module('settings').provider('preferenceService',
['$injector',
// Get stored preferences from localStorage
var storedPreferences =
localStorageServiceProvider.getItem(GUAC_PREFERENCES_STORAGE_KEY);
- if (storedPreferences)
+ if (storedPreferences) {
+ delete storedPreferences.inputMethod;
angular.extend(provider.preferences, storedPreferences);
+ }
+
+ // Load inputMethod from cookie - ONLY READ, DON'T WRITE
+ var cookieInputMethod = getCookie("GUAC_INPUT_METHOD");
+ if (cookieInputMethod) {
+ provider.preferences.inputMethod = cookieInputMethod;
+ }
Review Comment:
This block still has extra indentation - the `if (storedPreferences)` line
should line up with the `var storedPreferences` line above.
##########
guacamole/src/main/frontend/src/app/settings/services/preferenceService.js:
##########
@@ -77,7 +77,13 @@ angular.module('settings').provider('preferenceService',
['$injector',
TEXT : 'text'
};
-
+ /*
+ * Cookie helpers
+ */
Review Comment:
This is still off - please see nearby function documentation for examples:
```
/**
* This is a function that does something, returning something when done.
*
* @param param1
* A parameter that does something.
*
* @return
* This function returns something.
*/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]