Skip to content

Commit

Permalink
fix(notification): Fix parsing recent broadcast message datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
realth000 committed Sep 18, 2024
1 parent 895c52e commit ccd1821
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- 统计:修复积分统计中的积分值。
- 分区:修复开启帖子筛选条件时,显示没有置顶帖的问题。
- 消息:修复解析7天内的公共消息时失败的问题。
- 消息:修复某些情况下公共消息详情加载失败的问题。
- 主页:修复部分网络不稳定的情况下将加载失败显示为未登录的问题。
- 网页:修复折叠/展开按钮上的文字丢失颜色的问题。
- 网页:修复解析颜色时,部分颜色解析失败或错误的问题。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@ final class BroadcastMessageDetailCubit
final (document, _) = v;
final infoNode = document.querySelector('div#pm_ul');
final datetime = infoNode
?.querySelector('dl > dd.ptm > span.xg1')
?.innerText
.parseToDateTimeUtc8();
?.querySelector('dl > dd.ptm > span.xg1')
?.innerText
.parseToDateTimeUtc8() ??
// Recent messages.
infoNode
?.querySelector('dl > dd.ptm > span.xg1 > span')
?.title
?.parseToDateTimeUtc8();
final messageNode = infoNode?.querySelector('dl > dd > p.pm_smry');
if (datetime == null || messageNode == null) {
error('failed to build broadcast detail message page: '
Expand Down

0 comments on commit ccd1821

Please sign in to comment.