Skip to content

Commit

Permalink
chore: deletes useless comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kyungeunni committed Feb 7, 2023
1 parent fc82546 commit 0ea4ca8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
6 changes: 2 additions & 4 deletions electron/api/recordJourney.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import { BrowserWindow, ipcMain, IpcMainInvokeEvent } from 'electron';
import type { BrowserContext } from 'playwright-core';

import path from 'path';
import { EventEmitter, once } from 'events';
import { existsSync } from 'fs';
import { BrowserWindow, ipcMain, IpcMainInvokeEvent } from 'electron';
import type { BrowserContext } from 'playwright-core';
import logger from 'electron-log';
import { ActionInContext } from '../../common/types';
import { BrowserManager } from '../browserManager';
Expand All @@ -48,7 +47,6 @@ export async function recordJourney(

// Listen to actions from Playwright recording session
const actionsHandler = (actions: ActionInContext[]) => {
// ipcMain.callRenderer(browserWindow, 'change', { actions });
browserWindow.webContents.send('change', actions);
};
actionListener.on('actions', actionsHandler);
Expand Down
1 change: 0 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ export default function App() {
return generateMergedIR(prevSteps, nextSteps);
});
};
// ipc.answerMain('change', listener);
const removeListener = electronAPI.onActionGenerated(listener);
return removeListener;
}, [electronAPI, setSteps]);
Expand Down
5 changes: 0 additions & 5 deletions src/hooks/useRecordingContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,9 @@ export function useRecordingContext(
} else if (recordingStatus === RecordingStatus.Recording) {
setRecordingStatus(RecordingStatus.NotRecording);
// Stop browser process
// ipc.send('stop');
electronAPI.stopRecording();
} else {
setRecordingStatus(RecordingStatus.Recording);
// await ipc.callMain('record-journey', { url });
await electronAPI.recordJourney(url);
setRecordingStatus(RecordingStatus.NotRecording);
}
Expand All @@ -67,7 +65,6 @@ export function useRecordingContext(
// Depends on the result's context, because when we overwrite
// a previous journey we need to discard its result status
setResult(undefined);
// await ipc.callMain('record-journey', { url });
await electronAPI.recordJourney(url);
setRecordingStatus(RecordingStatus.NotRecording);
}
Expand All @@ -77,10 +74,8 @@ export function useRecordingContext(
if (recordingStatus === RecordingStatus.NotRecording) return;
if (recordingStatus !== RecordingStatus.Paused) {
setRecordingStatus(RecordingStatus.Paused);
// await ipc.callMain('set-mode', 'none');
await electronAPI.pauseRecording();
} else {
// await ipc.callMain('set-mode', 'recording');
await electronAPI.resumeRecording();
setRecordingStatus(RecordingStatus.Recording);
}
Expand Down

0 comments on commit 0ea4ca8

Please sign in to comment.