소스 검색

analytics: keyboard shortcut

master
Radium Zheng 7 년 전
부모
커밋
8ebf2b7e47
1개의 변경된 파일7개의 추가작업 그리고 9개의 파일을 삭제
  1. 7
    9
      react/features/local-recording/middleware.js

+ 7
- 9
react/features/local-recording/middleware.js 파일 보기

1
 /* @flow */
1
 /* @flow */
2
 
2
 
3
+import { createShortcutEvent, sendAnalytics } from '../analytics';
3
 import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../base/app';
4
 import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../base/app';
4
 import { CONFERENCE_JOINED } from '../base/conference';
5
 import { CONFERENCE_JOINED } from '../base/conference';
5
 import { toggleDialog } from '../base/dialog';
6
 import { toggleDialog } from '../base/dialog';
36
             }
37
             }
37
         };
38
         };
38
 
39
 
39
-        recordingController.onWarning = function(messageKey, messageParams) {
40
+        recordingController.onWarning = (messageKey, messageParams) => {
40
             dispatch(showNotification({
41
             dispatch(showNotification({
41
                 title: i18next.t('localRecording.localRecording'),
42
                 title: i18next.t('localRecording.localRecording'),
42
                 description: i18next.t(messageKey, messageParams)
43
                 description: i18next.t(messageKey, messageParams)
43
             }, 10000));
44
             }, 10000));
44
         };
45
         };
45
 
46
 
46
-        recordingController.onNotify = function(messageKey, messageParams) {
47
+        recordingController.onNotify = (messageKey, messageParams) => {
47
             dispatch(showNotification({
48
             dispatch(showNotification({
48
                 title: i18next.t('localRecording.localRecording'),
49
                 title: i18next.t('localRecording.localRecording'),
49
                 description: i18next.t(messageKey, messageParams)
50
                 description: i18next.t(messageKey, messageParams)
50
             }, 10000));
51
             }, 10000));
51
         };
52
         };
52
 
53
 
53
-        // register shortcut
54
-        APP.keyboardshortcut.registerShortcut(
55
-            'L',
56
-            null,
57
-            () => dispatch(toggleDialog(LocalRecordingInfoDialog)),
58
-            'keyboardShortcuts.localRecording'
59
-        );
54
+        APP.keyboardshortcut.registerShortcut('L', null, () => {
55
+            sendAnalytics(createShortcutEvent('local.recording'));
56
+            dispatch(toggleDialog(LocalRecordingInfoDialog));
57
+        }, 'keyboardShortcuts.localRecording');
60
         break;
58
         break;
61
     case APP_WILL_UNMOUNT:
59
     case APP_WILL_UNMOUNT:
62
         recordingController.onStateChanged = null;
60
         recordingController.onStateChanged = null;

Loading…
취소
저장