fork channel, fix recording esc key
[?]
Jul 24, 2025, 6:48 PM
5ZRDYL6KIQPUI3ZZETH5KJ64N6RUF7KYM3P6Q6HER5XVJZ7GZ4WQCDependencies
- [2]
SWWE2R6Mdisplay basic repo stuff - [3]
YBJRDOTCmake all repo actions async - [4]
23SFYK4Qbig view refactor into a new crate - [5]
MYGIBRRHwip custom theme - [6]
XSZZB47Urefactor stuff into lib - [7]
PTWZYQFRuse nav-scrollable for repo status - [8]
RDRBP7ALauto-scroll status selection - [9]
UR4J677Rnav for log changes and refactors - [10]
A6Z4O6RCactions menu - [11]
7BLZN73Oadd a key to refresh repo - [12]
JZXYSIYDchannel selection! - [13]
I2AG42PAnew cols layout - [14]
SASAN2XCuse nav-scrollable - [*]
WT3GA27Padd cursor with selection - [*]
6YZAVBWUInitial commit
Change contents
- edit in libflorescence/src/repo.rs at line 149
ForkChannel(String), - edit in libflorescence/src/repo.rs at line 310
MsgIn::ForkChannel(name) => {let state: State;(internal_state, state) = spawn_blocking(move || {fork_channel(&mut internal_state, name);let state = get_state(&internal_state);(internal_state, state)}).await.unwrap();let _ = msg_out_tx.send(MsgOut::Refreshed(state));} - edit in libflorescence/src/repo.rs at line 395
txn.commit().unwrap();}fn fork_channel(state: &mut InternalState, name: String) {let repo = &state.repo;let current_channel = current_channel(repo);let mut txn = repo.pristine.mut_txn_begin().unwrap();let channel = txn.load_channel(¤t_channel).unwrap().unwrap();let _fork = txn.fork(&channel, name.trim()).unwrap(); - replacement in inflorescence_view/src/theme.rs at line 10
use iced::widget::{button, container, text_editor};use iced::widget::{button, container, text_editor, text_input}; - edit in inflorescence_view/src/theme.rs at line 107
#[derive(Debug, Clone, Copy)]pub enum TextInput {Normal,} - edit in inflorescence_view/src/theme.rs at line 308
impl text_input::Catalog for Theme {type Class<'a> = TextInput;fn default<'a>() -> Self::Class<'a> {TextInput::Normal}fn style(&self,class: &Self::Class<'_>,status: text_input::Status,) -> text_input::Style {let background =palette::Background::new(PALETTE.background, PALETTE.text);let primary = palette::Primary::generate(PALETTE.primary,PALETTE.background,PALETTE.text,);let active = text_input::Style {background: Background::Color(background.base.color),border: Border {radius: 2.0.into(),width: 1.0,color: background.strongest.color,},icon: background.weak.text,placeholder: background.strongest.color,value: background.base.text,selection: primary.weak.color,};match status {text_input::Status::Active => active,text_input::Status::Hovered => text_input::Style {border: Border {color: background.base.text,..active.border},..active},text_input::Status::Focused { .. } => text_input::Style {border: Border {color: primary.strong.color,..active.border},..active},text_input::Status::Disabled => text_input::Style {background: Background::Color(background.weak.color),value: active.placeholder,..active},}}} - replacement in inflorescence_view/src/app.rs at line 11
use iced::widget::{button, column, container, row, text, text_editor};use iced::widget::{button, column, container, row, text, text_editor, text_input,}; - replacement in inflorescence_view/src/app.rs at line 42
/// `Some` when we're selecting a channel to switch to./// `true` when we're selecting a channel to switch to. - edit in inflorescence_view/src/app.rs at line 44
/// `Some` when we're selecting a channel to switch to.pub forking_channel: Option<String>, - edit in inflorescence_view/src/app.rs at line 115
ForkChannel,ForkChannelName(String), - edit in inflorescence_view/src/app.rs at line 178
forking_channel, - replacement in inflorescence_view/src/app.rs at line 509
el(column([el(text(format!("Current channel: {channel}")))]))el(column([el(text(format!("Current channel: {channel}")))]).width(Length::Fill).height(Length::Fill)) - replacement in inflorescence_view/src/app.rs at line 516
]))]).width(Length::Fill).height(Length::Fill)) - replacement in inflorescence_view/src/app.rs at line 534
let actions_inner = view_actions(action_state(let actions_inner = column([]).spacing(4);let actions_inner = if let Some(forking_channel) = forking_channel {let channel_name_input = text_input("channel name...", forking_channel).on_input(Msg::ForkChannelName);actions_inner.push(channel_name_input)} else {actions_inner};let actions_inner = actions_inner.push(view_actions(action_state( - replacement in inflorescence_view/src/app.rs at line 547
));))); - edit in inflorescence_view/src/app.rs at line 601
- edit in inflorescence_view/src/app.rs at line 605
- edit in inflorescence_view/src/app.rs at line 612
- edit in inflorescence_view/src/app.rs at line 615
let fork_channel = || action_button("f: fork channel", Msg::ForkChannel); - edit in inflorescence_view/src/app.rs at line 618
- replacement in inflorescence_view/src/app.rs at line 622
let add_if = |predicate: bool,button: Element<'a, Msg, Theme>,row: row::Row<'a, Msg, Theme>| {if predicate {row.push(button)} else {row}};let forking_channel = matches!(state, ActionState::ForkingChannel { .. }); - edit in inflorescence_view/src/app.rs at line 624
#[allow(clippy::let_and_return)] - replacement in inflorescence_view/src/app.rs at line 634
let row = add_if(can_select_right, right(), row);add_if(can_record, start_record(), row)let row = add_if(can_select_right, right, row);add_if(can_record, start_record, row) - replacement in inflorescence_view/src/app.rs at line 639
let row = add_if(can_select_right, right(), row);add_if(can_record, start_record(), row)let row = add_if(can_select_right, right, row);add_if(can_record, start_record, row) - replacement in inflorescence_view/src/app.rs at line 643
let row = add_if(can_select_right, right(), row);add_if(can_record, start_record(), row)let row = add_if(can_select_right, right, row);add_if(can_record, start_record, row) - replacement in inflorescence_view/src/app.rs at line 647
let row = add_if(!can_record, switch_channel(), row);rowadd_if(!can_record, switch_channel, row) - replacement in inflorescence_view/src/app.rs at line 654
let row = add_if(can_select_right, right(), row);let row = add_if(can_record, start_record(), row);let row = add_if(!can_record, switch_channel(), row);rowlet row = add_if(can_select_right, right, row);let row = add_if(can_record, start_record, row);add_if(!can_record, switch_channel, row) - replacement in inflorescence_view/src/app.rs at line 660
let row = add_if(can_record, start_record(), row);let row = add_if(!can_record, switch_channel(), row);rowlet row = add_if(can_record, start_record, row);add_if(!can_record, switch_channel, row) - edit in inflorescence_view/src/app.rs at line 675
ActionState::ForkingChannel { empty, unique } => {let row = row([]);let row = add_if(!empty && unique, confirm, row);let row = add_if(!unique,|| {el(button(text("Enter: already exists").shaping(text::Shaping::Advanced),))},row,);row.push(cancel())} - edit in inflorescence_view/src/app.rs at line 692
let row = add_if(!forking_channel, fork_channel, row); - edit in inflorescence_view/src/app.rs at line 698
fn add_if<'a, F>(predicate: bool,button: F,row: row::Row<'a, Msg, Theme>,) -> row::Row<'a, Msg, Theme>whereF: Fn() -> Element<'a, Msg, Theme>,{if predicate {row.push(button())} else {row}} - edit in inflorescence_view/src/app.rs at line 732
ForkingChannel {empty: bool,unique: bool,}, - edit in inflorescence_view/src/app.rs at line 773
if let Some(name) = repo.forking_channel.as_ref() {let name = name.trim();let empty = name.is_empty();let unique = !repo.state.other_channels.iter().any(|n| n == name);return ActionState::ForkingChannel { empty, unique };} - edit in inflorescence/src/selection.rs at line 128
forking_channel: _, - edit in inflorescence/src/selection.rs at line 458
forking_channel: _, - edit in inflorescence/src/selection.rs at line 930
forking_channel: _, - edit in inflorescence/src/selection.rs at line 1018
forking_channel: _, - edit in inflorescence/src/selection.rs at line 1264
forking_channel: _, - replacement in inflorescence/src/main.rs at line 251
if let Some(repo) = state.repo.as_mut()&& repo.switching_channel&& let Some(selection::Channel { ix: _, name }) =state.selection.view.channel.take(){state.repo_tx_in.send(repo::MsgIn::SwitchToChannel(name)).unwrap();if let Some(repo) = state.repo.as_mut() {#[allow(clippy::collapsible_if)]if repo.switching_channel {if let Some(selection::Channel { ix: _, name }) =state.selection.view.channel.take(){state.repo_tx_in.send(repo::MsgIn::SwitchToChannel(name)).unwrap(); - replacement in inflorescence/src/main.rs at line 262
repo.switching_channel = false;repo.switching_channel = false;}} else if let Some(name) = repo.forking_channel.take() {if !repo.state.other_channels.contains(&name) {state.repo_tx_in.send(repo::MsgIn::ForkChannel(name)).unwrap();}} - replacement in inflorescence/src/main.rs at line 276
if let Some(repo) = state.repo.as_mut()&& repo.switching_channelif let Some(RecordMsg::Typing(content)) = state.record_msg.as_ref() - replacement in inflorescence/src/main.rs at line 278
repo.switching_channel = false;state.selection.view.channel = None;state.record_msg = Some(RecordMsg::Canceled {old_msg: content.text(),});}if let Some(repo) = state.repo.as_mut() {if repo.switching_channel {repo.switching_channel = false;state.selection.view.channel = None;} else if repo.forking_channel.is_some() {repo.forking_channel = None;} - edit in inflorescence/src/main.rs at line 342
}Task::none()}app::Msg::ForkChannel => {if let Some(repo) = state.repo.as_mut() {repo.forking_channel = Some(String::new());return task::widget_focus_next(); - edit in inflorescence/src/main.rs at line 352
app::Msg::ForkChannelName(name) => {if let Some(repo) = state.repo.as_mut() {repo.forking_channel = Some(name);}Task::none()} - edit in inflorescence/src/main.rs at line 386
forking_channel: _, - edit in inflorescence/src/main.rs at line 449
forking_channel: _, - edit in inflorescence/src/main.rs at line 576
forking_channel: _, - edit in inflorescence/src/main.rs at line 680
forking_channel: None, - edit in inflorescence/src/main.rs at line 759
let forking_channel = state.repo.as_mut().and_then(|repo| repo.forking_channel.take()); - edit in inflorescence/src/main.rs at line 767
forking_channel, - edit in inflorescence/src/main.rs at line 982
"f" => Some(Msg::View(app::Msg::ForkChannel)),