Compare commits

...

1 Commits

Author SHA1 Message Date
32ae2087bc fix link button. (#171) 2023-02-26 23:03:48 -08:00
3 changed files with 9 additions and 4 deletions

View File

@ -33,8 +33,10 @@ class LinkIconButton extends StatelessWidget {
Icons.stream,
),
),
onPressed: () =>
LinkUtil.launch('https://news.ycombinator.com/item?id=$storyId'),
onPressed: () => LinkUtil.launch(
'https://news.ycombinator.com/item?id=$storyId',
useHackiForHnLink: false,
),
);
}
}

View File

@ -30,6 +30,7 @@ abstract class LinkUtil {
String link, {
bool useReader = false,
bool offlineReading = false,
bool useHackiForHnLink = true,
}) {
if (offlineReading) {
locator
@ -48,7 +49,7 @@ abstract class LinkUtil {
return;
}
if (link.isStoryLink) {
if (useHackiForHnLink && link.isStoryLink) {
_onStoryLinkTapped(link);
return;
}
@ -103,6 +104,8 @@ abstract class LinkUtil {
);
}
});
} else {
launch(link, useHackiForHnLink: false);
}
}
}

View File

@ -1,6 +1,6 @@
name: hacki
description: A Hacker News reader.
version: 1.2.2+95
version: 1.2.3+96
publish_to: none
environment: