Skip to content

Commit a5a61fa

Browse files
committed
🚸 订阅更新时单条目只发送一次通知
1 parent 41a00ea commit a5a61fa

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

lib/widgets/bangumi/subject_detail/bsd_bmf_rss.dart

+11-2
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,19 @@ class _BsdBmfRssState extends ConsumerState<BsdBmfRss>
120120

121121
/// showNewRss
122122
Future<void> showNewRss(List<RssItem> newList) async {
123-
for (var item in newList) {
123+
if (newList.length > 1) {
124124
await BTNotifierTool.showMini(
125125
title: 'RSS 订阅更新',
126-
body: '${item.title}',
126+
body: bmf.title ?? '动画:${bmf.subject}',
127+
onClick: () => ref
128+
.read(navStoreProvider.notifier)
129+
.addNavItemB(subject: bmf.subject, type: '动画'),
130+
);
131+
}
132+
if (newList.length == 1) {
133+
await BTNotifierTool.showMini(
134+
title: 'RSS 订阅更新',
135+
body: '${newList[0].title}',
127136
onClick: () => ref
128137
.read(navStoreProvider.notifier)
129138
.addNavItemB(subject: bmf.subject, type: '动画'),

0 commit comments

Comments
 (0)