Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ ByeByeCode 是一个 Rust 编写的 Claude Code 状态栏增强工具,用于
| `feature/progress-bar-usage-display` | 进度条功能 | PR #11 | ✅ 已合并 |
| `fix/skip-free-subscription` | 跳过 FREE 套餐 | PR #12 | ✅ 已合并 |
| `feature/simplify-subscription-display` | 精简订阅显示格式 | PR #15 | 🔄 待审核 |
| `feature/support-new-88code-domains` | 支持新域名 88code.ai | PR #16 | 🔄 待审核 |

### 分支工作流

Expand Down
5 changes: 4 additions & 1 deletion src/core/segments/byebyecode_subscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,14 @@ pub fn collect(config: &Config, input: &InputData) -> Option<SegmentData> {
}

// 过滤掉已禁用的订阅和已过期的订阅(剩余天数 <= 0)
let active_subscriptions: Vec<_> = subscriptions
let mut active_subscriptions: Vec<_> = subscriptions
.iter()
.filter(|sub| sub.is_active && sub.remaining_days > 0)
.collect();

// 按剩余天数升序排序(快过期的排在前面)
active_subscriptions.sort_by(|a, b| a.remaining_days.cmp(&b.remaining_days));

if active_subscriptions.is_empty() {
return Some(SegmentData {
primary: "未订阅".to_string(),
Expand Down