Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Changelog

## [unreleased]
## v1.7.1 - 2026-02-07

### Fix

- (fix) remove `Render` event handling entirely [#158](https://github.com/sectore/timr-tui/pull/158)
- (perf) reduce CPU usage by implementing conditional redraws [#157](https://github.com/sectore/timr-tui/pull/157) by @fgbm
- remove `Render` event handling entirely [#158](https://github.com/sectore/timr-tui/pull/158)
- (perf) reduce CPU usage by implementing conditional redraws [#157](https://github.com/sectore/timr-tui/pull/157) by @fgbm.

## v1.7.0 - 2026-02-02

Expand All @@ -18,7 +18,7 @@

### Fix

- fix(nix): use `crossSystem` for `Windows` builds [#156](https://github.com/sectore/timr-tui/pull/156)
- (nix) use `crossSystem` for `Windows` builds [#156](https://github.com/sectore/timr-tui/pull/156)
- (sound) latest `rodio` breaks sound implementation [#149](https://github.com/sectore/timr-tui/issues/149)
- (readme) typo [#145](https://github.com/sectore/timr-tui/issues/145) by @dnlzrgz

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "timr-tui"
version = "1.7.0"
description = "TUI to organize your time: Pomodoro, Countdown, Timer."
version = "1.7.1"
description = "TUI to organize your time: Pomodoro, Countdown, Timer, Event."
edition = "2024"
# Reminder: Always keep `channel` in `rust-toolchain.toml` in sync with `rust-version`.
rust-version = "1.93.0"
Expand Down
3 changes: 3 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ impl App {
};
};
// Closure to handle `TuiEvent`'s
// It returns a flag (bool) whether the app needs to be re-drawn or not
let handle_tui_events = |app: &mut Self, event: events::TuiEvent| -> Result<bool> {
if matches!(event, events::TuiEvent::Tick) {
app.app_time = AppTime::new();
Expand All @@ -332,6 +333,7 @@ impl App {
Content::Event => app.event.update(event.clone()),
Content::LocalTime => app.local_time.update(event.clone()),
};
// from all 'unhandled' events we are interested in `CrosstermEvent::Key` only
if let Some(events::TuiEvent::Crossterm(CrosstermEvent::Key(key))) = unhandled {
handle_key_event(app, key);
}
Expand All @@ -347,6 +349,7 @@ impl App {
};

// Closure to handle `AppEvent`'s
// It returns a flag (bool) whether the app needs to be re-drawn or not
let handle_app_events = |app: &mut Self, event: events::AppEvent| -> Result<bool> {
let mut trigger_redraw = false;
match event {
Expand Down
6 changes: 2 additions & 4 deletions src/widgets/local_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ impl LocalTimeState {

impl TuiEventHandler for LocalTimeState {
fn update(&mut self, event: TuiEvent) -> Option<TuiEvent> {
match event {
TuiEvent::Tick => None,
_ => Some(event),
}
// we don't handle any event in this widget,
Some(event)
}
}

Expand Down