Skip to content
This repository was archived by the owner on Aug 2, 2020. It is now read-only.

Commit d02186c

Browse files
committed
Fix updater
1 parent 1f71578 commit d02186c

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

src/cqhttp/core/helpers.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ namespace cqhttp::helpers {
1010

1111
if (url == "global" || url == "github") {
1212
url = "https://raw.githubusercontent.com/richardchien/coolq-http-api-release/master/";
13-
} else if (url == "china" || url == "gitee") {
14-
url = "https://gitee.com/richardchien/coolq-http-api-release/raw/master/";
13+
} else if (url == "china" || url == "coding") {
14+
url = "https://coding.net/u/richardchien/p/coolq-http-api-release/git/raw/master/";
1515
}
1616

1717
if (!boost::ends_with(url, "/")) {

src/cqhttp/plugins/updater/updater.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ namespace cqhttp::plugins {
8080
return nullopt;
8181
}
8282

83-
static void restart_coolq() { call_action("set_restart"); }
84-
8583
static bool version_locked() { return fs::exists(ansi(cq::dir::app() + "version.lock")); }
8684

8785
void Updater::check_update(const bool automatic) const {
@@ -105,8 +103,7 @@ namespace cqhttp::plugins {
105103
if (automatic && auto_perform_update_) {
106104
// auto update
107105
if (perform_update(version, build_number)) {
108-
logging::info_success(TAG, u8"更新成功,即将重启酷 Q 以生效");
109-
restart_coolq();
106+
logging::info_success(TAG, u8"更新成功,将在重启 酷Q 后生效");
110107
} else {
111108
logging::error(TAG, u8"更新失败,请检查网络连接是否通畅,或尝试更换更新源。");
112109
}
@@ -118,11 +115,7 @@ namespace cqhttp::plugins {
118115
+ u8"\r\n\r\n是否现在更新?");
119116
if (code == IDYES) {
120117
if (perform_update(version, build_number)) {
121-
code = message_box(MB_YESNO | MB_ICONQUESTION,
122-
u8"更新成功,请重启酷 Q 以生效。\r\n\r\n是否现在重启酷 Q?");
123-
if (code == IDYES) {
124-
restart_coolq();
125-
}
118+
message_box(MB_OK | MB_ICONINFORMATION, u8"更新成功,请重启酷 Q 以生效。");
126119
} else {
127120
message_box(MB_OK | MB_ICONERROR,
128121
u8"更新失败,请检查网络连接是否通畅,或尝试更换更新源。");

0 commit comments

Comments
 (0)