style: auto-format entire codebase with cargo fmt (stable rustfmt.toml)
Some checks failed
ci/woodpecker/pr/check Pipeline failed
CI / Check (pull_request) Has been cancelled
CI / Format (pull_request) Has been cancelled
CI / Clippy (pull_request) Has been cancelled
CI / Build (macos-latest) (pull_request) Has been cancelled
CI / Build (ubuntu-latest) (pull_request) Has been cancelled
CI / Build (windows-latest) (pull_request) Has been cancelled
Some checks failed
ci/woodpecker/pr/check Pipeline failed
CI / Check (pull_request) Has been cancelled
CI / Format (pull_request) Has been cancelled
CI / Clippy (pull_request) Has been cancelled
CI / Build (macos-latest) (pull_request) Has been cancelled
CI / Build (ubuntu-latest) (pull_request) Has been cancelled
CI / Build (windows-latest) (pull_request) Has been cancelled
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
//!
|
||||
//! Handles reply, forward, and draft functionality
|
||||
|
||||
use crate::app::{App, ChatState};
|
||||
use crate::app::methods::messages::MessageMethods;
|
||||
use crate::app::{App, ChatState};
|
||||
use crate::tdlib::{MessageInfo, TdClientTrait};
|
||||
|
||||
/// Compose methods for reply/forward/draft
|
||||
@@ -44,9 +44,7 @@ pub trait ComposeMethods<T: TdClientTrait> {
|
||||
impl<T: TdClientTrait> ComposeMethods<T> for App<T> {
|
||||
fn start_reply_to_selected(&mut self) -> bool {
|
||||
if let Some(msg) = self.get_selected_message() {
|
||||
self.chat_state = ChatState::Reply {
|
||||
message_id: msg.id(),
|
||||
};
|
||||
self.chat_state = ChatState::Reply { message_id: msg.id() };
|
||||
return true;
|
||||
}
|
||||
false
|
||||
@@ -72,9 +70,7 @@ impl<T: TdClientTrait> ComposeMethods<T> for App<T> {
|
||||
|
||||
fn start_forward_selected(&mut self) -> bool {
|
||||
if let Some(msg) = self.get_selected_message() {
|
||||
self.chat_state = ChatState::Forward {
|
||||
message_id: msg.id(),
|
||||
};
|
||||
self.chat_state = ChatState::Forward { message_id: msg.id() };
|
||||
// Сбрасываем выбор чата на первый
|
||||
self.chat_list_state.select(Some(0));
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user