|
@@ -11,6 +11,7 @@ import {
|
11
|
11
|
getDropboxData,
|
12
|
12
|
isEnabled as isDropboxEnabled
|
13
|
13
|
} from '../../../dropbox';
|
|
14
|
+import { showErrorNotification } from '../../../notifications';
|
14
|
15
|
import { toggleRequestingSubtitles } from '../../../subtitles';
|
15
|
16
|
import { setSelectedRecordingService } from '../../actions';
|
16
|
17
|
import { RECORDING_TYPES } from '../../constants';
|
|
@@ -254,19 +255,24 @@ class AbstractStartRecordingDialog extends Component<Props, State> {
|
254
|
255
|
let appData;
|
255
|
256
|
const attributes = {};
|
256
|
257
|
|
257
|
|
- if (_isDropboxEnabled
|
258
|
|
- && _token
|
259
|
|
- && this.state.selectedRecordingService
|
260
|
|
- === RECORDING_TYPES.DROPBOX) {
|
261
|
|
- appData = JSON.stringify({
|
262
|
|
- 'file_recording_metadata': {
|
263
|
|
- 'upload_credentials': {
|
264
|
|
- 'service_name': RECORDING_TYPES.DROPBOX,
|
265
|
|
- 'token': _token
|
|
258
|
+ if (_isDropboxEnabled && this.state.selectedRecordingService === RECORDING_TYPES.DROPBOX) {
|
|
259
|
+ if (_token) {
|
|
260
|
+ appData = JSON.stringify({
|
|
261
|
+ 'file_recording_metadata': {
|
|
262
|
+ 'upload_credentials': {
|
|
263
|
+ 'service_name': RECORDING_TYPES.DROPBOX,
|
|
264
|
+ 'token': _token
|
|
265
|
+ }
|
266
|
266
|
}
|
267
|
|
- }
|
268
|
|
- });
|
269
|
|
- attributes.type = RECORDING_TYPES.DROPBOX;
|
|
267
|
+ });
|
|
268
|
+ attributes.type = RECORDING_TYPES.DROPBOX;
|
|
269
|
+ } else {
|
|
270
|
+ dispatch(showErrorNotification({
|
|
271
|
+ titleKey: 'dialog.noDropboxToken'
|
|
272
|
+ }));
|
|
273
|
+
|
|
274
|
+ return;
|
|
275
|
+ }
|
270
|
276
|
} else {
|
271
|
277
|
appData = JSON.stringify({
|
272
|
278
|
'file_recording_metadata': {
|