mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-12-01 10:40:14 +08:00
refactor(profile): separate subscription refresh and scheduling policy
Separate download and scheduling policy from the subscription use case while retaining the existing write path.
This commit is contained in:
@@ -5,7 +5,7 @@ use tauri::Url;
|
||||
use tristr::alias::String;
|
||||
|
||||
use crate::{
|
||||
config::{Config, PrfItem, fetch_remote_profile, profiles},
|
||||
config::{Config, PrfItem, build_remote_profile, profiles},
|
||||
core::{CoreManager, handle, timer::Timer},
|
||||
utils::help,
|
||||
};
|
||||
@@ -113,7 +113,7 @@ async fn import_subscription(url: &str, name: Option<&String>) {
|
||||
}
|
||||
|
||||
async fn fetch_profile_item(url: &str, name: Option<&String>) -> Option<PrfItem> {
|
||||
match fetch_remote_profile(url, name, None, None).await {
|
||||
match build_remote_profile(url, name, None, None).await {
|
||||
Ok(item) => Some(item),
|
||||
Err(e) => {
|
||||
logging!(error, Type::Config, "failed to parse profile from url: {:?}", e);
|
||||
|
||||
Reference in New Issue
Block a user