mirror of
https://github.com/jwinterm/grim.git
synced 2026-11-30 09:53:53 +01:00
ui: save mnemonic phrase word on enter key press, remove useless separate function to check back press event
This commit is contained in:
+1
-8
@@ -43,7 +43,7 @@ impl<Platform> PlatformApp<Platform> {
|
||||
impl<Platform: PlatformCallbacks> eframe::App for PlatformApp<Platform> {
|
||||
fn update(&mut self, ctx: &Context, frame: &mut eframe::Frame) {
|
||||
// Handle Esc keyboard key event and platform Back button key event.
|
||||
let back_button_pressed = back_button_pressed();
|
||||
let back_button_pressed = BACK_BUTTON_PRESSED.load(Ordering::Relaxed);
|
||||
if ctx.input(|i| i.key_pressed(egui::Key::Escape) || back_button_pressed) {
|
||||
if back_button_pressed {
|
||||
BACK_BUTTON_PRESSED.store(false, Ordering::Relaxed);
|
||||
@@ -70,13 +70,6 @@ impl<Platform: PlatformCallbacks> eframe::App for PlatformApp<Platform> {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// Check if platform Back button was pressed.
|
||||
fn back_button_pressed() -> bool {
|
||||
BACK_BUTTON_PRESSED.load(Ordering::Relaxed)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[cfg(target_os = "android")]
|
||||
#[allow(non_snake_case)]
|
||||
|
||||
Reference in New Issue
Block a user