Skip to content

Commit

Permalink
fixup! Add ToDo of updating profile.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanChane committed Mar 24, 2024
1 parent d87c182 commit 9699c39
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions clashtui/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ impl App {
if let Ok(profile_names) = self.clashtui_util.get_profile_names() {
let mut ok_profiles = Vec::new();
for p_name in profile_names {
println!("Profile: {p_name}");
println!("Update Profile `{p_name}`:");
match self.clashtui_util.update_profile(&p_name, false) {
Ok(r) => {
for u in r {
Expand All @@ -318,7 +318,11 @@ impl App {
// ToDo: Check Content(profile, proxy-providers) of the current profile. If they are changed, reload the profile. However, the update times of proxy providers in mihomo will not be updated. So ?
let current_profile = &self.clashtui_util.tui_cfg.current_profile.borrow();
if ok_profiles.contains(current_profile) {
let _ = self.clashtui_util.select_profile(current_profile);
println!("\nSelect profile `{current_profile}`:");
match self.clashtui_util.select_profile(current_profile) {
Ok(_) => println!("- Ok"),
Err(e) => println!("- Err: {e}"),
}
}
}

Expand Down

0 comments on commit 9699c39

Please sign in to comment.