Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: works slowly #56

Open
hosseinnedaee opened this issue Sep 1, 2024 · 24 comments
Open

[bug]: works slowly #56

hosseinnedaee opened this issue Sep 1, 2024 · 24 comments
Labels
bug Something isn't working

Comments

@hosseinnedaee
Copy link

Describe the bug

It works very slowly and the CPU is 100%

Reproduction steps

  1. cargo run

Expected behavior

working smoothly

Logs and screenshots

Screenshot_2024-09-01_10-00-41

Method of Installation

Cargo

tgt version

1.0.0

Operating System (including version and architecture)

6.6.44-1-MANJARO

Terminal and Command Line Interface (CLI) (including versions)

No response

rustc and rustup target (including versions)

rustc 1.80.1 rustup 1.27.1

@hosseinnedaee hosseinnedaee added the bug Something isn't working label Sep 1, 2024
@FedericoBruzzone
Copy link
Owner

thanks for reporting this bug!

Two questions:

  1. Are you logged in?
  2. It's not in release right?

@hosseinnedaee
Copy link
Author

You're welcome. Thanks for this interesting app!

  1. Yes, I've logged in and can see my chats.
  2. I'm using cargo run

@FedericoBruzzone
Copy link
Owner

Thank you! :D

First of all, try using cargo run --release.

Anyway, can you send me the content of:

  • .data/logs/<latest_run>.log
  • .data/tdlib_rs.log

@hosseinnedaee
Copy link
Author

By using cargo run --release I'm getting this error:

error: failed to run custom build command for `tdlib-rs v1.0.5`

Caused by:
  process didn't exit successfully: `/home/hossein/projects/tmp/tgt/target/release/build/tdlib-rs-f3b1968d0929a8ba/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=build.rs

  --- stderr
  thread 'main' panicked at /home/hossein/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tdlib-rs-1.0.5/build.rs:163:40:
  called `Result::unwrap()` on an `Err` value: reqwest::Error { kind: Decode, source: TimedOut }
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `tdlib-rs v1.0.5`

Caused by:
  process didn't exit successfully: `/home/hossein/projects/tmp/tgt/target/release/build/tdlib-rs-f3b1968d0929a8ba/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=build.rs

  --- stderr
  thread 'main' panicked at /home/hossein/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tdlib-rs-1.0.5/build.rs:163:40:
  called `Result::unwrap()` on an `Err` value: reqwest::Error { kind: Decode, source: TimedOut }
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The requested logs:

  • tgt.log.2024-09-01
