Skip to content

Commit 8535d07

Browse files
committed
ci 问题解决
1 parent f1bfb5a commit 8535d07

3 files changed

Lines changed: 9 additions & 13 deletions

File tree

src/local/notification.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,10 @@ impl Notification {
4949
title: format!("🎉{} 有更新", name),
5050
subtitle: if open_by_app {
5151
"点击打开应用或MAS".to_string()
52+
} else if update_page_url.starts_with("macappstore") {
53+
"点击通知打开MAS应用主页".to_string()
5254
} else {
53-
if update_page_url.starts_with("macappstore") {
54-
"点击通知打开MAS应用主页".to_string()
55-
} else {
56-
"点击通知下载最新版本安装包".to_string()
57-
}
55+
"点击通知下载最新版本安装包".to_string()
5856
},
5957
message: format!("{} -> {}", local_version, remote_version),
6058
open_url: Some(update_page_url),
@@ -73,12 +71,10 @@ impl Notification {
7371
title: format!("{} 检查结束", app_info.name),
7472
subtitle: if open_by_app {
7573
"点击打开应用或MAS".to_string()
74+
} else if app_info.is_mas_app() {
75+
"点击通知打开MAS应用主页".to_string()
7676
} else {
77-
if app_info.is_mas_app() {
78-
"点击通知打开MAS应用主页".to_string()
79-
} else {
80-
"点击通知下载最新版本安装包".to_string()
81-
}
77+
"点击通知下载最新版本安装包".to_string()
8278
},
8379
message: format!(
8480
"{} -> {}\n{}",

src/local/plist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pub fn get_arm_system_version() -> String {
7575
.and_then(|id| id.as_string())
7676
.unwrap_or("");
7777
if product_version.starts_with("26") {
78-
return "arm64_sonoma".to_string();
78+
return "arm64_tahoe".to_string();
7979
} else if product_version.starts_with("14") {
8080
return "arm64_sonoma".to_string();
8181
} else if product_version.starts_with("13") {

src/request/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub async fn homebrew_check(app_name: &str, bundle_id: &str) -> RemoteInfo {
5959
.to_string();
6060
// 获取对应系统的对应版本信息,如果没有就忽略
6161
// FIXME: 由于手上只有一个 M1 Pro mac 无法确定下面的判断是否正确
62-
if ARM_SYSTEM_NAME.len() > 0 && (arch_str == "aarch64" || arch_str == "arm") {
62+
if !ARM_SYSTEM_NAME.is_empty() && (arch_str == "aarch64" || arch_str == "arm") {
6363
if let Some(variations) = json_value.get("variations") {
6464
if let Some(arm64_system_name) = variations.get(ARM_SYSTEM_NAME.as_str()) {
6565
if let Some(url_value) = arm64_system_name.get("url") {
@@ -230,7 +230,7 @@ async fn mas_app_check(area_code: &str, bundle_id: &str, is_ios_app: bool) -> Op
230230
for doc_node in nodes {
231231
if let Some(text) = doc_node.get_text(&document) {
232232
if text.contains("Version") {
233-
if let Some(last) = text.split(' ').last() {
233+
if let Some(last) = text.split(' ').next_back() {
234234
version = last.to_string();
235235
break;
236236
}

0 commit comments

Comments
 (0)