mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-10 04:22:13 +10:00
Semantic naming changes
This commit is contained in:
@ -39,7 +39,7 @@ pub type DatabaseInterface =
|
||||
pub static DATA_ROOT_DIR: LazyLock<PathBuf> =
|
||||
LazyLock::new(|| BaseDirs::new().unwrap().data_dir().join("drop"));
|
||||
|
||||
pub fn setup() -> DatabaseInterface {
|
||||
pub fn set_up_database() -> DatabaseInterface {
|
||||
let db_path = DATA_ROOT_DIR.join("drop.db");
|
||||
let apps_base_dir = DATA_ROOT_DIR.join("apps");
|
||||
|
||||
@ -62,8 +62,8 @@ pub fn setup() -> DatabaseInterface {
|
||||
db
|
||||
}
|
||||
|
||||
pub fn is_set_up() -> bool {
|
||||
return !DB.borrow_data().unwrap().base_url.is_empty();
|
||||
pub fn database_is_set_up() -> bool {
|
||||
!DB.borrow_data().unwrap().base_url.is_empty()
|
||||
}
|
||||
|
||||
pub fn fetch_base_url() -> Url {
|
||||
|
||||
@ -54,7 +54,7 @@ fn fetch_state(state: tauri::State<'_, Mutex<AppState>>) -> Result<AppState, Str
|
||||
fn setup() -> AppState {
|
||||
env_logger::Builder::from_env(Env::default().default_filter_or("info")).init();
|
||||
|
||||
let is_set_up = db::is_set_up();
|
||||
let is_set_up = db::database_is_set_up();
|
||||
if !is_set_up {
|
||||
return AppState {
|
||||
status: AppStatus::NotConfigured,
|
||||
@ -71,7 +71,7 @@ fn setup() -> AppState {
|
||||
}
|
||||
}
|
||||
|
||||
pub static DB: LazyLock<DatabaseInterface> = LazyLock::new(db::setup);
|
||||
pub static DB: LazyLock<DatabaseInterface> = LazyLock::new(db::set_up_database);
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
|
||||
Reference in New Issue
Block a user