Skip to content

Commit

Permalink
schedules, whats_new: fix launching url
Browse files Browse the repository at this point in the history
  • Loading branch information
wfleischer committed Dec 6, 2024
1 parent 921178f commit b975373
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions lib/src/schedules/presentations/section_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,7 @@ class SectionWidget extends ConsumerWidget {
onPressed: () async {
final url = Uri.parse(
'https://www.jw.org/finder?srcid=jwlshare&wtlocale=${bibleLanguage?.wtCode}&prefer=lang&bible=${section.url}');

if (await canLaunchUrl(url)) {
await launchUrl(url);
}
await launchUrl(url);
},
child: Text(
'${bibleLanguage?.books[section.bookIndex].name} ${section.ref}',
Expand Down
4 changes: 1 addition & 3 deletions lib/src/whats_new/presentations/whats_new_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ void showWhatsNewDialog(
..onTap = () async {
final url = Uri.parse(
'https://github.com/searchwork/nwt-reading');
if (await canLaunchUrl(url)) {
await launchUrl(url);
}
await launchUrl(url);
},
),
TextSpan(
Expand Down

0 comments on commit b975373

Please sign in to comment.