wallet: fix 2 small chatview bugs, first is a typo from last commit, second is actually check is_select_mode when its modified after long hold

This commit is contained in:
darkfi
2024-09-14 13:21:52 +02:00
parent 6d576e4c03
commit 0ada742edb
2 changed files with 10 additions and 2 deletions

View File

@@ -16,10 +16,16 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// channel wait until deadline
#![feature(deadline_api)]
// Adds remainder() fn for String::split() result
#![feature(str_split_whitespace_remainder)]
// instant.elapsed().as_millis_f32()
#![feature(duration_millis_float)]
// Allow attributes on statements and code blocks
#![feature(stmt_expr_attributes)]
// if let Some(is_foo) = is_foo && is_foo { ... }
#![feature(let_chains)]
// Use these to incrementally fix warnings with cargo fix
//#![allow(warnings, unused)]

View File

@@ -646,7 +646,9 @@ impl ChatView {
}
// We are in selection mode so don't scroll the screen until touch phase ends.
if let Some(is_select_mode) = is_select_mode {
if let Some(is_select_mode) = is_select_mode &&
is_select_mode
{
self.select_line(touch_y).await;
return
}
@@ -936,7 +938,7 @@ impl ChatView {
// Use this to start from the top
//let start_pos = if total_height < rect.h { total_height } else { rect.h };
// We start from the bottom though
let start_pos = rect.y + rect.h;
let start_pos = rect.h;
let mut instrs = vec![];
//let mut old_drawmesh = vec![];