Преглед изворни кода

wallet: disable sending when the input editbox is empty

darkfi пре 1 година
родитељ
комит
67df2242dc
2 измењених фајлова са 5 додато и 0 уклоњено
  1. 2 0
      bin/darkwallet/README.md
  2. 3 0
      bin/darkwallet/src/darkirc2.rs

+ 2 - 0
bin/darkwallet/README.md

@@ -17,6 +17,8 @@ make android
 
 To debug any issues, you can enter an interactive terminal using `make cli`.
 
+To delete everything, run `podman system reset`.
+
 # Useful Dev Commands
 
 This is just devs.

+ 3 - 0
bin/darkwallet/src/darkirc2.rs

@@ -380,6 +380,9 @@ impl LocalDarkIRC {
     async fn handle_send(&self) {
         // Get text from editbox
         let text = self.editbox_text.get();
+        if text.is_empty() {
+            return
+        }
         // Clear editbox
         self.editbox_text.set("");
         self.chatview_scroll.set(0.);