Reset first

This commit is contained in:
Aoran Zeng 2024-11-08 19:08:28 +08:00
parent 1b1f13aa71
commit 943d4edaf0
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98

View File

@ -5,11 +5,12 @@
* File Authors : Aoran Zeng <ccmywish@qq.com>
* | Heng Guo <2085471348@qq.com>
* Contributors : Peng Gao <gn3po4g@outlook.com>
* | Happy Game <happygame10124@gmail.com>
* | Happy Game <happygame10124@gmail.com>
* |
* Created On : <2023-08-29>
* Last Modified : <2024-11-04>
* Last Modified : <2024-11-08>
*
* chsrc
* chsrc framework
* ------------------------------------------------------------*/
#include "xy.h"
@ -820,7 +821,13 @@ chsrc_conclude (SourceInfo *source, const char *last_word)
{
split_between_source_changing_process;
if (xy_streql (SetsrcType_Auto, last_word))
if ((ProgMode_CMD_Reset == true) || xy_streql (SetsrcType_Reset, last_word))
{
// source_is_upstream (source)
char *msg = CliOpt_InEnglish ? "Has been reset to the upstream default source" : "已重置为上游默认源";
chsrc_log (purple (msg));
}
else if (xy_streql (SetsrcType_Auto, last_word))
{
if (source)
{
@ -843,12 +850,6 @@ chsrc_conclude (SourceInfo *source, const char *last_word)
chsrc_log (msg);
}
}
else if (xy_streql (SetsrcType_Reset, last_word))
{
// source_is_upstream (source)
char *msg = CliOpt_InEnglish ? "Has been reset to the upstream default source" : "已重置为上游默认源";
chsrc_log (purple (msg));
}
else if (xy_streql (SetsrcType_SemiAuto, last_word))
{
if (source)