mirror of
https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation.git
synced 2026-08-23 14:04:19 +02:00
refactor: extract UNINSTALLED_PACKAGES_FILE_NAME_FORMAT into a const
This commit is contained in:
parent
2673fd5c70
commit
d14ed459f7
2 changed files with 4 additions and 6 deletions
|
|
@ -17,7 +17,7 @@ pub const NAME: &str = "UAD-ng";
|
|||
/// [More info](https://developer.android.com/tools/variables#adb)
|
||||
pub const ANDROID_SERIAL: &str = "ANDROID_SERIAL";
|
||||
pub const EXPORT_FILE_NAME: &str = "selection_export.txt";
|
||||
pub const UNINSTALLED_PACKAGES_FILE_NAME: &str = "uninstalled_packages";
|
||||
pub const UNINSTALLED_PACKAGES_FILE_NAME_FORMAT: &str = "uninstalled_packages_{}.csv";
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum Error {
|
||||
|
|
@ -184,8 +184,7 @@ pub async fn export_packages(
|
|||
phone_packages: Vec<Vec<PackageRow>>,
|
||||
) -> Result<bool, String> {
|
||||
let backup_file = format!(
|
||||
"{}_{}.csv",
|
||||
UNINSTALLED_PACKAGES_FILE_NAME,
|
||||
UNINSTALLED_PACKAGES_FILE_NAME_FORMAT,
|
||||
Local::now().format("%Y%m%d")
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use crate::core::sync::{get_android_sdk, perform_adb_commands, CommandType, Phon
|
|||
use crate::core::theme::Theme;
|
||||
use crate::core::utils::{
|
||||
export_packages, open_folder, open_url, string_to_theme, DisplayablePath,
|
||||
UNINSTALLED_PACKAGES_FILE_NAME,
|
||||
UNINSTALLED_PACKAGES_FILE_NAME_FORMAT,
|
||||
};
|
||||
use crate::gui::style;
|
||||
use crate::gui::views::list::{List as AppsView, PackageInfo};
|
||||
|
|
@ -544,8 +544,7 @@ impl Settings {
|
|||
].padding(20);
|
||||
|
||||
let file_row = row![text(format!(
|
||||
"{}_{}.csv",
|
||||
UNINSTALLED_PACKAGES_FILE_NAME,
|
||||
UNINSTALLED_PACKAGES_FILE_NAME_FORMAT,
|
||||
chrono::Local::now().format("%Y%m%d")
|
||||
))
|
||||
.style(style::Text::Commentary)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue