Add todos

This commit is contained in:
Joscha 2022-08-30 17:04:03 +02:00
parent 03ddc5eb9b
commit 5eeabea2de
8 changed files with 45 additions and 0 deletions

View file

@ -1,3 +1,7 @@
// TODO Implement thread view
// TODO Implement flat (chronological?) view
// TODO Implement message search?
mod blocks;
mod tree;

View file

@ -1,3 +1,5 @@
// TODO Focusing on sub-trees
mod cursor;
mod layout;
mod tree_blocks;
@ -78,6 +80,7 @@ impl<M: Msg, S: MsgStore<M>> InnerTreeViewState<M, S> {
bindings.binding("ctrl+u/d", "scroll up/down half a screen");
bindings.binding("ctrl+b/f, page up/down", "scroll up/down one screen");
bindings.binding("z", "center cursor on screen");
// TODO Bindings inspired by vim's ()/[]/{} bindings?
}
async fn handle_movement_input_event(&mut self, frame: &mut Frame, event: &InputEvent) -> bool {

View file

@ -39,6 +39,7 @@ enum State {
Nick(EditorState),
Account(AccountUiState),
Links(LinksState),
// TODO Inspect messages and users
}
#[allow(clippy::large_enum_variant)]

View file

@ -30,6 +30,8 @@ pub fn prompt(
}
}
// TODO List key binding util functions
pub fn list_editor_key_bindings(
bindings: &mut KeyBindingsList,
char_filter: impl Fn(char) -> bool,
@ -94,6 +96,7 @@ pub fn handle_editor_input_event(
key!(Ctrl + 'd') | key!(Delete) => editor.delete(),
key!(Ctrl + 'l') => editor.clear(),
key!(Ctrl + 'x') if can_edit_externally => editor.edit_externally(terminal, crossterm_lock),
// TODO Key bindings to delete words
// Cursor movement
key!(Ctrl + 'b') | key!(Left) => editor.move_cursor_left(terminal.frame()),

View file

@ -1,3 +1,5 @@
// TODO Fix scrolling by focusing on the cursor like in chat::tree
use std::sync::Arc;
use async_trait::async_trait;

View file

@ -18,6 +18,7 @@ impl Text {
}
pub fn wrap(mut self, active: bool) -> Self {
// TODO Re-think and check what behaviour this setting should entail
self.wrap = active;
self
}