diff --git a/crates/voelin-ui/src/dev.rs b/crates/voelin-ui/src/dev.rs index a33b438..597d088 100644 --- a/crates/voelin-ui/src/dev.rs +++ b/crates/voelin-ui/src/dev.rs @@ -1634,9 +1634,8 @@ fn demo_chat(app: &mut App, session: u64) { None, ), ]; - let mut id = 1; let mut pinned: Vec = Vec::new(); - for (chat, author, client, text, ago, relay, reactions, pin, topic) in lines { + for (id, (chat, author, client, text, ago, relay, reactions, pin, topic)) in (1..).zip(lines) { let target = if chat == DEMO { ChatTarget::Channel(2) } else { ChatTarget::Server }; let message = HistoryMessage { id, @@ -1667,7 +1666,6 @@ fn demo_chat(app: &mut App, session: u64) { source: HistorySource::Gateway, complete: false, }); - id += 1; } // A server chat besides the channel chat. app.handle_event(Event::ChatHistory {