Skip to content

Commit 01e4b8c

Browse files
committed
Apparently I broke a rule
1 parent 97005b1 commit 01e4b8c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

js/components/AllLessons/AllLessons.react.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import CourseData from '../../course-data';
1515
import DownloadManager from '../../download-manager';
1616
import prettyBytes from 'pretty-bytes';
1717
import {usePreference} from '../../persistence';
18-
import downloadOnWifiError from '../../download-on-wifi-error';
18+
import genConditionallyShowErrorOnNoWifi from '../../download-on-wifi-error';
1919

2020
import {Icon} from 'react-native-elements';
2121

@@ -67,7 +67,7 @@ const AllLessons = ({route}: {route: any}) => {
6767
{
6868
text: 'OK',
6969
onPress: async() => {
70-
downloadOnWifiError();
70+
await genConditionallyShowErrorOnNoWifi();
7171

7272
indices
7373
.filter((lesson) => !downloadedMask[lesson])

js/components/AllLessons/LessonRow.react.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {usePreference} from '../../persistence';
1212
import {log} from '../../metrics';
1313
import { useNavigation } from '@react-navigation/core';
1414
import { MainNavigationProp } from '../App.react';
15-
import downloadOnWifiError from '../../download-on-wifi-error';
15+
import genConditionallyShowErrorOnNoWifi from '../../download-on-wifi-error';
1616

1717
export const LESSON_ROW_HEIGHT = 72;
1818

@@ -99,7 +99,7 @@ const handleDownloadClick = async (
9999
});
100100
DownloadManager.stopDownload(DownloadManager.getDownloadId(course, lesson));
101101
} else if (!downloaded) {
102-
downloadOnWifiError();
102+
await genConditionallyShowErrorOnNoWifi();
103103

104104
log({
105105
action: 'download_lesson',

0 commit comments

Comments
 (0)