diff --git a/src/terms/consent_state.rs b/src/terms/consent_state.rs
index 6a9ccaf..09146f4 100644
--- a/src/terms/consent_state.rs
+++ b/src/terms/consent_state.rs
@@ -8,7 +8,6 @@ use crate::{
util::file_util::{load_file, save_file},
};
use std::time::{SystemTime, UNIX_EPOCH};
-use tokio::task;
pub struct ConsentManager;
impl ConsentManager {
@@ -30,7 +29,9 @@ impl ConsentManager {
}
if let Some((eula_update, tos_update, privacy_update)) = Self::get_updates().await {
- let is_forced = eula_update.is_err() || tos_update.is_err() || privacy_update.is_err();
+ let _is_forced = matches!(eula_update, UpdateDecision::Forced(_))
+ || matches!(tos_update, UpdateDecision::Forced(_))
+ || matches!(privacy_update, UpdateDecision::Forced(_));
let updater_logic = async move {
let state_to_update = terms_updater::run_consent_ui(
@@ -45,12 +46,14 @@ impl ConsentManager {
save_file("", "agreements", &state_to_update.sanitize().to_string());
};
-
- if is_forced {
- updater_logic.await;
- } else {
- task::spawn(updater_logic);
- }
+ // ======================================================== //
+ // TODO: Implement UI Drawing order, draw update As PoPup //
+ // ======================================================== //
+ //if is_forced {
+ updater_logic.await;
+ //} else {
+ //task::spawn(updater_logic);
+ //}
}
let final_state = ConsentState::from_str(&load_file("", "agreements")).sanitize();
@@ -64,9 +67,9 @@ impl ConsentManager {
// Ok(None) indicates no update
// Ok(Some) Indicates a future update
// Err indicates a update that has to be accepted before the programm can continue
- Result