Skip to content

Commit

Permalink
Enable memory only keys when guides login
Browse files Browse the repository at this point in the history
  • Loading branch information
tgolen committed Aug 14, 2023
1 parent b09913c commit 0a21797
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/pages/signin/LoginForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import * as PolicyUtils from '../../libs/PolicyUtils';
import Log from '../../libs/Log';
import withNavigationFocus, {withNavigationFocusPropTypes} from '../../components/withNavigationFocus';
import usePrevious from '../../hooks/usePrevious';
import * as MemoryOnlyKeys from '../../libs/actions/MemoryOnlyKeys/MemoryOnlyKeys';

const propTypes = {
/** Should we dismiss the keyboard when transitioning away from the page? */
Expand Down Expand Up @@ -71,13 +72,6 @@ const defaultProps = {
blurOnSubmit: false,
};

/**
* Enables experimental "memory only keys" mode in Onyx
*/
const setEnableMemoryOnlyKeys = () => {
window.enableMemoryOnlyKeys();
};

function LoginForm(props) {
const input = useRef();
const [login, setLogin] = useState('');
Expand Down Expand Up @@ -142,7 +136,7 @@ function LoginForm(props) {
// If the user has entered a guide email, then we are going to enable an experimental Onyx mode to help with performance
if (PolicyUtils.isExpensifyGuideTeam(loginTrim)) {
Log.info('Detected guide email in login field, setting memory only keys.');
setEnableMemoryOnlyKeys();
MemoryOnlyKeys.enable();
}

setFormError(null);
Expand Down

0 comments on commit 0a21797

Please sign in to comment.