mirror of
https://github.com/Livinglist/Hacki.git
synced 2025-08-06 18:24:42 +08:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
32ae2087bc |
@ -33,8 +33,10 @@ class LinkIconButton extends StatelessWidget {
|
|||||||
Icons.stream,
|
Icons.stream,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onPressed: () =>
|
onPressed: () => LinkUtil.launch(
|
||||||
LinkUtil.launch('https://news.ycombinator.com/item?id=$storyId'),
|
'https://news.ycombinator.com/item?id=$storyId',
|
||||||
|
useHackiForHnLink: false,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,7 @@ abstract class LinkUtil {
|
|||||||
String link, {
|
String link, {
|
||||||
bool useReader = false,
|
bool useReader = false,
|
||||||
bool offlineReading = false,
|
bool offlineReading = false,
|
||||||
|
bool useHackiForHnLink = true,
|
||||||
}) {
|
}) {
|
||||||
if (offlineReading) {
|
if (offlineReading) {
|
||||||
locator
|
locator
|
||||||
@ -48,7 +49,7 @@ abstract class LinkUtil {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (link.isStoryLink) {
|
if (useHackiForHnLink && link.isStoryLink) {
|
||||||
_onStoryLinkTapped(link);
|
_onStoryLinkTapped(link);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -103,6 +104,8 @@ abstract class LinkUtil {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
launch(link, useHackiForHnLink: false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: hacki
|
name: hacki
|
||||||
description: A Hacker News reader.
|
description: A Hacker News reader.
|
||||||
version: 1.2.2+95
|
version: 1.2.3+96
|
||||||
publish_to: none
|
publish_to: none
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
Reference in New Issue
Block a user