Skip to content

Commit 37a1699

Browse files
committed
Swap positions of share button and fulltext button on read page
1 parent fdab0cc commit 37a1699

File tree

3 files changed

+21
-19
lines changed

3 files changed

+21
-19
lines changed

lib/l10n/app_en.arb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,6 @@
103103
"importFailed": "Import Failed",
104104
"fileFormatError": "File Format Error. Please select a file with the suffix opml or xml.",
105105
"copyFeedUrlSuccess": "Feed URL copied.",
106-
"allFeed": "All Feeds"
106+
"allFeed": "All Feeds",
107+
"sharePost": "Share Post"
107108
}

lib/l10n/app_zh.arb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,6 @@
103103
"importFailed": "导入失败",
104104
"fileFormatError": "文件格式错误,仅支持导入后缀名为 opml 或 xml 的文件。",
105105
"copyFeedUrlSuccess": "已复制订阅源地址",
106-
"allFeed": "全部订阅"
106+
"allFeed": "全部订阅",
107+
"sharePost": "分享文章"
107108
}

lib/routes/read.dart

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,10 @@ ${context.watch<ReadPageProvider>().customCss}
134134
},
135135
icon: const Icon(Icons.open_in_browser_outlined),
136136
),
137-
/* 分享 */
137+
/* 获取全文 */
138138
IconButton(
139-
onPressed: () {
140-
Share.share(
141-
widget.post.link,
142-
subject: widget.post.title,
143-
);
144-
},
145-
icon: const Icon(Icons.share_outlined),
139+
onPressed: getFullText,
140+
icon: const Icon(Icons.article_outlined),
146141
),
147142
PopupMenuButton(
148143
position: PopupMenuPosition.under,
@@ -183,33 +178,38 @@ ${context.watch<ReadPageProvider>().customCss}
183178
),
184179
),
185180
const PopupMenuDivider(),
186-
/* 获取全文 */
181+
182+
/* 复制链接 */
187183
PopupMenuItem(
188-
onTap: getFullText,
184+
onTap: () {
185+
Clipboard.setData(ClipboardData(text: widget.post.link));
186+
},
189187
child: Row(
190188
mainAxisSize: MainAxisSize.min,
191189
children: [
192-
const Icon(Icons.article_outlined, size: 20),
190+
const Icon(Icons.link_outlined, size: 20),
193191
const SizedBox(width: 10),
194192
Text(
195-
AppLocalizations.of(context)!.fullText,
193+
AppLocalizations.of(context)!.copyLink,
196194
),
197195
],
198196
),
199197
),
200-
const PopupMenuDivider(),
201-
/* 复制链接 */
198+
/* 分享 */
202199
PopupMenuItem(
203200
onTap: () {
204-
Clipboard.setData(ClipboardData(text: widget.post.link));
201+
Share.share(
202+
widget.post.link,
203+
subject: widget.post.title,
204+
);
205205
},
206206
child: Row(
207207
mainAxisSize: MainAxisSize.min,
208208
children: [
209-
const Icon(Icons.link_outlined, size: 20),
209+
const Icon(Icons.share_outlined, size: 20),
210210
const SizedBox(width: 10),
211211
Text(
212-
AppLocalizations.of(context)!.copyLink,
212+
AppLocalizations.of(context)!.sharePost,
213213
),
214214
],
215215
),

0 commit comments

Comments
 (0)