Skip to content

Commit

Permalink
Fix order of Metro hotkey console messages (#42896)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #42896

Changelog:
[General][Fixed] Fix order of Metro hotkey console messages

# Existing

Key handler is printing messages to the console _after_ it has been processed, this causes error messages to appear before the `info` message.

# In this PR

The `info` messages are logged before the event is processed.

Reviewed By: GijsWeterings

Differential Revision: D53479732

fbshipit-source-id: 25af47450662de4eb03d0dfd52af5af014ef3e49
  • Loading branch information
EdmondChuiHW authored and facebook-github-bot committed Feb 7, 2024
1 parent c1b8f37 commit 635732a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ export default function attachKeyHandlers({
const onPress = async (key: string) => {
switch (key) {
case 'r':
messageSocket.broadcast('reload', null);
logger.info('Reloading connected app(s)...');
messageSocket.broadcast('reload', null);
break;
case 'd':
messageSocket.broadcast('devMenu', null);
logger.info('Opening Dev Menu...');
messageSocket.broadcast('devMenu', null);
break;
case 'i':
logger.info('Opening app on iOS...');
Expand Down

0 comments on commit 635732a

Please sign in to comment.