From 473f26d7a54500930409569f8e4d72175d684a69 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Thu, 14 Nov 2024 19:05:58 +0100 Subject: [PATCH] fix(task): adjust to inverted ordering of sdk 0.36 https://github.com/rust-nostr/nostr/issues/632 --- src/task.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/task.rs b/src/task.rs index 415c623..df82a83 100644 --- a/src/task.rs +++ b/src/task.rs @@ -115,7 +115,7 @@ impl Task { } pub(crate) fn priority_raw(&self) -> Option<&str> { - self.props.iter().rev() + self.props.iter() .chain(once(&self.event)) .find_map(|p| { p.tags.iter().find_map(|t| @@ -140,7 +140,7 @@ impl Task { pub(crate) fn state(&self) -> Option { let now = now(); // TODO do not iterate constructed state objects - let state = self.states().rev().take_while_inclusive(|ts| ts.time > now); + let state = self.states().take_while_inclusive(|ts| ts.time > now); state.last().map(|ts| { if ts.time <= now { ts