diff --git a/src/app/browser/window/tab/item/page/input/response/control.rs b/src/app/browser/window/tab/item/page/input/response/control.rs index a091dbe8..c36b210d 100644 --- a/src/app/browser/window/tab/item/page/input/response/control.rs +++ b/src/app/browser/window/tab/item/page/input/response/control.rs @@ -38,7 +38,7 @@ impl Control { // Actions pub fn update(&self, is_empty: bool, bytes_left: Option) { // Update children components - self.counter.update(bytes_left); + self.counter.update(is_empty, bytes_left); self.send.update(match bytes_left { Some(left) => !is_empty && left > 0, None => false, diff --git a/src/app/browser/window/tab/item/page/input/response/control/counter.rs b/src/app/browser/window/tab/item/page/input/response/control/counter.rs index f7adf8b2..1ea7c342 100644 --- a/src/app/browser/window/tab/item/page/input/response/control/counter.rs +++ b/src/app/browser/window/tab/item/page/input/response/control/counter.rs @@ -23,7 +23,7 @@ impl Counter { } // Actions - pub fn update(&self, bytes_left: Option) { - self.widget.update(bytes_left); + pub fn update(&self, is_empty: bool, bytes_left: Option) { + self.widget.update(is_empty, bytes_left); } } diff --git a/src/app/browser/window/tab/item/page/input/response/control/counter/widget.rs b/src/app/browser/window/tab/item/page/input/response/control/counter/widget.rs index 2020dd35..7355e2df 100644 --- a/src/app/browser/window/tab/item/page/input/response/control/counter/widget.rs +++ b/src/app/browser/window/tab/item/page/input/response/control/counter/widget.rs @@ -19,7 +19,7 @@ impl Widget { } // Actions - pub fn update(&self, bytes_left: Option) { + pub fn update(&self, is_empty: bool, bytes_left: Option) { match bytes_left { Some(value) => { // Update color on chars left reached @@ -30,7 +30,7 @@ impl Widget { self.label.set_label(&value.to_string()); // Toggle visibility on chars left provided - self.label.set_visible(true); + self.label.set_visible(!is_empty); } None => self.label.set_visible(false), }