Skip to content

Commit

Permalink
Swap positions of share button and fulltext button on read page
Browse files Browse the repository at this point in the history
  • Loading branch information
gvenusleo committed Aug 31, 2023
1 parent fdab0cc commit 37a1699
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
3 changes: 2 additions & 1 deletion lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,6 @@
"importFailed": "Import Failed",
"fileFormatError": "File Format Error. Please select a file with the suffix opml or xml.",
"copyFeedUrlSuccess": "Feed URL copied.",
"allFeed": "All Feeds"
"allFeed": "All Feeds",
"sharePost": "Share Post"
}
3 changes: 2 additions & 1 deletion lib/l10n/app_zh.arb
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,6 @@
"importFailed": "导入失败",
"fileFormatError": "文件格式错误,仅支持导入后缀名为 opml 或 xml 的文件。",
"copyFeedUrlSuccess": "已复制订阅源地址",
"allFeed": "全部订阅"
"allFeed": "全部订阅",
"sharePost": "分享文章"
}
34 changes: 17 additions & 17 deletions lib/routes/read.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,10 @@ ${context.watch<ReadPageProvider>().customCss}
},
icon: const Icon(Icons.open_in_browser_outlined),
),
/* 分享 */
/* 获取全文 */
IconButton(
onPressed: () {
Share.share(
widget.post.link,
subject: widget.post.title,
);
},
icon: const Icon(Icons.share_outlined),
onPressed: getFullText,
icon: const Icon(Icons.article_outlined),
),
PopupMenuButton(
position: PopupMenuPosition.under,
Expand Down Expand Up @@ -183,33 +178,38 @@ ${context.watch<ReadPageProvider>().customCss}
),
),
const PopupMenuDivider(),
/* 获取全文 */

/* 复制链接 */
PopupMenuItem(
onTap: getFullText,
onTap: () {
Clipboard.setData(ClipboardData(text: widget.post.link));
},
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
const Icon(Icons.article_outlined, size: 20),
const Icon(Icons.link_outlined, size: 20),
const SizedBox(width: 10),
Text(
AppLocalizations.of(context)!.fullText,
AppLocalizations.of(context)!.copyLink,
),
],
),
),
const PopupMenuDivider(),
/* 复制链接 */
/* 分享 */
PopupMenuItem(
onTap: () {
Clipboard.setData(ClipboardData(text: widget.post.link));
Share.share(
widget.post.link,
subject: widget.post.title,
);
},
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
const Icon(Icons.link_outlined, size: 20),
const Icon(Icons.share_outlined, size: 20),
const SizedBox(width: 10),
Text(
AppLocalizations.of(context)!.copyLink,
AppLocalizations.of(context)!.sharePost,
),
],
),
Expand Down

0 comments on commit 37a1699

Please sign in to comment.