2024-09-01T09:54:07.114733Z  INFO tgt: src/main.rs:69: Logger initialized with config: Logger { log_dir: "/home/hossein/projects/tmp/tgt/.data/logs", log_file: "tgt.log", rotation_frequency: Rotation(Daily), max_old_log_files: 7, log_level: "info" }
2024-09-01T09:54:07.114896Z  INFO tgt: src/main.rs:72: Keymap config: KeymapConfig { core_window: {Key(Char('2'), KeyModifiers(ALT)): Single { action: FocusComponent(Chat), description: Some("Focus the chat") }, Key(Char('3'), KeyModifiers(ALT)): Single { action: FocusComponent(Prompt), description: Some("Focus the prompt") }, Key(Left, KeyModifiers(ALT)): Single { action: FocusComponent(ChatList), description: Some("Focus the chat list") }, Key(Char('k'), KeyModifiers(ALT)): Single { action: IncreasePromptSize, description: Some("Increase the prompt size") }, Key(Char('q'), KeyModifiers(0x0)): Single { action: TryQuit, description: Some("Quit the application") }, Key(Char('c'), KeyModifiers(CONTROL)): Single { action: TryQuit, description: Some("Quit the application") }, Key(Esc, KeyModifiers(0x0)): Single { action: UnfocusComponent, description: Some("Unfocus the current component") }, Key(Char('n'), KeyModifiers(ALT)): Single { action: ToggleChatList, description: Some("Toggle chat_list visibility") }, Key(Right, KeyModifiers(ALT)): Single { action: FocusComponent(Chat), description: Some("Focus the chat") }, Key(Up, KeyModifiers(ALT)): Single { action: UnfocusComponent, description: Some("Unfocus the current component") }, Key(Char('1'), KeyModifiers(ALT)): Single { action: FocusComponent(ChatList), description: Some("Focus the chat list") }, Key(Char('l'), KeyModifiers(ALT)): Single { action: IncreaseChatListSize, description: Some("Increase the chat list size") }, Key(Char('h'), KeyModifiers(ALT)): Single { action: DecreaseChatListSize, description: Some("Decrease the chat list size") }, Key(Down, KeyModifiers(ALT)): Single { action: FocusComponent(Prompt), description: Some("Focus the prompt") }, Key(Char('j'), KeyModifiers(ALT)): Single { action: DecreasePromptSize, description: Some("Decrease the prompt size") }}, chat_list: {Key(Up, KeyModifiers(0x0)): Single { action: ChatListPrevious, description: Some("Select the previous chat") }, Key(Left, KeyModifiers(0x0)): Single { action: ChatListUnselect, description: Some("Unselect the current chat") }, Key(Down, KeyModifiers(0x0)): Single { action: ChatListNext, description: Some("Select the next chat") }, Key(Enter, KeyModifiers(0x0)): Single { action: ChatListOpen, description: Some("Open the selected chat") }, Key(Right, KeyModifiers(0x0)): Single { action: ChatListOpen, description: Some("Open the selected chat") }}, chat: {Key(Char('y'), KeyModifiers(0x0)): Single { action: ChatWindowCopy, description: Some("Copy the selected message") }, Key(Down, KeyModifiers(0x0)): Single { action: ChatWindowNext, description: Some("Select the next message") }, Key(Up, KeyModifiers(0x0)): Single { action: ChatWindowPrevious, description: Some("Select the previous message") }, Key(Char('D'), KeyModifiers(0x0)): Single { action: ChatWindowDeleteForMe, description: Some("Delete the selected message for 'me'") }, Key(Char('c'), KeyModifiers(CONTROL)): Single { action: ChatWindowCopy, description: Some("Copy the selected message") }, Key(Char('e'), KeyModifiers(0x0)): Single { action: ChatWindowEdit, description: Some("Edit the selected message") }, Key(Char('d'), KeyModifiers(0x0)): Single { action: ChatWindowDeleteForEveryone, description: Some("Delete the selected message for all users") }, Key(Left, KeyModifiers(0x0)): Single { action: ChatWindowUnselect, description: Some("Unselect the current message") }, Key(Char('r'), KeyModifiers(0x0)): Single { action: ShowChatWindowReply, description: Some("Reply to the selected message") }}, prompt: {} }
2024-09-01T09:54:07.114986Z  INFO tgt: src/main.rs:75: App config: AppConfig { mouse_support: true, paste_support: true, frame_rate: 60.0, show_status_bar: true, show_title_bar: true, theme_enable: true, theme_filename: "theme.toml", take_api_id_from_telegram_config: true, take_api_hash_from_telegram_config: true }
2024-09-01T09:54:07.115022Z  INFO tgt: src/main.rs:78: Palette config: PaletteConfig { palette: {"primary": Rgb(84, 84, 84), "primary_dark": Rgb(61, 61, 61), "highlight_two": Rgb(138, 53, 148), "background_two": Rgb(18, 18, 18), "primary_light": Rgb(225, 225, 225), "white": Rgb(255, 255, 255), "secondary_light": Rgb(192, 211, 240), "background_three": Rgb(36, 36, 36), "background": Rgb(0, 0, 0), "ternary": Rgb(199, 81, 8), "ternary_light": Rgb(240, 210, 197), "highlight_one": Rgb(236, 91, 252), "black": Rgb(0, 0, 0), "secondary": Rgb(7, 103, 163), "secondary_dark": Rgb(95, 117, 143), "ternary_dark": Rgb(138, 57, 7)} }
2024-09-01T09:54:07.115098Z  INFO tgt: src/main.rs:81: Theme config: ThemeConfig { common: {"item_selected": ThemeStyle { fg: None, bg: Some(Rgb(18, 18, 18)), modifier: BOLD }, "border_component_focused": ThemeStyle { fg: Some(Rgb(236, 91, 252)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "timestamp": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, chat_list: {"item_selected": ThemeStyle { fg: None, bg: Some(Rgb(18, 18, 18)), modifier: NONE }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "item_unread_counter": ThemeStyle { fg: Some(Rgb(138, 53, 148)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "item_message_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "item_chat_name": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }}, chat: {"message_other_content": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_myself_reply_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_other_reply_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_reply_text": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_myself_reply_name": ThemeStyle { fg: Some(Rgb(138, 57, 7)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_myself_name": ThemeStyle { fg: Some(Rgb(7, 103, 163)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_other_reply_name": ThemeStyle { fg: Some(Rgb(95, 117, 143)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "chat_name": ThemeStyle { fg: Some(Rgb(199, 81, 8)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_myself_content": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_other_name": ThemeStyle { fg: Some(Rgb(199, 81, 8)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }}, prompt: {"message_text": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_preview_text": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_text_selected": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(36, 36, 36)), modifier: ITALIC }}, status_bar: {"message_quit_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_quit_key": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "size_info_numbers": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "press_key_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "press_key_key": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "open_chat_name": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "size_info_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "open_chat_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, title_bar: {"self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "title2": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | ITALIC | UNDERLINED }, "title1": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | ITALIC | UNDERLINED }, "title3": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | UNDERLINED }}, reply_message: {"self": ThemeStyle { fg: Some(Rgb(138, 53, 148)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_text": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }} }
2024-09-01T09:54:07.115223Z  INFO tgt: src/main.rs:84: Telegram config: TelegramConfig { api_id: "94575", api_hash: "a3406de8d171bb422bb6ddf3bbd800e2", database_dir: "/home/hossein/projects/tmp/tgt/.data/tg", use_file_database: true, use_chat_info_database: true, use_message_database: true, system_language_code: "en", device_model: "Desktop", verbosity_level: 2, log_path: "/home/hossein/projects/tmp/tgt/.data/tdlib_rs/tdlib_rs.log", redirect_stderr: false }
2024-09-01T09:54:07.115250Z  INFO tgt: src/main.rs:91: Telegram context: TgContext { users: Mutex { data: {}, poisoned: false, .. }, basic_groups: Mutex { data: {}, poisoned: false, .. }, supergroups: Mutex { data: {}, poisoned: false, .. }, secret_chats: Mutex { data: {}, poisoned: false, .. }, chats: Mutex { data: {}, poisoned: false, .. }, chats_index: Mutex { data: {}, poisoned: false, .. }, users_full_info: Mutex { data: {}, poisoned: false, .. }, basic_groups_full_info: Mutex { data: {}, poisoned: false, .. }, supergroups_full_info: Mutex { data: {}, poisoned: false, .. }, event_tx: Mutex { data: None, poisoned: false, .. }, me: 0, open_chat_id: 0, open_chat_messages: Mutex { data: [], poisoned: false, .. }, open_chat_user: Mutex { data: None, poisoned: false, .. }, last_acknowledged_message_id: 0, from_message_id: 0, reply_message_id: 0, reply_message_text: Mutex { data: "", poisoned: false, .. } }
2024-09-01T09:54:07.115294Z  INFO tgt: src/main.rs:101: App context: AppContext { app_config: Mutex { data: AppConfig { mouse_support: true, paste_support: true, frame_rate: 60.0, show_status_bar: true, show_title_bar: true, theme_enable: true, theme_filename: "theme.toml", take_api_id_from_telegram_config: true, take_api_hash_from_telegram_config: true }, poisoned: false, .. }, keymap_config: Mutex { data: KeymapConfig { core_window: {Key(Char('2'), KeyModifiers(ALT)): Single { action: FocusComponent(Chat), description: Some("Focus the chat") }, Key(Char('3'), KeyModifiers(ALT)): Single { action: FocusComponent(Prompt), description: Some("Focus the prompt") }, Key(Left, KeyModifiers(ALT)): Single { action: FocusComponent(ChatList), description: Some("Focus the chat list") }, Key(Char('k'), KeyModifiers(ALT)): Single { action: IncreasePromptSize, description: Some("Increase the prompt size") }, Key(Char('q'), KeyModifiers(0x0)): Single { action: TryQuit, description: Some("Quit the application") }, Key(Char('c'), KeyModifiers(CONTROL)): Single { action: TryQuit, description: Some("Quit the application") }, Key(Esc, KeyModifiers(0x0)): Single { action: UnfocusComponent, description: Some("Unfocus the current component") }, Key(Char('n'), KeyModifiers(ALT)): Single { action: ToggleChatList, description: Some("Toggle chat_list visibility") }, Key(Right, KeyModifiers(ALT)): Single { action: FocusComponent(Chat), description: Some("Focus the chat") }, Key(Up, KeyModifiers(ALT)): Single { action: UnfocusComponent, description: Some("Unfocus the current component") }, Key(Char('1'), KeyModifiers(ALT)): Single { action: FocusComponent(ChatList), description: Some("Focus the chat list") }, Key(Char('l'), KeyModifiers(ALT)): Single { action: IncreaseChatListSize, description: Some("Increase the chat list size") }, Key(Char('h'), KeyModifiers(ALT)): Single { action: DecreaseChatListSize, description: Some("Decrease the chat list size") }, Key(Down, KeyModifiers(ALT)): Single { action: FocusComponent(Prompt), description: Some("Focus the prompt") }, Key(Char('j'), KeyModifiers(ALT)): Single { action: DecreasePromptSize, description: Some("Decrease the prompt size") }}, chat_list: {Key(Up, KeyModifiers(0x0)): Single { action: ChatListPrevious, description: Some("Select the previous chat") }, Key(Left, KeyModifiers(0x0)): Single { action: ChatListUnselect, description: Some("Unselect the current chat") }, Key(Down, KeyModifiers(0x0)): Single { action: ChatListNext, description: Some("Select the next chat") }, Key(Enter, KeyModifiers(0x0)): Single { action: ChatListOpen, description: Some("Open the selected chat") }, Key(Right, KeyModifiers(0x0)): Single { action: ChatListOpen, description: Some("Open the selected chat") }}, chat: {Key(Char('y'), KeyModifiers(0x0)): Single { action: ChatWindowCopy, description: Some("Copy the selected message") }, Key(Down, KeyModifiers(0x0)): Single { action: ChatWindowNext, description: Some("Select the next message") }, Key(Up, KeyModifiers(0x0)): Single { action: ChatWindowPrevious, description: Some("Select the previous message") }, Key(Char('D'), KeyModifiers(0x0)): Single { action: ChatWindowDeleteForMe, description: Some("Delete the selected message for 'me'") }, Key(Char('c'), KeyModifiers(CONTROL)): Single { action: ChatWindowCopy, description: Some("Copy the selected message") }, Key(Char('e'), KeyModifiers(0x0)): Single { action: ChatWindowEdit, description: Some("Edit the selected message") }, Key(Char('d'), KeyModifiers(0x0)): Single { action: ChatWindowDeleteForEveryone, description: Some("Delete the selected message for all users") }, Key(Left, KeyModifiers(0x0)): Single { action: ChatWindowUnselect, description: Some("Unselect the current message") }, Key(Char('r'), KeyModifiers(0x0)): Single { action: ShowChatWindowReply, description: Some("Reply to the selected message") }}, prompt: {} }, poisoned: false, .. }, theme_config: Mutex { data: ThemeConfig { common: {"item_selected": ThemeStyle { fg: None, bg: Some(Rgb(18, 18, 18)), modifier: BOLD }, "border_component_focused": ThemeStyle { fg: Some(Rgb(236, 91, 252)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "timestamp": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, chat_list: {"item_selected": ThemeStyle { fg: None, bg: Some(Rgb(18, 18, 18)), modifier: NONE }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "item_unread_counter": ThemeStyle { fg: Some(Rgb(138, 53, 148)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "item_message_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "item_chat_name": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }}, chat: {"message_other_content": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_myself_reply_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_other_reply_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_reply_text": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_myself_reply_name": ThemeStyle { fg: Some(Rgb(138, 57, 7)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_myself_name": ThemeStyle { fg: Some(Rgb(7, 103, 163)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_other_reply_name": ThemeStyle { fg: Some(Rgb(95, 117, 143)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "chat_name": ThemeStyle { fg: Some(Rgb(199, 81, 8)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_myself_content": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_other_name": ThemeStyle { fg: Some(Rgb(199, 81, 8)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }}, prompt: {"message_text": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_preview_text": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_text_selected": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(36, 36, 36)), modifier: ITALIC }}, status_bar: {"message_quit_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_quit_key": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "size_info_numbers": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "press_key_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "press_key_key": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "open_chat_name": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "size_info_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "open_chat_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, title_bar: {"self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "title2": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | ITALIC | UNDERLINED }, "title1": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | ITALIC | UNDERLINED }, "title3": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | UNDERLINED }}, reply_message: {"self": ThemeStyle { fg: Some(Rgb(138, 53, 148)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_text": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }} }, poisoned: false, .. }, palette_config: Mutex { data: PaletteConfig { palette: {"primary": Rgb(84, 84, 84), "primary_dark": Rgb(61, 61, 61), "highlight_two": Rgb(138, 53, 148), "background_two": Rgb(18, 18, 18), "primary_light": Rgb(225, 225, 225), "white": Rgb(255, 255, 255), "secondary_light": Rgb(192, 211, 240), "background_three": Rgb(36, 36, 36), "background": Rgb(0, 0, 0), "ternary": Rgb(199, 81, 8), "ternary_light": Rgb(240, 210, 197), "highlight_one": Rgb(236, 91, 252), "black": Rgb(0, 0, 0), "secondary": Rgb(7, 103, 163), "secondary_dark": Rgb(95, 117, 143), "ternary_dark": Rgb(138, 57, 7)} }, poisoned: false, .. }, tg_config: Mutex { data: TelegramConfig { api_id: "94575", api_hash: "a3406de8d171bb422bb6ddf3bbd800e2", database_dir: "/home/hossein/projects/tmp/tgt/.data/tg", use_file_database: true, use_chat_info_database: true, use_message_database: true, system_language_code: "en", device_model: "Desktop", verbosity_level: 2, log_path: "/home/hossein/projects/tmp/tgt/.data/tdlib_rs/tdlib_rs.log", redirect_stderr: false }, poisoned: false, .. }, action_tx: Mutex { data: UnboundedSender { chan: Tx { inner: Chan { tx: Tx { block_tail: 0x55fd04e119e0, tail_position: 0 }, semaphore: Semaphore(0), rx_waker: AtomicWaker, tx_count: 1, rx_fields: "..." } } }, poisoned: false, .. }, action_rx: Mutex { data: UnboundedReceiver { chan: Rx { inner: Chan { tx: Tx { block_tail: 0x55fd04e119e0, tail_position: 0 }, semaphore: Semaphore(0), rx_waker: AtomicWaker, tx_count: 1, rx_fields: "..." } } }, poisoned: false, .. }, quit: false, tg_context: TgContext { users: Mutex { data: {}, poisoned: false, .. }, basic_groups: Mutex { data: {}, poisoned: false, .. }, supergroups: Mutex { data: {}, poisoned: false, .. }, secret_chats: Mutex { data: {}, poisoned: false, .. }, chats: Mutex { data: {}, poisoned: false, .. }, chats_index: Mutex { data: {}, poisoned: false, .. }, users_full_info: Mutex { data: {}, poisoned: false, .. }, basic_groups_full_info: Mutex { data: {}, poisoned: false, .. }, supergroups_full_info: Mutex { data: {}, poisoned: false, .. }, event_tx: Mutex { data: None, poisoned: false, .. }, me: 0, open_chat_id: 0, open_chat_messages: Mutex { data: [], poisoned: false, .. }, open_chat_user: Mutex { data: None, poisoned: false, .. }, last_acknowledged_message_id: 0, from_message_id: 0, reply_message_id: 0, reply_message_text: Mutex { data: "", poisoned: false, .. } }, cli_args: Mutex { data: CliArgs { telegram_cli: TelegramCli { logout: false, send_message: None } }, poisoned: false, .. } }
2024-09-01T09:54:07.115490Z  INFO tgt::tui_backend: src/tui_backend.rs:57: Creating TuiBackend
2024-09-01T09:54:07.115908Z  INFO tgt: src/main.rs:104: Tui backend initialized
2024-09-01T09:54:07.123238Z  INFO tgt: src/main.rs:107: Tui initialized
2024-09-01T09:54:07.123267Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:34: Creating TgBackend
2024-09-01T09:54:07.123319Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:43: Created TDLib client with client_id: 1
2024-09-01T09:54:07.123340Z  INFO tgt: src/main.rs:109: Telegram backend initialized
2024-09-01T09:54:07.123358Z  INFO tgt::run: src/run.rs:29: Starting run_app
2024-09-01T09:54:07.123595Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:529: Starting handling updates from TDLib
2024-09-01T09:54:07.125237Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:306: Handling authorization state
2024-09-01T09:54:52.772052Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:248: Quick ack enabled
2024-09-01T09:54:54.543312Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:267: Went online
2024-09-01T09:54:54.543613Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:287: Animated emoji set to: true
2024-09-01T09:54:54.543660Z  INFO tgt::tui_backend: src/tui_backend.rs:83: Raw mode enabled
2024-09-01T09:54:54.543698Z  INFO tgt::tui_backend: src/tui_backend.rs:91: Alternate screen enabled
2024-09-01T09:57:03.543122Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:273: Went offline
2024-09-01T09:57:03.543349Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:100: TDLib client closed: ()
2024-09-01T09:57:03.543416Z  INFO tgt::tui_backend: src/tui_backend.rs:117: Raw mode disabled
2024-09-01T09:57:03.543475Z  INFO tgt::tui_backend: src/tui_backend.rs:119: Alternate screen disabled
2024-09-01T09:57:03.543498Z  INFO tgt::tui_backend: src/tui_backend.rs:122: Mouse disabled
2024-09-01T09:57:03.543520Z  INFO tgt::tui_backend: src/tui_backend.rs:126: Paste disabled
2024-09-01T09:57:03.543551Z  INFO tgt::tui_backend: src/tui_backend.rs:138: Tui backend exited
2024-09-01T09:57:03.543586Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:306: Handling authorization state
2024-09-01T09:57:03.543608Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:453: Closing
2024-09-01T09:57:03.555114Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:456: Closed
2024-09-01T09:57:03.555185Z  INFO tgt::run: src/run.rs:67: Quitting
2024-09-01T09:57:03.555206Z  INFO tgt: src/main.rs:120: Application exited successfully
2024-09-01T09:58:04.333636Z  INFO tgt: src/main.rs:69: Logger initialized with config: Logger { log_dir: "/home/hossein/projects/tmp/tgt/.data/logs", log_file: "tgt.log", rotation_frequency: Rotation(Daily), max_old_log_files: 7, log_level: "info" }
2024-09-01T09:58:04.333749Z  INFO tgt: src/main.rs:72: Keymap config: KeymapConfig { core_window: {Key(Char('q'), KeyModifiers(0x0)): Single { action: TryQuit, description: Some("Quit the application") }, Key(Char('1'), KeyModifiers(ALT)): Single { action: FocusComponent(ChatList), description: Some("Focus the chat list") }, Key(Char('3'), KeyModifiers(ALT)): Single { action: FocusComponent(Prompt), description: Some("Focus the prompt") }, Key(Down, KeyModifiers(ALT)): Single { action: FocusComponent(Prompt), description: Some("Focus the prompt") }, Key(Left, KeyModifiers(ALT)): Single { action: FocusComponent(ChatList), description: Some("Focus the chat list") }, Key(Char('l'), KeyModifiers(ALT)): Single { action: IncreaseChatListSize, description: Some("Increase the chat list size") }, Key(Esc, KeyModifiers(0x0)): Single { action: UnfocusComponent, description: Some("Unfocus the current component") }, Key(Char('n'), KeyModifiers(ALT)): Single { action: ToggleChatList, description: Some("Toggle chat_list visibility") }, Key(Char('j'), KeyModifiers(ALT)): Single { action: DecreasePromptSize, description: Some("Decrease the prompt size") }, Key(Up, KeyModifiers(ALT)): Single { action: UnfocusComponent, description: Some("Unfocus the current component") }, Key(Char('h'), KeyModifiers(ALT)): Single { action: DecreaseChatListSize, description: Some("Decrease the chat list size") }, Key(Right, KeyModifiers(ALT)): Single { action: FocusComponent(Chat), description: Some("Focus the chat") }, Key(Char('c'), KeyModifiers(CONTROL)): Single { action: TryQuit, description: Some("Quit the application") }, Key(Char('2'), KeyModifiers(ALT)): Single { action: FocusComponent(Chat), description: Some("Focus the chat") }, Key(Char('k'), KeyModifiers(ALT)): Single { action: IncreasePromptSize, description: Some("Increase the prompt size") }}, chat_list: {Key(Left, KeyModifiers(0x0)): Single { action: ChatListUnselect, description: Some("Unselect the current chat") }, Key(Down, KeyModifiers(0x0)): Single { action: ChatListNext, description: Some("Select the next chat") }, Key(Right, KeyModifiers(0x0)): Single { action: ChatListOpen, description: Some("Open the selected chat") }, Key(Up, KeyModifiers(0x0)): Single { action: ChatListPrevious, description: Some("Select the previous chat") }, Key(Enter, KeyModifiers(0x0)): Single { action: ChatListOpen, description: Some("Open the selected chat") }}, chat: {Key(Char('c'), KeyModifiers(CONTROL)): Single { action: ChatWindowCopy, description: Some("Copy the selected message") }, Key(Char('r'), KeyModifiers(0x0)): Single { action: ShowChatWindowReply, description: Some("Reply to the selected message") }, Key(Left, KeyModifiers(0x0)): Single { action: ChatWindowUnselect, description: Some("Unselect the current message") }, Key(Char('D'), KeyModifiers(0x0)): Single { action: ChatWindowDeleteForMe, description: Some("Delete the selected message for 'me'") }, Key(Down, KeyModifiers(0x0)): Single { action: ChatWindowNext, description: Some("Select the next message") }, Key(Char('d'), KeyModifiers(0x0)): Single { action: ChatWindowDeleteForEveryone, description: Some("Delete the selected message for all users") }, Key(Char('e'), KeyModifiers(0x0)): Single { action: ChatWindowEdit, description: Some("Edit the selected message") }, Key(Up, KeyModifiers(0x0)): Single { action: ChatWindowPrevious, description: Some("Select the previous message") }, Key(Char('y'), KeyModifiers(0x0)): Single { action: ChatWindowCopy, description: Some("Copy the selected message") }}, prompt: {} }
2024-09-01T09:58:04.333842Z  INFO tgt: src/main.rs:75: App config: AppConfig { mouse_support: true, paste_support: true, frame_rate: 60.0, show_status_bar: true, show_title_bar: true, theme_enable: true, theme_filename: "theme.toml", take_api_id_from_telegram_config: true, take_api_hash_from_telegram_config: true }
2024-09-01T09:58:04.333868Z  INFO tgt: src/main.rs:78: Palette config: PaletteConfig { palette: {"ternary_dark": Rgb(138, 57, 7), "primary_light": Rgb(225, 225, 225), "secondary_dark": Rgb(95, 117, 143), "highlight_two": Rgb(138, 53, 148), "background_three": Rgb(36, 36, 36), "background": Rgb(0, 0, 0), "background_two": Rgb(18, 18, 18), "primary_dark": Rgb(61, 61, 61), "ternary_light": Rgb(240, 210, 197), "ternary": Rgb(199, 81, 8), "black": Rgb(0, 0, 0), "highlight_one": Rgb(236, 91, 252), "primary": Rgb(84, 84, 84), "secondary": Rgb(7, 103, 163), "white": Rgb(255, 255, 255), "secondary_light": Rgb(192, 211, 240)} }
2024-09-01T09:58:04.333907Z  INFO tgt: src/main.rs:81: Theme config: ThemeConfig { common: {"timestamp": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "border_component_focused": ThemeStyle { fg: Some(Rgb(236, 91, 252)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "item_selected": ThemeStyle { fg: None, bg: Some(Rgb(18, 18, 18)), modifier: BOLD }}, chat_list: {"item_message_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "item_unread_counter": ThemeStyle { fg: Some(Rgb(138, 53, 148)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "item_chat_name": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "item_selected": ThemeStyle { fg: None, bg: Some(Rgb(18, 18, 18)), modifier: NONE }}, chat: {"message_other_name": ThemeStyle { fg: Some(Rgb(199, 81, 8)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_other_reply_name": ThemeStyle { fg: Some(Rgb(95, 117, 143)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_myself_content": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_other_reply_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "chat_name": ThemeStyle { fg: Some(Rgb(199, 81, 8)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_myself_reply_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_myself_name": ThemeStyle { fg: Some(Rgb(7, 103, 163)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_other_content": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_reply_text": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_myself_reply_name": ThemeStyle { fg: Some(Rgb(138, 57, 7)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, prompt: {"message_preview_text": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_text_selected": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(36, 36, 36)), modifier: ITALIC }, "message_text": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, status_bar: {"message_quit_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "press_key_key": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "open_chat_name": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "open_chat_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "size_info_numbers": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "message_quit_key": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "press_key_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "size_info_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, title_bar: {"title2": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | ITALIC | UNDERLINED }, "title1": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | ITALIC | UNDERLINED }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "title3": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | UNDERLINED }}, reply_message: {"self": ThemeStyle { fg: Some(Rgb(138, 53, 148)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_text": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }} }
2024-09-01T09:58:04.334015Z  INFO tgt: src/main.rs:84: Telegram config: TelegramConfig { api_id: "94575", api_hash: "a3406de8d171bb422bb6ddf3bbd800e2", database_dir: "/home/hossein/projects/tmp/tgt/.data/tg", use_file_database: true, use_chat_info_database: true, use_message_database: true, system_language_code: "en", device_model: "Desktop", verbosity_level: 2, log_path: "/home/hossein/projects/tmp/tgt/.data/tdlib_rs/tdlib_rs.log", redirect_stderr: false }
2024-09-01T09:58:04.334041Z  INFO tgt: src/main.rs:91: Telegram context: TgContext { users: Mutex { data: {}, poisoned: false, .. }, basic_groups: Mutex { data: {}, poisoned: false, .. }, supergroups: Mutex { data: {}, poisoned: false, .. }, secret_chats: Mutex { data: {}, poisoned: false, .. }, chats: Mutex { data: {}, poisoned: false, .. }, chats_index: Mutex { data: {}, poisoned: false, .. }, users_full_info: Mutex { data: {}, poisoned: false, .. }, basic_groups_full_info: Mutex { data: {}, poisoned: false, .. }, supergroups_full_info: Mutex { data: {}, poisoned: false, .. }, event_tx: Mutex { data: None, poisoned: false, .. }, me: 0, open_chat_id: 0, open_chat_messages: Mutex { data: [], poisoned: false, .. }, open_chat_user: Mutex { data: None, poisoned: false, .. }, last_acknowledged_message_id: 0, from_message_id: 0, reply_message_id: 0, reply_message_text: Mutex { data: "", poisoned: false, .. } }
2024-09-01T09:58:04.334088Z  INFO tgt: src/main.rs:101: App context: AppContext { app_config: Mutex { data: AppConfig { mouse_support: true, paste_support: true, frame_rate: 60.0, show_status_bar: true, show_title_bar: true, theme_enable: true, theme_filename: "theme.toml", take_api_id_from_telegram_config: true, take_api_hash_from_telegram_config: true }, poisoned: false, .. }, keymap_config: Mutex { data: KeymapConfig { core_window: {Key(Char('q'), KeyModifiers(0x0)): Single { action: TryQuit, description: Some("Quit the application") }, Key(Char('1'), KeyModifiers(ALT)): Single { action: FocusComponent(ChatList), description: Some("Focus the chat list") }, Key(Char('3'), KeyModifiers(ALT)): Single { action: FocusComponent(Prompt), description: Some("Focus the prompt") }, Key(Down, KeyModifiers(ALT)): Single { action: FocusComponent(Prompt), description: Some("Focus the prompt") }, Key(Left, KeyModifiers(ALT)): Single { action: FocusComponent(ChatList), description: Some("Focus the chat list") }, Key(Char('l'), KeyModifiers(ALT)): Single { action: IncreaseChatListSize, description: Some("Increase the chat list size") }, Key(Esc, KeyModifiers(0x0)): Single { action: UnfocusComponent, description: Some("Unfocus the current component") }, Key(Char('n'), KeyModifiers(ALT)): Single { action: ToggleChatList, description: Some("Toggle chat_list visibility") }, Key(Char('j'), KeyModifiers(ALT)): Single { action: DecreasePromptSize, description: Some("Decrease the prompt size") }, Key(Up, KeyModifiers(ALT)): Single { action: UnfocusComponent, description: Some("Unfocus the current component") }, Key(Char('h'), KeyModifiers(ALT)): Single { action: DecreaseChatListSize, description: Some("Decrease the chat list size") }, Key(Right, KeyModifiers(ALT)): Single { action: FocusComponent(Chat), description: Some("Focus the chat") }, Key(Char('c'), KeyModifiers(CONTROL)): Single { action: TryQuit, description: Some("Quit the application") }, Key(Char('2'), KeyModifiers(ALT)): Single { action: FocusComponent(Chat), description: Some("Focus the chat") }, Key(Char('k'), KeyModifiers(ALT)): Single { action: IncreasePromptSize, description: Some("Increase the prompt size") }}, chat_list: {Key(Left, KeyModifiers(0x0)): Single { action: ChatListUnselect, description: Some("Unselect the current chat") }, Key(Down, KeyModifiers(0x0)): Single { action: ChatListNext, description: Some("Select the next chat") }, Key(Right, KeyModifiers(0x0)): Single { action: ChatListOpen, description: Some("Open the selected chat") }, Key(Up, KeyModifiers(0x0)): Single { action: ChatListPrevious, description: Some("Select the previous chat") }, Key(Enter, KeyModifiers(0x0)): Single { action: ChatListOpen, description: Some("Open the selected chat") }}, chat: {Key(Char('c'), KeyModifiers(CONTROL)): Single { action: ChatWindowCopy, description: Some("Copy the selected message") }, Key(Char('r'), KeyModifiers(0x0)): Single { action: ShowChatWindowReply, description: Some("Reply to the selected message") }, Key(Left, KeyModifiers(0x0)): Single { action: ChatWindowUnselect, description: Some("Unselect the current message") }, Key(Char('D'), KeyModifiers(0x0)): Single { action: ChatWindowDeleteForMe, description: Some("Delete the selected message for 'me'") }, Key(Down, KeyModifiers(0x0)): Single { action: ChatWindowNext, description: Some("Select the next message") }, Key(Char('d'), KeyModifiers(0x0)): Single { action: ChatWindowDeleteForEveryone, description: Some("Delete the selected message for all users") }, Key(Char('e'), KeyModifiers(0x0)): Single { action: ChatWindowEdit, description: Some("Edit the selected message") }, Key(Up, KeyModifiers(0x0)): Single { action: ChatWindowPrevious, description: Some("Select the previous message") }, Key(Char('y'), KeyModifiers(0x0)): Single { action: ChatWindowCopy, description: Some("Copy the selected message") }}, prompt: {} }, poisoned: false, .. }, theme_config: Mutex { data: ThemeConfig { common: {"timestamp": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "border_component_focused": ThemeStyle { fg: Some(Rgb(236, 91, 252)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "item_selected": ThemeStyle { fg: None, bg: Some(Rgb(18, 18, 18)), modifier: BOLD }}, chat_list: {"item_message_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "item_unread_counter": ThemeStyle { fg: Some(Rgb(138, 53, 148)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "item_chat_name": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "item_selected": ThemeStyle { fg: None, bg: Some(Rgb(18, 18, 18)), modifier: NONE }}, chat: {"message_other_name": ThemeStyle { fg: Some(Rgb(199, 81, 8)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_other_reply_name": ThemeStyle { fg: Some(Rgb(95, 117, 143)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_myself_content": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_other_reply_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "chat_name": ThemeStyle { fg: Some(Rgb(199, 81, 8)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_myself_reply_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_myself_name": ThemeStyle { fg: Some(Rgb(7, 103, 163)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_other_content": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_reply_text": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_myself_reply_name": ThemeStyle { fg: Some(Rgb(138, 57, 7)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, prompt: {"message_preview_text": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_text_selected": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(36, 36, 36)), modifier: ITALIC }, "message_text": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, status_bar: {"message_quit_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "press_key_key": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "open_chat_name": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "open_chat_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "size_info_numbers": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "message_quit_key": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "press_key_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "size_info_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, title_bar: {"title2": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | ITALIC | UNDERLINED }, "title1": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | ITALIC | UNDERLINED }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "title3": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | UNDERLINED }}, reply_message: {"self": ThemeStyle { fg: Some(Rgb(138, 53, 148)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_text": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }} }, poisoned: false, .. }, palette_config: Mutex { data: PaletteConfig { palette: {"ternary_dark": Rgb(138, 57, 7), "primary_light": Rgb(225, 225, 225), "secondary_dark": Rgb(95, 117, 143), "highlight_two": Rgb(138, 53, 148), "background_three": Rgb(36, 36, 36), "background": Rgb(0, 0, 0), "background_two": Rgb(18, 18, 18), "primary_dark": Rgb(61, 61, 61), "ternary_light": Rgb(240, 210, 197), "ternary": Rgb(199, 81, 8), "black": Rgb(0, 0, 0), "highlight_one": Rgb(236, 91, 252), "primary": Rgb(84, 84, 84), "secondary": Rgb(7, 103, 163), "white": Rgb(255, 255, 255), "secondary_light": Rgb(192, 211, 240)} }, poisoned: false, .. }, tg_config: Mutex { data: TelegramConfig { api_id: "94575", api_hash: "a3406de8d171bb422bb6ddf3bbd800e2", database_dir: "/home/hossein/projects/tmp/tgt/.data/tg", use_file_database: true, use_chat_info_database: true, use_message_database: true, system_language_code: "en", device_model: "Desktop", verbosity_level: 2, log_path: "/home/hossein/projects/tmp/tgt/.data/tdlib_rs/tdlib_rs.log", redirect_stderr: false }, poisoned: false, .. }, action_tx: Mutex { data: UnboundedSender { chan: Tx { inner: Chan { tx: Tx { block_tail: 0x5617bbcc0040, tail_position: 0 }, semaphore: Semaphore(0), rx_waker: AtomicWaker, tx_count: 1, rx_fields: "..." } } }, poisoned: false, .. }, action_rx: Mutex { data: UnboundedReceiver { chan: Rx { inner: Chan { tx: Tx { block_tail: 0x5617bbcc0040, tail_position: 0 }, semaphore: Semaphore(0), rx_waker: AtomicWaker, tx_count: 1, rx_fields: "..." } } }, poisoned: false, .. }, quit: false, tg_context: TgContext { users: Mutex { data: {}, poisoned: false, .. }, basic_groups: Mutex { data: {}, poisoned: false, .. }, supergroups: Mutex { data: {}, poisoned: false, .. }, secret_chats: Mutex { data: {}, poisoned: false, .. }, chats: Mutex { data: {}, poisoned: false, .. }, chats_index: Mutex { data: {}, poisoned: false, .. }, users_full_info: Mutex { data: {}, poisoned: false, .. }, basic_groups_full_info: Mutex { data: {}, poisoned: false, .. }, supergroups_full_info: Mutex { data: {}, poisoned: false, .. }, event_tx: Mutex { data: None, poisoned: false, .. }, me: 0, open_chat_id: 0, open_chat_messages: Mutex { data: [], poisoned: false, .. }, open_chat_user: Mutex { data: None, poisoned: false, .. }, last_acknowledged_message_id: 0, from_message_id: 0, reply_message_id: 0, reply_message_text: Mutex { data: "", poisoned: false, .. } }, cli_args: Mutex { data: CliArgs { telegram_cli: TelegramCli { logout: false, send_message: None } }, poisoned: false, .. } }
2024-09-01T09:58:04.334282Z  INFO tgt::tui_backend: src/tui_backend.rs:57: Creating TuiBackend
2024-09-01T09:58:04.334704Z  INFO tgt: src/main.rs:104: Tui backend initialized
2024-09-01T09:58:04.347143Z  INFO tgt: src/main.rs:107: Tui initialized
2024-09-01T09:58:04.347175Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:34: Creating TgBackend
2024-09-01T09:58:04.347232Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:43: Created TDLib client with client_id: 1
2024-09-01T09:58:04.347253Z  INFO tgt: src/main.rs:109: Telegram backend initialized
2024-09-01T09:58:04.347269Z  INFO tgt::run: src/run.rs:29: Starting run_app
2024-09-01T09:58:04.347548Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:529: Starting handling updates from TDLib
2024-09-01T09:58:04.348926Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:306: Handling authorization state
2024-09-01T09:58:04.364893Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:248: Quick ack enabled
2024-09-01T09:58:04.395748Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:267: Went online
2024-09-01T09:58:04.395998Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:287: Animated emoji set to: true
2024-09-01T09:58:04.396053Z  INFO tgt::tui_backend: src/tui_backend.rs:83: Raw mode enabled
2024-09-01T09:58:04.396080Z  INFO tgt::tui_backend: src/tui_backend.rs:91: Alternate screen enabled
2024-09-01T10:08:45.667556Z  INFO tgt: src/main.rs:69: Logger initialized with config: Logger { log_dir: "/home/hossein/projects/tmp/tgt/.data/logs", log_file: "tgt.log", rotation_frequency: Rotation(Daily), max_old_log_files: 7, log_level: "info" }
2024-09-01T10:08:45.667668Z  INFO tgt: src/main.rs:72: Keymap config: KeymapConfig { core_window: {Key(Char('c'), KeyModifiers(CONTROL)): Single { action: TryQuit, description: Some("Quit the application") }, Key(Char('q'), KeyModifiers(0x0)): Single { action: TryQuit, description: Some("Quit the application") }, Key(Char('3'), KeyModifiers(ALT)): Single { action: FocusComponent(Prompt), description: Some("Focus the prompt") }, Key(Left, KeyModifiers(ALT)): Single { action: FocusComponent(ChatList), description: Some("Focus the chat list") }, Key(Char('2'), KeyModifiers(ALT)): Single { action: FocusComponent(Chat), description: Some("Focus the chat") }, Key(Up, KeyModifiers(ALT)): Single { action: UnfocusComponent, description: Some("Unfocus the current component") }, Key(Char('n'), KeyModifiers(ALT)): Single { action: ToggleChatList, description: Some("Toggle chat_list visibility") }, Key(Down, KeyModifiers(ALT)): Single { action: FocusComponent(Prompt), description: Some("Focus the prompt") }, Key(Char('h'), KeyModifiers(ALT)): Single { action: DecreaseChatListSize, description: Some("Decrease the chat list size") }, Key(Right, KeyModifiers(ALT)): Single { action: FocusComponent(Chat), description: Some("Focus the chat") }, Key(Esc, KeyModifiers(0x0)): Single { action: UnfocusComponent, description: Some("Unfocus the current component") }, Key(Char('l'), KeyModifiers(ALT)): Single { action: IncreaseChatListSize, description: Some("Increase the chat list size") }, Key(Char('1'), KeyModifiers(ALT)): Single { action: FocusComponent(ChatList), description: Some("Focus the chat list") }, Key(Char('k'), KeyModifiers(ALT)): Single { action: IncreasePromptSize, description: Some("Increase the prompt size") }, Key(Char('j'), KeyModifiers(ALT)): Single { action: DecreasePromptSize, description: Some("Decrease the prompt size") }}, chat_list: {Key(Right, KeyModifiers(0x0)): Single { action: ChatListOpen, description: Some("Open the selected chat") }, Key(Down, KeyModifiers(0x0)): Single { action: ChatListNext, description: Some("Select the next chat") }, Key(Up, KeyModifiers(0x0)): Single { action: ChatListPrevious, description: Some("Select the previous chat") }, Key(Left, KeyModifiers(0x0)): Single { action: ChatListUnselect, description: Some("Unselect the current chat") }, Key(Enter, KeyModifiers(0x0)): Single { action: ChatListOpen, description: Some("Open the selected chat") }}, chat: {Key(Down, KeyModifiers(0x0)): Single { action: ChatWindowNext, description: Some("Select the next message") }, Key(Up, KeyModifiers(0x0)): Single { action: ChatWindowPrevious, description: Some("Select the previous message") }, Key(Char('y'), KeyModifiers(0x0)): Single { action: ChatWindowCopy, description: Some("Copy the selected message") }, Key(Char('r'), KeyModifiers(0x0)): Single { action: ShowChatWindowReply, description: Some("Reply to the selected message") }, Key(Left, KeyModifiers(0x0)): Single { action: ChatWindowUnselect, description: Some("Unselect the current message") }, Key(Char('d'), KeyModifiers(0x0)): Single { action: ChatWindowDeleteForEveryone, description: Some("Delete the selected message for all users") }, Key(Char('D'), KeyModifiers(0x0)): Single { action: ChatWindowDeleteForMe, description: Some("Delete the selected message for 'me'") }, Key(Char('e'), KeyModifiers(0x0)): Single { action: ChatWindowEdit, description: Some("Edit the selected message") }, Key(Char('c'), KeyModifiers(CONTROL)): Single { action: ChatWindowCopy, description: Some("Copy the selected message") }}, prompt: {} }
2024-09-01T10:08:45.667760Z  INFO tgt: src/main.rs:75: App config: AppConfig { mouse_support: true, paste_support: true, frame_rate: 60.0, show_status_bar: true, show_title_bar: true, theme_enable: true, theme_filename: "theme.toml", take_api_id_from_telegram_config: true, take_api_hash_from_telegram_config: true }
2024-09-01T10:08:45.667793Z  INFO tgt: src/main.rs:78: Palette config: PaletteConfig { palette: {"secondary": Rgb(7, 103, 163), "ternary_light": Rgb(240, 210, 197), "background_three": Rgb(36, 36, 36), "primary": Rgb(84, 84, 84), "highlight_one": Rgb(236, 91, 252), "background_two": Rgb(18, 18, 18), "secondary_dark": Rgb(95, 117, 143), "black": Rgb(0, 0, 0), "highlight_two": Rgb(138, 53, 148), "secondary_light": Rgb(192, 211, 240), "background": Rgb(0, 0, 0), "primary_dark": Rgb(61, 61, 61), "primary_light": Rgb(225, 225, 225), "ternary_dark": Rgb(138, 57, 7), "white": Rgb(255, 255, 255), "ternary": Rgb(199, 81, 8)} }
2024-09-01T10:08:45.667833Z  INFO tgt: src/main.rs:81: Theme config: ThemeConfig { common: {"timestamp": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "item_selected": ThemeStyle { fg: None, bg: Some(Rgb(18, 18, 18)), modifier: BOLD }, "border_component_focused": ThemeStyle { fg: Some(Rgb(236, 91, 252)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, chat_list: {"self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "item_selected": ThemeStyle { fg: None, bg: Some(Rgb(18, 18, 18)), modifier: NONE }, "item_chat_name": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "item_unread_counter": ThemeStyle { fg: Some(Rgb(138, 53, 148)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "item_message_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }}, chat: {"message_reply_text": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_myself_reply_name": ThemeStyle { fg: Some(Rgb(138, 57, 7)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_myself_content": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_myself_name": ThemeStyle { fg: Some(Rgb(7, 103, 163)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_other_reply_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_other_content": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "chat_name": ThemeStyle { fg: Some(Rgb(199, 81, 8)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_myself_reply_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_other_name": ThemeStyle { fg: Some(Rgb(199, 81, 8)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_other_reply_name": ThemeStyle { fg: Some(Rgb(95, 117, 143)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, prompt: {"self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_preview_text": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_text_selected": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(36, 36, 36)), modifier: ITALIC }, "message_text": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, status_bar: {"press_key_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_quit_key": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "size_info_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "open_chat_name": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "message_quit_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "press_key_key": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "size_info_numbers": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "open_chat_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, title_bar: {"title3": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | UNDERLINED }, "title2": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | ITALIC | UNDERLINED }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "title1": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | ITALIC | UNDERLINED }}, reply_message: {"message_text": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "self": ThemeStyle { fg: Some(Rgb(138, 53, 148)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }} }
2024-09-01T10:08:45.667945Z  INFO tgt: src/main.rs:84: Telegram config: TelegramConfig { api_id: "94575", api_hash: "a3406de8d171bb422bb6ddf3bbd800e2", database_dir: "/home/hossein/projects/tmp/tgt/.data/tg", use_file_database: true, use_chat_info_database: true, use_message_database: true, system_language_code: "en", device_model: "Desktop", verbosity_level: 2, log_path: "/home/hossein/projects/tmp/tgt/.data/tdlib_rs/tdlib_rs.log", redirect_stderr: false }
2024-09-01T10:08:45.667970Z  INFO tgt: src/main.rs:91: Telegram context: TgContext { users: Mutex { data: {}, poisoned: false, .. }, basic_groups: Mutex { data: {}, poisoned: false, .. }, supergroups: Mutex { data: {}, poisoned: false, .. }, secret_chats: Mutex { data: {}, poisoned: false, .. }, chats: Mutex { data: {}, poisoned: false, .. }, chats_index: Mutex { data: {}, poisoned: false, .. }, users_full_info: Mutex { data: {}, poisoned: false, .. }, basic_groups_full_info: Mutex { data: {}, poisoned: false, .. }, supergroups_full_info: Mutex { data: {}, poisoned: false, .. }, event_tx: Mutex { data: None, poisoned: false, .. }, me: 0, open_chat_id: 0, open_chat_messages: Mutex { data: [], poisoned: false, .. }, open_chat_user: Mutex { data: None, poisoned: false, .. }, last_acknowledged_message_id: 0, from_message_id: 0, reply_message_id: 0, reply_message_text: Mutex { data: "", poisoned: false, .. } }
2024-09-01T10:08:45.668024Z  INFO tgt: src/main.rs:101: App context: AppContext { app_config: Mutex { data: AppConfig { mouse_support: true, paste_support: true, frame_rate: 60.0, show_status_bar: true, show_title_bar: true, theme_enable: true, theme_filename: "theme.toml", take_api_id_from_telegram_config: true, take_api_hash_from_telegram_config: true }, poisoned: false, .. }, keymap_config: Mutex { data: KeymapConfig { core_window: {Key(Char('c'), KeyModifiers(CONTROL)): Single { action: TryQuit, description: Some("Quit the application") }, Key(Char('q'), KeyModifiers(0x0)): Single { action: TryQuit, description: Some("Quit the application") }, Key(Char('3'), KeyModifiers(ALT)): Single { action: FocusComponent(Prompt), description: Some("Focus the prompt") }, Key(Left, KeyModifiers(ALT)): Single { action: FocusComponent(ChatList), description: Some("Focus the chat list") }, Key(Char('2'), KeyModifiers(ALT)): Single { action: FocusComponent(Chat), description: Some("Focus the chat") }, Key(Up, KeyModifiers(ALT)): Single { action: UnfocusComponent, description: Some("Unfocus the current component") }, Key(Char('n'), KeyModifiers(ALT)): Single { action: ToggleChatList, description: Some("Toggle chat_list visibility") }, Key(Down, KeyModifiers(ALT)): Single { action: FocusComponent(Prompt), description: Some("Focus the prompt") }, Key(Char('h'), KeyModifiers(ALT)): Single { action: DecreaseChatListSize, description: Some("Decrease the chat list size") }, Key(Right, KeyModifiers(ALT)): Single { action: FocusComponent(Chat), description: Some("Focus the chat") }, Key(Esc, KeyModifiers(0x0)): Single { action: UnfocusComponent, description: Some("Unfocus the current component") }, Key(Char('l'), KeyModifiers(ALT)): Single { action: IncreaseChatListSize, description: Some("Increase the chat list size") }, Key(Char('1'), KeyModifiers(ALT)): Single { action: FocusComponent(ChatList), description: Some("Focus the chat list") }, Key(Char('k'), KeyModifiers(ALT)): Single { action: IncreasePromptSize, description: Some("Increase the prompt size") }, Key(Char('j'), KeyModifiers(ALT)): Single { action: DecreasePromptSize, description: Some("Decrease the prompt size") }}, chat_list: {Key(Right, KeyModifiers(0x0)): Single { action: ChatListOpen, description: Some("Open the selected chat") }, Key(Down, KeyModifiers(0x0)): Single { action: ChatListNext, description: Some("Select the next chat") }, Key(Up, KeyModifiers(0x0)): Single { action: ChatListPrevious, description: Some("Select the previous chat") }, Key(Left, KeyModifiers(0x0)): Single { action: ChatListUnselect, description: Some("Unselect the current chat") }, Key(Enter, KeyModifiers(0x0)): Single { action: ChatListOpen, description: Some("Open the selected chat") }}, chat: {Key(Down, KeyModifiers(0x0)): Single { action: ChatWindowNext, description: Some("Select the next message") }, Key(Up, KeyModifiers(0x0)): Single { action: ChatWindowPrevious, description: Some("Select the previous message") }, Key(Char('y'), KeyModifiers(0x0)): Single { action: ChatWindowCopy, description: Some("Copy the selected message") }, Key(Char('r'), KeyModifiers(0x0)): Single { action: ShowChatWindowReply, description: Some("Reply to the selected message") }, Key(Left, KeyModifiers(0x0)): Single { action: ChatWindowUnselect, description: Some("Unselect the current message") }, Key(Char('d'), KeyModifiers(0x0)): Single { action: ChatWindowDeleteForEveryone, description: Some("Delete the selected message for all users") }, Key(Char('D'), KeyModifiers(0x0)): Single { action: ChatWindowDeleteForMe, description: Some("Delete the selected message for 'me'") }, Key(Char('e'), KeyModifiers(0x0)): Single { action: ChatWindowEdit, description: Some("Edit the selected message") }, Key(Char('c'), KeyModifiers(CONTROL)): Single { action: ChatWindowCopy, description: Some("Copy the selected message") }}, prompt: {} }, poisoned: false, .. }, theme_config: Mutex { data: ThemeConfig { common: {"timestamp": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "item_selected": ThemeStyle { fg: None, bg: Some(Rgb(18, 18, 18)), modifier: BOLD }, "border_component_focused": ThemeStyle { fg: Some(Rgb(236, 91, 252)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, chat_list: {"self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "item_selected": ThemeStyle { fg: None, bg: Some(Rgb(18, 18, 18)), modifier: NONE }, "item_chat_name": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "item_unread_counter": ThemeStyle { fg: Some(Rgb(138, 53, 148)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "item_message_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }}, chat: {"message_reply_text": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_myself_reply_name": ThemeStyle { fg: Some(Rgb(138, 57, 7)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_myself_content": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_myself_name": ThemeStyle { fg: Some(Rgb(7, 103, 163)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_other_reply_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_other_content": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "chat_name": ThemeStyle { fg: Some(Rgb(199, 81, 8)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_myself_reply_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_other_name": ThemeStyle { fg: Some(Rgb(199, 81, 8)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_other_reply_name": ThemeStyle { fg: Some(Rgb(95, 117, 143)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, prompt: {"self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_preview_text": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_text_selected": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(36, 36, 36)), modifier: ITALIC }, "message_text": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, status_bar: {"press_key_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_quit_key": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "size_info_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "open_chat_name": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "message_quit_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "press_key_key": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "size_info_numbers": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "open_chat_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, title_bar: {"title3": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | UNDERLINED }, "title2": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | ITALIC | UNDERLINED }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "title1": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | ITALIC | UNDERLINED }}, reply_message: {"message_text": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "self": ThemeStyle { fg: Some(Rgb(138, 53, 148)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }} }, poisoned: false, .. }, palette_config: Mutex { data: PaletteConfig { palette: {"secondary": Rgb(7, 103, 163), "ternary_light": Rgb(240, 210, 197), "background_three": Rgb(36, 36, 36), "primary": Rgb(84, 84, 84), "highlight_one": Rgb(236, 91, 252), "background_two": Rgb(18, 18, 18), "secondary_dark": Rgb(95, 117, 143), "black": Rgb(0, 0, 0), "highlight_two": Rgb(138, 53, 148), "secondary_light": Rgb(192, 211, 240), "background": Rgb(0, 0, 0), "primary_dark": Rgb(61, 61, 61), "primary_light": Rgb(225, 225, 225), "ternary_dark": Rgb(138, 57, 7), "white": Rgb(255, 255, 255), "ternary": Rgb(199, 81, 8)} }, poisoned: false, .. }, tg_config: Mutex { data: TelegramConfig { api_id: "94575", api_hash: "a3406de8d171bb422bb6ddf3bbd800e2", database_dir: "/home/hossein/projects/tmp/tgt/.data/tg", use_file_database: true, use_chat_info_database: true, use_message_database: true, system_language_code: "en", device_model: "Desktop", verbosity_level: 2, log_path: "/home/hossein/projects/tmp/tgt/.data/tdlib_rs/tdlib_rs.log", redirect_stderr: false }, poisoned: false, .. }, action_tx: Mutex { data: UnboundedSender { chan: Tx { inner: Chan { tx: Tx { block_tail: 0x5570ca638b40, tail_position: 0 }, semaphore: Semaphore(0), rx_waker: AtomicWaker, tx_count: 1, rx_fields: "..." } } }, poisoned: false, .. }, action_rx: Mutex { data: UnboundedReceiver { chan: Rx { inner: Chan { tx: Tx { block_tail: 0x5570ca638b40, tail_position: 0 }, semaphore: Semaphore(0), rx_waker: AtomicWaker, tx_count: 1, rx_fields: "..." } } }, poisoned: false, .. }, quit: false, tg_context: TgContext { users: Mutex { data: {}, poisoned: false, .. }, basic_groups: Mutex { data: {}, poisoned: false, .. }, supergroups: Mutex { data: {}, poisoned: false, .. }, secret_chats: Mutex { data: {}, poisoned: false, .. }, chats: Mutex { data: {}, poisoned: false, .. }, chats_index: Mutex { data: {}, poisoned: false, .. }, users_full_info: Mutex { data: {}, poisoned: false, .. }, basic_groups_full_info: Mutex { data: {}, poisoned: false, .. }, supergroups_full_info: Mutex { data: {}, poisoned: false, .. }, event_tx: Mutex { data: None, poisoned: false, .. }, me: 0, open_chat_id: 0, open_chat_messages: Mutex { data: [], poisoned: false, .. }, open_chat_user: Mutex { data: None, poisoned: false, .. }, last_acknowledged_message_id: 0, from_message_id: 0, reply_message_id: 0, reply_message_text: Mutex { data: "", poisoned: false, .. } }, cli_args: Mutex { data: CliArgs { telegram_cli: TelegramCli { logout: false, send_message: None } }, poisoned: false, .. } }
2024-09-01T10:08:45.668223Z  INFO tgt::tui_backend: src/tui_backend.rs:57: Creating TuiBackend
2024-09-01T10:08:45.668641Z  INFO tgt: src/main.rs:104: Tui backend initialized
2024-09-01T10:08:45.680918Z  INFO tgt: src/main.rs:107: Tui initialized
2024-09-01T10:08:45.680960Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:34: Creating TgBackend
2024-09-01T10:08:45.681013Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:43: Created TDLib client with client_id: 1
2024-09-01T10:08:45.681033Z  INFO tgt: src/main.rs:109: Telegram backend initialized
2024-09-01T10:08:45.681068Z  INFO tgt::run: src/run.rs:29: Starting run_app
2024-09-01T10:08:45.681396Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:529: Starting handling updates from TDLib
2024-09-01T10:08:45.682969Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:306: Handling authorization state
2024-09-01T10:08:45.697982Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:248: Quick ack enabled
2024-09-01T10:08:45.730609Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:267: Went online
2024-09-01T10:08:45.730868Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:287: Animated emoji set to: true
2024-09-01T10:08:45.730913Z  INFO tgt::tui_backend: src/tui_backend.rs:83: Raw mode enabled
2024-09-01T10:08:45.730938Z  INFO tgt::tui_backend: src/tui_backend.rs:91: Alternate screen enabled
2024-09-01T10:09:42.099753Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:273: Went offline
2024-09-01T10:09:42.099970Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:100: TDLib client closed: ()
2024-09-01T10:09:42.100046Z  INFO tgt::tui_backend: src/tui_backend.rs:117: Raw mode disabled
2024-09-01T10:09:42.100089Z  INFO tgt::tui_backend: src/tui_backend.rs:119: Alternate screen disabled
2024-09-01T10:09:42.100164Z  INFO tgt::tui_backend: src/tui_backend.rs:122: Mouse disabled
2024-09-01T10:09:42.100190Z  INFO tgt::tui_backend: src/tui_backend.rs:126: Paste disabled
2024-09-01T10:09:42.100209Z  INFO tgt::tui_backend: src/tui_backend.rs:138: Tui backend exited
2024-09-01T10:09:42.100239Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:306: Handling authorization state
2024-09-01T10:09:42.100259Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:453: Closing
2024-09-01T10:09:42.110461Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:456: Closed
2024-09-01T10:09:42.110528Z  INFO tgt::run: src/run.rs:67: Quitting
2024-09-01T10:09:42.110549Z  INFO tgt: src/main.rs:120: Application exited successfully
2024-09-01T15:17:41.874983Z  INFO tgt: src/main.rs:69: Logger initialized with config: Logger { log_dir: "/home/hossein/projects/tmp/tgt/.data/logs", log_file: "tgt.log", rotation_frequency: Rotation(Daily), max_old_log_files: 7, log_level: "info" }
2024-09-01T15:17:41.875231Z  INFO tgt: src/main.rs:72: Keymap config: KeymapConfig { core_window: {Key(Char('j'), KeyModifiers(ALT)): Single { action: DecreasePromptSize, description: Some("Decrease the prompt size") }, Key(Char('1'), KeyModifiers(ALT)): Single { action: FocusComponent(ChatList), description: Some("Focus the chat list") }, Key(Char('l'), KeyModifiers(ALT)): Single { action: IncreaseChatListSize, description: Some("Increase the chat list size") }, Key(Char('k'), KeyModifiers(ALT)): Single { action: IncreasePromptSize, description: Some("Increase the prompt size") }, Key(Down, KeyModifiers(ALT)): Single { action: FocusComponent(Prompt), description: Some("Focus the prompt") }, Key(Char('2'), KeyModifiers(ALT)): Single { action: FocusComponent(Chat), description: Some("Focus the chat") }, Key(Char('q'), KeyModifiers(0x0)): Single { action: TryQuit, description: Some("Quit the application") }, Key(Char('3'), KeyModifiers(ALT)): Single { action: FocusComponent(Prompt), description: Some("Focus the prompt") }, Key(Esc, KeyModifiers(0x0)): Single { action: UnfocusComponent, description: Some("Unfocus the current component") }, Key(Right, KeyModifiers(ALT)): Single { action: FocusComponent(Chat), description: Some("Focus the chat") }, Key(Left, KeyModifiers(ALT)): Single { action: FocusComponent(ChatList), description: Some("Focus the chat list") }, Key(Char('n'), KeyModifiers(ALT)): Single { action: ToggleChatList, description: Some("Toggle chat_list visibility") }, Key(Up, KeyModifiers(ALT)): Single { action: UnfocusComponent, description: Some("Unfocus the current component") }, Key(Char('h'), KeyModifiers(ALT)): Single { action: DecreaseChatListSize, description: Some("Decrease the chat list size") }, Key(Char('c'), KeyModifiers(CONTROL)): Single { action: TryQuit, description: Some("Quit the application") }}, chat_list: {Key(Right, KeyModifiers(0x0)): Single { action: ChatListOpen, description: Some("Open the selected chat") }, Key(Left, KeyModifiers(0x0)): Single { action: ChatListUnselect, description: Some("Unselect the current chat") }, Key(Down, KeyModifiers(0x0)): Single { action: ChatListNext, description: Some("Select the next chat") }, Key(Up, KeyModifiers(0x0)): Single { action: ChatListPrevious, description: Some("Select the previous chat") }, Key(Enter, KeyModifiers(0x0)): Single { action: ChatListOpen, description: Some("Open the selected chat") }}, chat: {Key(Char('D'), KeyModifiers(0x0)): Single { action: ChatWindowDeleteForMe, description: Some("Delete the selected message for 'me'") }, Key(Char('d'), KeyModifiers(0x0)): Single { action: ChatWindowDeleteForEveryone, description: Some("Delete the selected message for all users") }, Key(Char('r'), KeyModifiers(0x0)): Single { action: ShowChatWindowReply, description: Some("Reply to the selected message") }, Key(Char('y'), KeyModifiers(0x0)): Single { action: ChatWindowCopy, description: Some("Copy the selected message") }, Key(Left, KeyModifiers(0x0)): Single { action: ChatWindowUnselect, description: Some("Unselect the current message") }, Key(Up, KeyModifiers(0x0)): Single { action: ChatWindowPrevious, description: Some("Select the previous message") }, Key(Down, KeyModifiers(0x0)): Single { action: ChatWindowNext, description: Some("Select the next message") }, Key(Char('c'), KeyModifiers(CONTROL)): Single { action: ChatWindowCopy, description: Some("Copy the selected message") }, Key(Char('e'), KeyModifiers(0x0)): Single { action: ChatWindowEdit, description: Some("Edit the selected message") }}, prompt: {} }
2024-09-01T15:17:41.875452Z  INFO tgt: src/main.rs:75: App config: AppConfig { mouse_support: true, paste_support: true, frame_rate: 60.0, show_status_bar: true, show_title_bar: true, theme_enable: true, theme_filename: "theme.toml", take_api_id_from_telegram_config: true, take_api_hash_from_telegram_config: true }
2024-09-01T15:17:41.875497Z  INFO tgt: src/main.rs:78: Palette config: PaletteConfig { palette: {"ternary": Rgb(199, 81, 8), "ternary_light": Rgb(240, 210, 197), "secondary_light": Rgb(192, 211, 240), "background_three": Rgb(36, 36, 36), "primary_dark": Rgb(61, 61, 61), "primary": Rgb(84, 84, 84), "secondary_dark": Rgb(95, 117, 143), "secondary": Rgb(7, 103, 163), "ternary_dark": Rgb(138, 57, 7), "highlight_one": Rgb(236, 91, 252), "white": Rgb(255, 255, 255), "black": Rgb(0, 0, 0), "background": Rgb(0, 0, 0), "primary_light": Rgb(225, 225, 225), "background_two": Rgb(18, 18, 18), "highlight_two": Rgb(138, 53, 148)} }
2024-09-01T15:17:41.875571Z  INFO tgt: src/main.rs:81: Theme config: ThemeConfig { common: {"border_component_focused": ThemeStyle { fg: Some(Rgb(236, 91, 252)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "timestamp": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "item_selected": ThemeStyle { fg: None, bg: Some(Rgb(18, 18, 18)), modifier: BOLD }}, chat_list: {"self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "item_unread_counter": ThemeStyle { fg: Some(Rgb(138, 53, 148)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "item_selected": ThemeStyle { fg: None, bg: Some(Rgb(18, 18, 18)), modifier: NONE }, "item_chat_name": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "item_message_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }}, chat: {"message_myself_reply_name": ThemeStyle { fg: Some(Rgb(138, 57, 7)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_other_name": ThemeStyle { fg: Some(Rgb(199, 81, 8)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_other_content": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "chat_name": ThemeStyle { fg: Some(Rgb(199, 81, 8)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_other_reply_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_myself_name": ThemeStyle { fg: Some(Rgb(7, 103, 163)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_reply_text": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_myself_reply_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_myself_content": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_other_reply_name": ThemeStyle { fg: Some(Rgb(95, 117, 143)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }}, prompt: {"message_text": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_text_selected": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(36, 36, 36)), modifier: ITALIC }, "message_preview_text": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, status_bar: {"size_info_numbers": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "press_key_key": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "open_chat_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_quit_key": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "press_key_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "open_chat_name": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "size_info_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_quit_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, title_bar: {"title3": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | UNDERLINED }, "title1": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | ITALIC | UNDERLINED }, "title2": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | ITALIC | UNDERLINED }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, reply_message: {"message_text": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "self": ThemeStyle { fg: Some(Rgb(138, 53, 148)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }} }
2024-09-01T15:17:41.875791Z  INFO tgt: src/main.rs:84: Telegram config: TelegramConfig { api_id: "94575", api_hash: "a3406de8d171bb422bb6ddf3bbd800e2", database_dir: "/home/hossein/projects/tmp/tgt/.data/tg", use_file_database: true, use_chat_info_database: true, use_message_database: true, system_language_code: "en", device_model: "Desktop", verbosity_level: 2, log_path: "/home/hossein/projects/tmp/tgt/.data/tdlib_rs/tdlib_rs.log", redirect_stderr: false }
2024-09-01T15:17:41.875839Z  INFO tgt: src/main.rs:91: Telegram context: TgContext { users: Mutex { data: {}, poisoned: false, .. }, basic_groups: Mutex { data: {}, poisoned: false, .. }, supergroups: Mutex { data: {}, poisoned: false, .. }, secret_chats: Mutex { data: {}, poisoned: false, .. }, chats: Mutex { data: {}, poisoned: false, .. }, chats_index: Mutex { data: {}, poisoned: false, .. }, users_full_info: Mutex { data: {}, poisoned: false, .. }, basic_groups_full_info: Mutex { data: {}, poisoned: false, .. }, supergroups_full_info: Mutex { data: {}, poisoned: false, .. }, event_tx: Mutex { data: None, poisoned: false, .. }, me: 0, open_chat_id: 0, open_chat_messages: Mutex { data: [], poisoned: false, .. }, open_chat_user: Mutex { data: None, poisoned: false, .. }, last_acknowledged_message_id: 0, from_message_id: 0, reply_message_id: 0, reply_message_text: Mutex { data: "", poisoned: false, .. } }
2024-09-01T15:17:41.875920Z  INFO tgt: src/main.rs:101: App context: AppContext { app_config: Mutex { data: AppConfig { mouse_support: true, paste_support: true, frame_rate: 60.0, show_status_bar: true, show_title_bar: true, theme_enable: true, theme_filename: "theme.toml", take_api_id_from_telegram_config: true, take_api_hash_from_telegram_config: true }, poisoned: false, .. }, keymap_config: Mutex { data: KeymapConfig { core_window: {Key(Char('j'), KeyModifiers(ALT)): Single { action: DecreasePromptSize, description: Some("Decrease the prompt size") }, Key(Char('1'), KeyModifiers(ALT)): Single { action: FocusComponent(ChatList), description: Some("Focus the chat list") }, Key(Char('l'), KeyModifiers(ALT)): Single { action: IncreaseChatListSize, description: Some("Increase the chat list size") }, Key(Char('k'), KeyModifiers(ALT)): Single { action: IncreasePromptSize, description: Some("Increase the prompt size") }, Key(Down, KeyModifiers(ALT)): Single { action: FocusComponent(Prompt), description: Some("Focus the prompt") }, Key(Char('2'), KeyModifiers(ALT)): Single { action: FocusComponent(Chat), description: Some("Focus the chat") }, Key(Char('q'), KeyModifiers(0x0)): Single { action: TryQuit, description: Some("Quit the application") }, Key(Char('3'), KeyModifiers(ALT)): Single { action: FocusComponent(Prompt), description: Some("Focus the prompt") }, Key(Esc, KeyModifiers(0x0)): Single { action: UnfocusComponent, description: Some("Unfocus the current component") }, Key(Right, KeyModifiers(ALT)): Single { action: FocusComponent(Chat), description: Some("Focus the chat") }, Key(Left, KeyModifiers(ALT)): Single { action: FocusComponent(ChatList), description: Some("Focus the chat list") }, Key(Char('n'), KeyModifiers(ALT)): Single { action: ToggleChatList, description: Some("Toggle chat_list visibility") }, Key(Up, KeyModifiers(ALT)): Single { action: UnfocusComponent, description: Some("Unfocus the current component") }, Key(Char('h'), KeyModifiers(ALT)): Single { action: DecreaseChatListSize, description: Some("Decrease the chat list size") }, Key(Char('c'), KeyModifiers(CONTROL)): Single { action: TryQuit, description: Some("Quit the application") }}, chat_list: {Key(Right, KeyModifiers(0x0)): Single { action: ChatListOpen, description: Some("Open the selected chat") }, Key(Left, KeyModifiers(0x0)): Single { action: ChatListUnselect, description: Some("Unselect the current chat") }, Key(Down, KeyModifiers(0x0)): Single { action: ChatListNext, description: Some("Select the next chat") }, Key(Up, KeyModifiers(0x0)): Single { action: ChatListPrevious, description: Some("Select the previous chat") }, Key(Enter, KeyModifiers(0x0)): Single { action: ChatListOpen, description: Some("Open the selected chat") }}, chat: {Key(Char('D'), KeyModifiers(0x0)): Single { action: ChatWindowDeleteForMe, description: Some("Delete the selected message for 'me'") }, Key(Char('d'), KeyModifiers(0x0)): Single { action: ChatWindowDeleteForEveryone, description: Some("Delete the selected message for all users") }, Key(Char('r'), KeyModifiers(0x0)): Single { action: ShowChatWindowReply, description: Some("Reply to the selected message") }, Key(Char('y'), KeyModifiers(0x0)): Single { action: ChatWindowCopy, description: Some("Copy the selected message") }, Key(Left, KeyModifiers(0x0)): Single { action: ChatWindowUnselect, description: Some("Unselect the current message") }, Key(Up, KeyModifiers(0x0)): Single { action: ChatWindowPrevious, description: Some("Select the previous message") }, Key(Down, KeyModifiers(0x0)): Single { action: ChatWindowNext, description: Some("Select the next message") }, Key(Char('c'), KeyModifiers(CONTROL)): Single { action: ChatWindowCopy, description: Some("Copy the selected message") }, Key(Char('e'), KeyModifiers(0x0)): Single { action: ChatWindowEdit, description: Some("Edit the selected message") }}, prompt: {} }, poisoned: false, .. }, theme_config: Mutex { data: ThemeConfig { common: {"border_component_focused": ThemeStyle { fg: Some(Rgb(236, 91, 252)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "timestamp": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "item_selected": ThemeStyle { fg: None, bg: Some(Rgb(18, 18, 18)), modifier: BOLD }}, chat_list: {"self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "item_unread_counter": ThemeStyle { fg: Some(Rgb(138, 53, 148)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "item_selected": ThemeStyle { fg: None, bg: Some(Rgb(18, 18, 18)), modifier: NONE }, "item_chat_name": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "item_message_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }}, chat: {"message_myself_reply_name": ThemeStyle { fg: Some(Rgb(138, 57, 7)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_other_name": ThemeStyle { fg: Some(Rgb(199, 81, 8)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_other_content": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "chat_name": ThemeStyle { fg: Some(Rgb(199, 81, 8)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_other_reply_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_myself_name": ThemeStyle { fg: Some(Rgb(7, 103, 163)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }, "message_reply_text": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_myself_reply_content": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_myself_content": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_other_reply_name": ThemeStyle { fg: Some(Rgb(95, 117, 143)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD }}, prompt: {"message_text": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_text_selected": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(36, 36, 36)), modifier: ITALIC }, "message_preview_text": ThemeStyle { fg: Some(Rgb(61, 61, 61)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, status_bar: {"size_info_numbers": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "press_key_key": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "open_chat_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_quit_key": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "press_key_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "open_chat_name": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: ITALIC }, "size_info_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "message_quit_text": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, title_bar: {"title3": ThemeStyle { fg: Some(Rgb(240, 210, 197)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | UNDERLINED }, "title1": ThemeStyle { fg: Some(Rgb(225, 225, 225)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | ITALIC | UNDERLINED }, "title2": ThemeStyle { fg: Some(Rgb(192, 211, 240)), bg: Some(Rgb(0, 0, 0)), modifier: BOLD | ITALIC | UNDERLINED }, "self": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }}, reply_message: {"message_text": ThemeStyle { fg: Some(Rgb(84, 84, 84)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }, "self": ThemeStyle { fg: Some(Rgb(138, 53, 148)), bg: Some(Rgb(0, 0, 0)), modifier: NONE }} }, poisoned: false, .. }, palette_config: Mutex { data: PaletteConfig { palette: {"ternary": Rgb(199, 81, 8), "ternary_light": Rgb(240, 210, 197), "secondary_light": Rgb(192, 211, 240), "background_three": Rgb(36, 36, 36), "primary_dark": Rgb(61, 61, 61), "primary": Rgb(84, 84, 84), "secondary_dark": Rgb(95, 117, 143), "secondary": Rgb(7, 103, 163), "ternary_dark": Rgb(138, 57, 7), "highlight_one": Rgb(236, 91, 252), "white": Rgb(255, 255, 255), "black": Rgb(0, 0, 0), "background": Rgb(0, 0, 0), "primary_light": Rgb(225, 225, 225), "background_two": Rgb(18, 18, 18), "highlight_two": Rgb(138, 53, 148)} }, poisoned: false, .. }, tg_config: Mutex { data: TelegramConfig { api_id: "94575", api_hash: "a3406de8d171bb422bb6ddf3bbd800e2", database_dir: "/home/hossein/projects/tmp/tgt/.data/tg", use_file_database: true, use_chat_info_database: true, use_message_database: true, system_language_code: "en", device_model: "Desktop", verbosity_level: 2, log_path: "/home/hossein/projects/tmp/tgt/.data/tdlib_rs/tdlib_rs.log", redirect_stderr: false }, poisoned: false, .. }, action_tx: Mutex { data: UnboundedSender { chan: Tx { inner: Chan { tx: Tx { block_tail: 0x56124d35d380, tail_position: 0 }, semaphore: Semaphore(0), rx_waker: AtomicWaker, tx_count: 1, rx_fields: "..." } } }, poisoned: false, .. }, action_rx: Mutex { data: UnboundedReceiver { chan: Rx { inner: Chan { tx: Tx { block_tail: 0x56124d35d380, tail_position: 0 }, semaphore: Semaphore(0), rx_waker: AtomicWaker, tx_count: 1, rx_fields: "..." } } }, poisoned: false, .. }, quit: false, tg_context: TgContext { users: Mutex { data: {}, poisoned: false, .. }, basic_groups: Mutex { data: {}, poisoned: false, .. }, supergroups: Mutex { data: {}, poisoned: false, .. }, secret_chats: Mutex { data: {}, poisoned: false, .. }, chats: Mutex { data: {}, poisoned: false, .. }, chats_index: Mutex { data: {}, poisoned: false, .. }, users_full_info: Mutex { data: {}, poisoned: false, .. }, basic_groups_full_info: Mutex { data: {}, poisoned: false, .. }, supergroups_full_info: Mutex { data: {}, poisoned: false, .. }, event_tx: Mutex { data: None, poisoned: false, .. }, me: 0, open_chat_id: 0, open_chat_messages: Mutex { data: [], poisoned: false, .. }, open_chat_user: Mutex { data: None, poisoned: false, .. }, last_acknowledged_message_id: 0, from_message_id: 0, reply_message_id: 0, reply_message_text: Mutex { data: "", poisoned: false, .. } }, cli_args: Mutex { data: CliArgs { telegram_cli: TelegramCli { logout: false, send_message: None } }, poisoned: false, .. } }
2024-09-01T15:17:41.876725Z  INFO tgt::tui_backend: src/tui_backend.rs:57: Creating TuiBackend
2024-09-01T15:17:41.877286Z  INFO tgt: src/main.rs:104: Tui backend initialized
2024-09-01T15:17:41.877591Z  INFO tgt: src/main.rs:107: Tui initialized
2024-09-01T15:17:41.877827Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:34: Creating TgBackend
2024-09-01T15:17:41.878149Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:43: Created TDLib client with client_id: 1
2024-09-01T15:17:41.878194Z  INFO tgt: src/main.rs:109: Telegram backend initialized
2024-09-01T15:17:41.878228Z  INFO tgt::run: src/run.rs:29: Starting run_app
2024-09-01T15:17:41.878581Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:529: Starting handling updates from TDLib
2024-09-01T15:17:41.881132Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:306: Handling authorization state
2024-09-01T15:17:41.899468Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:248: Quick ack enabled
2024-09-01T15:17:41.935453Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:267: Went online
2024-09-01T15:17:41.935701Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:287: Animated emoji set to: true
2024-09-01T15:17:41.935785Z  INFO tgt::tui_backend: src/tui_backend.rs:83: Raw mode enabled
2024-09-01T15:17:41.935836Z  INFO tgt::tui_backend: src/tui_backend.rs:91: Alternate screen enabled
2024-09-01T15:19:18.352822Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:273: Went offline
2024-09-01T15:19:18.353028Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:100: TDLib client closed: ()
2024-09-01T15:19:18.353074Z  INFO tgt::tui_backend: src/tui_backend.rs:117: Raw mode disabled
2024-09-01T15:19:18.353105Z  INFO tgt::tui_backend: src/tui_backend.rs:119: Alternate screen disabled
2024-09-01T15:19:18.353130Z  INFO tgt::tui_backend: src/tui_backend.rs:122: Mouse disabled
2024-09-01T15:19:18.353155Z  INFO tgt::tui_backend: src/tui_backend.rs:126: Paste disabled
2024-09-01T15:19:18.353186Z  INFO tgt::tui_backend: src/tui_backend.rs:138: Tui backend exited
2024-09-01T15:19:18.353210Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:306: Handling authorization state
2024-09-01T15:19:18.353243Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:453: Closing
2024-09-01T15:19:18.363896Z  INFO tgt::tg::tg_backend: src/tg/tg_backend.rs:456: Closed
2024-09-01T15:19:18.363989Z  INFO tgt::run: src/run.rs:67: Quitting
2024-09-01T15:19:18.364015Z  INFO tgt: src/main.rs:120: Application exited successfully
  • tdlib_rs.log
[ 2][t 1][1725171847.136489152][TdDb.cpp:431][#1][!RunOnSchedulerWorker]	Set PRAGMA user_version = 14
[ 2][t 3][1725171847.139504194][AuthDataShared.cpp:118][#1][!Td]	DcId{1} [auth_key_id:0][state:Empty][created_at:0][last_used:0]
[ 2][t 3][1725171847.140254974][Session.cpp:271][#1][!SessionProxy:1:main]	Generate new session_id 3248451925353668284 for auth key 0 for main DC1
[ 2][t 3][1725171849.664213180][AuthDataShared.cpp:118][#1][!Session:1:main]	DcId{1} [auth_key_id:2669330237819520292][state:NoAuth][created_at:1725171848][last_used:0]
[ 2][t 3][1725171849.664272069][Session.cpp:1420][#1][!Session:1:main]	Update auth key in session_id 3248451925353668284 to 2669330237819520292
[ 2][t 3][1725171865.942574262][AuthDataShared.cpp:118][#1][!Session:1:main]	DcId{4} [auth_key_id:0][state:Empty][created_at:0][last_used:0]
[ 2][t 3][1725171865.942774057][Session.cpp:271][#1][!SessionProxy:4:main]	Generate new session_id 13960607219873474555 for auth key 0 for main DC4
[ 2][t 3][1725171868.195543050][AuthDataShared.cpp:118][#1][!Session:4:main]	DcId{4} [auth_key_id:5149946254503832723][state:NoAuth][created_at:1725171867][last_used:0]
[ 2][t 3][1725171868.195619106][Session.cpp:1420][#1][!Session:4:main]	Update auth key in session_id 13960607219873474555 to 5149946254503832723
[ 2][t 3][1725171892.767962217][AuthDataShared.cpp:118][#1][!Session:4:main]	DcId{4} [auth_key_id:5149946254503832723][state:OK][created_at:1725171867][last_used:1725288867]
[ 2][t 3][1725171894.434702157][Session.cpp:271][#1][!SessionProxy:1:main]	Generate new session_id 6279563047494753409 for auth key 2669330237819520292 for DC1
[ 1][t 3][1725171894.543005943][QuickReplyManager.cpp:3506][#1][!UpdatesManager]	Can't load quick replies: [Error : 0 : Not enough data to read at 0]
[ 2][t 3][1725171895.083394050][AuthDataShared.cpp:118][#1][!Session:1:main]	DcId{1} [auth_key_id:2669330237819520292][state:OK][created_at:1725171848][last_used:1725288848]
[ 1][t 3][1725171895.671057939][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 432197447985397761/missvioletfh from GetStickerSetQuery
[ 1][t 3][1725171895.676379919][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 377812111067185153/Bigli_Migli from GetStickerSetQuery
[ 1][t 3][1725171895.804491043][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 437599949908082689/Poorya1 from GetStickerSetQuery
[ 1][t 3][1725171895.814343929][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 466275956189822978/Saber from GetStickerSetQuery
[ 1][t 3][1725171895.840533018][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 261061838966358023/Majmae_madehin_sticker from GetStickerSetQuery
[ 1][t 3][1725171895.853805065][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 664235813520801824/SetareSarmast70 from GetStickerSetQuery
[ 1][t 3][1725171895.859996080][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 423009812859584534/SpoiledRabbit17 from GetStickerSetQuery
[ 1][t 3][1725171895.866530179][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 237018027927797771/amy_and_tim from GetStickerSetQuery
[ 1][t 3][1725171895.879328012][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 431143235377692674/MimiCute from GetStickerSetQuery
[ 1][t 3][1725171895.919849157][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 311671534559166467/Khengooloo1 from GetStickerSetQuery
[ 1][t 3][1725171896.013680934][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 423009812859584520/SpoiledRabbit_6 from GetStickerSetQuery
[ 1][t 3][1725171896.016410112][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 423009812859584519/SpoiledRabbit5 from GetStickerSetQuery
[ 1][t 3][1725171896.031514167][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 29798418675138561/Cacti from GetStickerSetQuery
[ 1][t 3][1725171896.036186933][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 631611826055938049/jennymeilihov from GetStickerSetQuery
[ 1][t 3][1725171896.038874149][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 106497704128937987/B1lenge from GetStickerSetQuery
[ 1][t 3][1725171896.064989089][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 545349220391977005/Rozhi32 from GetStickerSetQuery
[ 1][t 3][1725171896.089195013][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 423534314265772047/channel_management_shidkala from GetStickerSetQuery
[ 1][t 3][1725171896.193768024][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 436810964415807492/zaqou from GetStickerSetQuery
[ 1][t 3][1725171896.214900016][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 335809744683925513/SrabbitSmanN from GetStickerSetQuery
[ 1][t 3][1725171896.235027074][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 254513564323151873/reyhaneh_myfamily from GetStickerSetQuery
[ 1][t 3][1725171896.360159158][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 430159271255081062/Newstickerpackme from GetStickerSetQuery
[ 1][t 3][1725171896.385634183][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 328917524764688388/Harry from GetStickerSetQuery
[ 1][t 3][1725171896.731930255][StickersManager.cpp:3942][#1][!Td]	Receive empty emoji in sticker set 243382770028511237/SexPositionsSketch from GetStickerSetQuery
[ 1][t 3][1725171940.689838171][MessagesManager.cpp:30607][#1][!MessagesManager]	Receive message sender chat -1001286436824 in chat -1001286436824
[ 1][t 3][1725172000.788103103][MessagesManager.cpp:30607][#1][!MessagesManager]	Receive message sender chat -1001165993574 in chat -1001165993574
[ 2][t 3][1725172023.543240070][Td.cpp:3463][#1][!Td]	Close Td in state 1
[ 2][t 4][1725172084.357202053][AuthDataShared.cpp:118][#1][!Td]	DcId{4} [auth_key_id:5149946254503832723][state:OK][created_at:1725171867][last_used:1725288867]
[ 2][t 4][1725172084.358479976][Session.cpp:271][#1][!SessionProxy:4:main]	Generate new session_id 14042106347158318417 for auth key 5149946254503832723 for main DC4
[ 1][t 4][1725172094.561029911][MessagesManager.cpp:30607][#1][!MessagesManager]	Receive message sender chat -1001293125615 in chat -1001293125615
[ 1][t 4][1725172096.593693017][MessagesManager.cpp:30607][#1][!MessagesManager]	Receive message sender chat -1001523214806 in chat -1001523214806
[ 1][t 4][1725172098.675553083][MessagesManager.cpp:30607][#1][!MessagesManager]	Receive message sender chat -1001582864362 in chat -1001582864362
[ 1][t 4][1725172100.621546030][MessagesManager.cpp:30607][#1][!MessagesManager]	Receive message sender chat -1001313392957 in chat -1001313392957
[ 2][t 4][1725172102.588822126][NetQueryDelayer.cpp:99][#1][!NetQueryDelayer]	Delay: [Query:[id:13500416][tl:0x08736a09]] [timeout:3][total_timeout:3] because of [Error : 420 : FLOOD_WAIT_3] from Session:4:main::Connect::TCP::[149.154.167.92:443] to DcId{4} from [10.130.240.160:55370]
[ 1][t 4][1725172105.843183279][MessagesManager.cpp:30607][#1][!MessagesManager]	Receive message sender chat -1001294550593 in chat -1001294550593
[ 2][t 4][1725172171.068807125][NetQueryDelayer.cpp:90][#1][!NetQueryDelayer]	Failed: [Query:[id:16973824][tl:0xdaeda864]] [timeout:9723][total_timeout:9723] because of [Error : 420 : FLOOD_WAIT_9723] from Session:4:main::Connect::TCP::[149.154.167.92:443] to DcId{4} from [10.130.240.160:55370]
[ 2][t 4][1725172183.049291133][NetQueryDelayer.cpp:90][#1][!NetQueryDelayer]	Failed: [Query:[id:17432576][tl:0xdaeda864]] [timeout:9711][total_timeout:9711] because of [Error : 420 : FLOOD_WAIT_9711] from Session:4:main::Connect::TCP::[149.154.167.92:443] to DcId{4} from [10.130.240.160:55370]
[ 2][t 4][1725172216.942492008][NetQueryDelayer.cpp:90][#1][!NetQueryDelayer]	Failed: [Query:[id:18808832][tl:0xdaeda864]] [timeout:9677][total_timeout:9677] because of [Error : 420 : FLOOD_WAIT_9677] from Session:4:main::Connect::TCP::[149.154.167.92:443] to DcId{4} from [10.130.240.160:55370]
[ 2][t 4][1725172253.089050292][NetQueryDelayer.cpp:90][#1][!NetQueryDelayer]	Failed: [Query:[id:21233664][tl:0xdaeda864]] [timeout:9641][total_timeout:9641] because of [Error : 420 : FLOOD_WAIT_9641] from Session:4:main::Connect::TCP::[149.154.167.92:443] to DcId{4} from [10.130.240.160:55370]
[ 2][t 4][1725172267.015141248][NetQueryDelayer.cpp:90][#1][!NetQueryDelayer]	Failed: [Query:[id:21757952][tl:0xdaeda864]] [timeout:9627][total_timeout:9627] because of [Error : 420 : FLOOD_WAIT_9627] from Session:4:main::Connect::TCP::[149.154.167.92:443] to DcId{4} from [10.130.240.160:55370]
[ 2][t 4][1725172277.049391269][NetQueryDelayer.cpp:90][#1][!NetQueryDelayer]	Failed: [Query:[id:22151168][tl:0xdaeda864]] [timeout:9617][total_timeout:9617] because of [Error : 420 : FLOOD_WAIT_9617] from Session:4:main::Connect::TCP::[149.154.167.92:443] to DcId{4} from [10.130.240.160:55370]
[ 2][t 4][1725172279.097375154][NetQueryDelayer.cpp:90][#1][!NetQueryDelayer]	Failed: [Query:[id:22282240][tl:0xdaeda864]] [timeout:9615][total_timeout:9615] because of [Error : 420 : FLOOD_WAIT_9615] from Session:4:main::Connect::TCP::[149.154.167.92:443] to DcId{4} from [10.130.240.160:55370]
[ 2][t 4][1725172299.036170005][NetQueryDelayer.cpp:90][#1][!NetQueryDelayer]	Failed: [Query:[id:23068672][tl:0xdaeda864]] [timeout:9595][total_timeout:9595] because of [Error : 420 : FLOOD_WAIT_9595] from Session:4:main::Connect::TCP::[149.154.167.92:443] to DcId{4} from [10.130.240.160:55370]
[ 2][t 4][1725172725.690504074][AuthDataShared.cpp:118][#1][!Td]	DcId{4} [auth_key_id:5149946254503832723][state:OK][created_at:1725171867][last_used:1725288867]
[ 2][t 4][1725172725.691941976][Session.cpp:271][#1][!SessionProxy:4:main]	Generate new session_id 16065899166921244762 for auth key 5149946254503832723 for main DC4
[ 2][t 4][1725172726.789319992][NetQueryDelayer.cpp:90][#1][!NetQueryDelayer]	Failed: [Query:[id:2359296][tl:0xdaeda864]] [timeout:9167][total_timeout:9167] because of [Error : 420 : FLOOD_WAIT_9167] from Session:4:main::Connect::TCP::[149.154.167.92:443] to DcId{4} from [10.130.240.160:34636]
[ 2][t 4][1725172740.801496267][NetQueryDelayer.cpp:90][#1][!NetQueryDelayer]	Failed: [Query:[id:4915200][tl:0xdaeda864]] [timeout:9153][total_timeout:9153] because of [Error : 420 : FLOOD_WAIT_9153] from Session:4:main::Connect::TCP::[149.154.167.92:443] to DcId{4} from [10.130.240.160:34636]
[ 2][t 4][1725172753.004106998][NetQueryDelayer.cpp:90][#1][!NetQueryDelayer]	Failed: [Query:[id:5701632][tl:0xdaeda864]] [timeout:9141][total_timeout:9141] because of [Error : 420 : FLOOD_WAIT_9141] from Session:4:main::Connect::TCP::[149.154.167.92:443] to DcId{4} from [10.130.240.160:34636]
[ 2][t 4][1725172782.099879026][Td.cpp:3463][#1][!Td]	Close Td in state 1
[ 2][t 4][1725191261.890496015][AuthDataShared.cpp:118][#1][!Td]	DcId{4} [auth_key_id:5149946254503832723][state:OK][created_at:1725171867][last_used:1725288867]
[ 2][t 4][1725191261.892415046][Session.cpp:271][#1][!SessionProxy:4:main]	Generate new session_id 3220119756823390293 for auth key 5149946254503832723 for main DC4
[ 1][t 4][1725191312.977512121][MessagesManager.cpp:30607][#1][!MessagesManager]	Receive message sender chat -1001473409841 in chat -1001473409841
[ 2][t 4][1725191358.352946996][Td.cpp:3463][#1][!Td]	Close Td in state 1

@Andreal2000
Copy link
Collaborator

Hi,
Looking at the error printed out by cargo looks like you had a problem during the download of our prebuilt tdlib from github.
Can you retry after checking your internet connection?
Tell us if you use a VPN because we have an other issue open form a person who use a VPN that we haven't solved yet.

@hosseinnedaee
Copy link
Author

hosseinnedaee commented Sep 1, 2024

Hi, Looking at the error printed out by cargo looks like you had a problem during the download of our prebuilt tdlib from github. Can you retry after checking your internet connection? Tell us if you use a VPN because we have an other issue open form a person who use a VPN that we haven't solved yet.

Hi
Yes, I'm using VPN. Just changed my VPN(country) and it worked fine.

@hosseinnedaee
Copy link
Author

Thank you! :D

First of all, try using cargo run --release.

Anyway, can you send me the content of:

  • .data/logs/<latest_run>.log
  • .data/tdlib_rs.log

This is CPU usage after using cargo run --release. it's much better but still I think it's high.
Screenshot_2024-09-01_16-16-51

@Andreal2000
Copy link
Collaborator

Andreal2000 commented Sep 1, 2024

If you want to improve the performance you can reduce the framerate of the application, here you can find more info.

Edit: I closed the issue by mistake, if you need more help then keep asking else close the issue 😄

@hosseinnedaee
Copy link
Author

hosseinnedaee commented Sep 1, 2024

If you want to improve the performance you can reduce the framerate of the application, here you can find more info.

Edit: I closed the issue by mistake, if you need more help then keep asking else close the issue 😄

I changed framerate even to 15.0 but the CPU usage is still high (around 40%), is it normal?

@FedericoBruzzone
Copy link
Owner

FedericoBruzzone commented Sep 1, 2024

It's strange, could you use a profiler for rust to understand where we're spending so much time?

This can be useful: https://nnethercote.github.io/perf-book/profiling.html

@hosseinnedaee
Copy link
Author

I used flamegraph and this is the result.
flamegraph

@FedericoBruzzone
Copy link
Owner

FedericoBruzzone commented Sep 1, 2024

From this graph I can't understand anything.
Can you provide me the exact steps you used to generete it?

Should be:

flamegraph ./target/release/tht

@FedericoBruzzone
Copy link
Owner

Anyway, as soon as I can I will try using valgring with callgrind/massive and I will tell something more detailed.

@hosseinnedaee
Copy link
Author

hosseinnedaee commented Sep 2, 2024

From this graph I can't understand anything. Can you provide me the exact steps you used to generete it?

Should be:

flamegraph ./target/release/tht

Steps:

cargo install flamegraph
cargo flamegraph

@FedericoBruzzone
Copy link
Owner

Perfect, thank you.
Maybe would be better using valgrind or something.
As soon as I can I will try.

@hosseinnedaee
Copy link
Author

I ran this command ( I'm not sure options are correct or necessary):

valgrind --tool=callgrind --callgrind-out-file=callgrind.out --collect-jumps=yes --simulate-cache=yes ./target/release/tgt

and the result is in attached file.
callgrind.txt

@FedericoBruzzone
Copy link
Owner

That's perfect! You can use the following command to have a graphical representation of this file

kcachegrind callgrind.txt

@FedericoBruzzone
Copy link
Owner

FedericoBruzzone commented Sep 3, 2024

As soon as I can, I will do it and then we can discuss on how to fix this problem

@hosseinnedaee
Copy link
Author

I'm trying to work on new feature but because it's slow I can't debug.
Okay, sure.
Thanks.

@FedericoBruzzone
Copy link
Owner

This night I will see the graphical view of the output.txt, so you can proceed with your feature implementation :D

@FedericoBruzzone
Copy link
Owner

FedericoBruzzone commented Sep 3, 2024

So, this is the graphical view of your callgrind.txt.

image

I suppose the problem is related to draw method. We should sleep the draw when there is nothing to update.
Now, I will implement the FocusLost and FocusGain feature, but it might be necessary to use hash function to see the difference between two frame when the tgt is focused.

@hosseinnedaee
Copy link
Author

hosseinnedaee commented Sep 3, 2024

Yeah, draw function of the ChatListWindow. right?
image

@FedericoBruzzone
Copy link
Owner

Yeah!
Now I introduce with this commit the support for FocusGained and FocusLost of Crossterm, but it seems that it doesn't work.

@FedericoBruzzone
Copy link
Owner

Anyway, we should have a flag that indicate if we need to re-draw the screen, maybe hashing the "current" state?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants