redesign if_failed_return_to_unblocked to if_failed_return_to_boolean

This commit is contained in:
2025-04-26 04:23:37 +01:00
parent 022828b802
commit f5fd22d35c
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -118,7 +118,7 @@ impl GameNetworking {
in_rule_exists || out_rule_exists in_rule_exists || out_rule_exists
} }
pub fn if_failed_return_to_unblocked(&mut self) { pub fn if_failed_return_to_boolean(&mut self) {
if self.blocked_status == BlockedStatus::Failed && !self.counting { if self.blocked_status == BlockedStatus::Failed && !self.counting {
self.counting = true; self.counting = true;
self.timer = Instant::now(); self.timer = Instant::now();
@@ -128,7 +128,7 @@ impl GameNetworking {
&& self.timer.elapsed() >= INTERVAL && self.timer.elapsed() >= INTERVAL
{ {
self.counting = false; self.counting = false;
self.blocked_status = BlockedStatus::Unblocked; self.blocked_status = Self::is_blocked().into();
} }
} }
} }
+1 -1
View File
@@ -158,7 +158,7 @@ impl App {
.tint(self.game_networking.blocked_status.to_color32()), .tint(self.game_networking.blocked_status.to_color32()),
) )
.on_hover_text("This turns yellow if GTA Tools\ncannot find your game."); .on_hover_text("This turns yellow if GTA Tools\ncannot find your game.");
self.game_networking.if_failed_return_to_unblocked(); self.game_networking.if_failed_return_to_boolean();
label label
}); });
ui.horizontal(|ui| { ui.horizontal(|ui| {