Parcourir la source

wallet: disable sending when the input editbox is empty

darkfi il y a 1 an
Parent
commit
67df2242dc
2 fichiers modifiés avec 5 ajouts et 0 suppressions
  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.);