Skip to content

Commit

Permalink
code: Format
Browse files Browse the repository at this point in the history
  • Loading branch information
bragefuglseth committed Jan 13, 2025
1 parent a4d33fa commit 33604e4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/widgets/text_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use adw::subclass::prelude::*;
use glib::subclass::Signal;
use gtk::glib;
use gtk::{gdk, gsk};
use std::cell::{Ref, Cell, OnceCell, RefCell};
use std::cell::{Cell, OnceCell, Ref, RefCell};
use std::sync::OnceLock;
use std::time::Instant;
use unicode_segmentation::UnicodeSegmentation;
Expand Down
4 changes: 3 additions & 1 deletion src/widgets/window/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ impl imp::KpWindow {
}
}

let frustration_score = text_view.keystrokes().iter()
let frustration_score = text_view
.keystrokes()
.iter()
.rev()
.take_while(|(timestamp, _)| {
timestamp.elapsed().as_secs() <= FRUSTRATION_THRESHOLD as u64
Expand Down
2 changes: 0 additions & 2 deletions src/widgets/window/ui_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ impl imp::KpWindow {
}
),
);

}

pub(super) fn end_session(&self) {
Expand All @@ -232,7 +231,6 @@ impl imp::KpWindow {
self.text_view.set_accepts_input(false);
self.finish_time.set(Some(Instant::now()));


self.obj()
.action_set_enabled("win.text-language-dialog", false);
self.obj().action_set_enabled("win.cancel-session", false);
Expand Down

0 comments on commit 33604e4

Please sign in to comment.