Skip to content

Commit 7e1ca9c

Browse files
authored
fix: firebase crashlytics reports part 1 (#1113)
* fix: trim surrounding whitespace in url link in articles * fix: invalid url throwing exception * fix: missing argument type * fix: missing description in episode view Some episode descriptions are not HTML content * fix: cannot scroll on youtube embed NOTE: fullscreen seems to have broken in the package side
1 parent fa75829 commit 7e1ca9c

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

mobile-app/lib/ui/views/learn/challenge/templates/python-project/python_project_viewmodel.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ class PythonProjectViewModel extends BaseViewModel {
3232
}
3333

3434
bool isUrl(String url) {
35-
return Uri.parse(url).isAbsolute;
35+
try {
36+
return Uri.parse(url).isAbsolute;
37+
} on FormatException {
38+
return false;
39+
}
3640
}
3741

3842
void checkLink() {

mobile-app/lib/ui/views/learn/challenge/templates/python/python_view.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class PythonView extends StatelessWidget {
7575
),
7676
child: YoutubePlayer(
7777
controller: controller,
78+
enableFullScreenOnVerticalDrag: false,
7879
),
7980
),
8081
const SizedBox(height: 12),

mobile-app/lib/ui/views/news/html_handler/html_handler.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class HTMLParser {
153153
),
154154
},
155155
onLinkTap: (url, attributes, element) {
156-
launchUrl(Uri.parse(url!));
156+
launchUrl(Uri.parse(url!.trim()));
157157
},
158158
extensions: [
159159
const TableHtmlExtension(),
@@ -236,6 +236,7 @@ class HTMLParser {
236236
);
237237

238238
return YoutubePlayer(
239+
enableFullScreenOnVerticalDrag: false,
239240
controller: controller,
240241
);
241242
}

mobile-app/lib/ui/views/news/news-feed/news_feed_view.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class NewsFeedView extends StatelessWidget {
7373
);
7474
}
7575

76-
Column errorMessage(context) {
76+
Column errorMessage(BuildContext context) {
7777
return Column(
7878
mainAxisAlignment: MainAxisAlignment.center,
7979
crossAxisAlignment: CrossAxisAlignment.stretch,

mobile-app/lib/ui/views/podcast/episode/episode_view.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ class EpisodeView extends StatelessWidget {
9494
Widget description(EpisodeViewModel model, BuildContext context) {
9595
HTMLParser parser = HTMLParser(context: context);
9696
return Column(
97-
children: parser.parse(episode.description ?? ''),
98-
97+
children: parser.parse('<p>${episode.description}</p>'),
9998
);
10099
}
101100
}

0 commit comments

Comments
 (0)