fix: keep selection on last/first message instead of deselecting
CI / Format (pull_request) Has been cancelled
CI / Clippy (pull_request) Has been cancelled
CI / Build (ubuntu-latest) (pull_request) Has been cancelled
CI / Build (windows-latest) (pull_request) Has been cancelled
CI / Check (pull_request) Has been cancelled
CI / Build (macos-latest) (pull_request) Has been cancelled
CI / Format (pull_request) Has been cancelled
CI / Clippy (pull_request) Has been cancelled
CI / Build (ubuntu-latest) (pull_request) Has been cancelled
CI / Build (windows-latest) (pull_request) Has been cancelled
CI / Check (pull_request) Has been cancelled
CI / Build (macos-latest) (pull_request) Has been cancelled
When pressing down on the last message or up on the first message in chat navigation, stay on the current message instead of exiting message selection mode. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
3234607bcd
commit
f8aab8232a
1 file changed
+4
-8
@@ -110,17 +110,13 @@ impl<T: TdClientTrait> MessageMethods<T> for App<T> {
|
||||
}
|
||||
}
|
||||
|
||||
if new_index >= total {
|
||||
self.chat_state = ChatState::Normal;
|
||||
} else {
|
||||
if new_index < total {
|
||||
*selected_index = new_index;
|
||||
}
|
||||
self.stop_playback();
|
||||
} else {
|
||||
// Дошли до самого нового сообщения - выходим из режима выбора
|
||||
self.chat_state = ChatState::Normal;
|
||||
self.stop_playback();
|
||||
}
|
||||
// Если new_index >= total — остаёмся на текущем
|
||||
}
|
||||
// Если уже на последнем — ничего не делаем, остаёмся на месте
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user