Browse Source

wallet: chatview, disable highlighting lines temporarily

darkfi 1 year ago
parent
commit
638a315297
2 changed files with 13 additions and 4 deletions
  1. 1 1
      bin/darkwallet/Makefile
  2. 12 3
      bin/darkwallet/src/ui/chatview/mod.rs

+ 1 - 1
bin/darkwallet/Makefile

@@ -1,5 +1,5 @@
 default: fonts
-	cargo lrun
+	cargo lbuild
 	mv target/debug/darkwallet .
 	./darkwallet
 

+ 12 - 3
bin/darkwallet/src/ui/chatview/mod.rs

@@ -61,6 +61,9 @@ use super::{DrawUpdate, OnModify, UIObject};
 const EPSILON: f32 = 0.001;
 const BIG_EPSILON: f32 = 0.05;
 
+// Disable selecting lines for this release.
+const ENABLE_SELECT: bool = false;
+
 fn is_zero(x: f32) -> bool {
     x.abs() < EPSILON
 }
@@ -843,7 +846,9 @@ impl UIObject for ChatView {
             return false
         }
 
-        self.select_line(mouse_pos.y).await;
+        if ENABLE_SELECT {
+            self.select_line(mouse_pos.y).await;
+        }
         self.mouse_btn_held.store(true, Ordering::Relaxed);
         true
     }
@@ -872,7 +877,9 @@ impl UIObject for ChatView {
             return false
         }
 
-        self.select_line(mouse_pos.y).await;
+        if ENABLE_SELECT {
+            self.select_line(mouse_pos.y).await;
+        }
         false
     }
 
@@ -972,7 +979,9 @@ impl UIObject for ChatView {
                 if let Some(is_select_mode) = is_select_mode &&
                     is_select_mode
                 {
-                    self.select_line(touch_y).await;
+                    if ENABLE_SELECT {
+                        self.select_line(touch_y).await;
+                    }
                     return true
                 }