From f5fd22d35cc18de647446b462290132e2094fbff Mon Sep 17 00:00:00 2001 From: futile Date: Sat, 26 Apr 2025 04:23:37 +0100 Subject: [PATCH] redesign `if_failed_return_to_unblocked` to `if_failed_return_to_boolean` --- src/features/game_networking.rs | 4 ++-- src/gui/app.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/features/game_networking.rs b/src/features/game_networking.rs index 4acddba..012ea63 100644 --- a/src/features/game_networking.rs +++ b/src/features/game_networking.rs @@ -118,7 +118,7 @@ impl GameNetworking { 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 { self.counting = true; self.timer = Instant::now(); @@ -128,7 +128,7 @@ impl GameNetworking { && self.timer.elapsed() >= INTERVAL { self.counting = false; - self.blocked_status = BlockedStatus::Unblocked; + self.blocked_status = Self::is_blocked().into(); } } } diff --git a/src/gui/app.rs b/src/gui/app.rs index 26e79ac..b494177 100644 --- a/src/gui/app.rs +++ b/src/gui/app.rs @@ -158,7 +158,7 @@ impl App { .tint(self.game_networking.blocked_status.to_color32()), ) .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 }); ui.horizontal(|ui| {