fix compare remote and options nav scrolling
Dependencies
- [2]
3XRG4BB6rewritten nav-scrollable! - [3]
WAOGSCOJvery nice refactor, wip adding channels logs - [4]
7WCB5YQJrefactor msgs and modules - [5]
DNTMUCMOallow to compare local with remote records - [6]
O46EFE5Jadd option to select remote for push - [7]
VQ3THWJJadd option to select remote for pull - [8]
OEBGSXWUrefactor sub-menu option selection - [9]
5ZM3J2J3add opts to select remote and channel for compare remote - [10]
ZG2CON2Vsort compare remote records, improve views - [11]
JZXYSIYDchannel selection! - [12]
YK3MOJJLchonky refactor, wip other channels logs & diffs - [13]
5O4FWCFPadd tests to_record selection and improve it - [*]
23SFYK4Qbig view refactor into a new crate - [*]
WT3GA27Padd cursor with selection - [*]
6YZAVBWUInitial commit
Change contents
- replacement in inflorescence_view/src/view.rs at line 1779
vec![]vec![el(text("Loading..."))] - replacement in inflorescence_view/src/view.rs at line 1786
&navigation.status_nav,&navigation.compare_remote_nav, - edit in inflorescence/src/selection.rs at line 2806
// For scrolling we need to skip indices of the header sectionslet repo::RecordDichotomy {local_records,remote_records,remote_unrecords: _,} = record_dichotomy;let scroll_section_ix = if ix >= local_records.len() + remote_records.len(){ix + 3} else if ix >= local_records.len() {ix + 2} else {ix + 1}; - replacement in inflorescence/src/selection.rs at line 2826
ix,scroll_section_ix, - replacement in inflorescence/src/selection.rs at line 2830
ix,scroll_section_ix, - edit in inflorescence/src/main.rs at line 1482[4.12886]→[6.9240:9310](∅→∅),[6.9310]→[9.15976:16045](∅→∅),[9.16045]→[6.9452:9596](∅→∅),[6.9452]→[6.9452:9596](∅→∅),[6.9596]→[8.2202:2282](∅→∅),[8.2282]→[7.9551:9599](∅→∅),[7.9551]→[7.9551:9599](∅→∅),[7.9599]→[9.16046:16115](∅→∅),[9.16115]→[7.9786:9930](∅→∅),[7.9786]→[7.9786:9930](∅→∅),[7.9930]→[8.2283:2363](∅→∅),[8.2363]→[6.9747:9795](∅→∅),[6.9747]→[6.9747:9795](∅→∅),[6.9795]→[9.16116:16897](∅→∅),[7.10207]→[6.9886:9936](∅→∅),[9.16897]→[6.9886:9936](∅→∅),[6.9886]→[6.9886:9936](∅→∅),[6.9936]→[9.16898:17086](∅→∅),[9.17086]→[6.10163:10196](∅→∅),[6.10163]→[6.10163:10196](∅→∅)
if let Some(sub) = sub_menu {match sub {model::SubMenu::Push { opt: Some(opt), .. } => {if let Some(ReadyState { repo, .. }) =model::is_ready_mut(model){return sub_menu_push_opt_selection(msg, opt, repo);}}model::SubMenu::Pull { opt: Some(opt), .. } => {if let Some(ReadyState { repo, .. }) =model::is_ready_mut(model){return sub_menu_pull_opt_selection(msg, opt, repo);}}model::SubMenu::CompareRemote {opt: Some(opt), ..} => {if let Some(ReadyState { repo, .. }) =model::is_ready_mut(model){return sub_menu_compare_remote_opt_selection(msg, opt, repo,);}}model::SubMenu::Push { opt: _, remote: _ }| model::SubMenu::Pull { opt: _, remote: _ }| model::SubMenu::CompareRemote {opt: _,remote: _,remote_channel: _,}| model::SubMenu::ResetChange| model::SubMenu::InitRepo { path: _ }| model::SubMenu::ImportFromGit { path: _ }| model::SubMenu::Add { recursive: _ } => {}}} - edit in inflorescence/src/main.rs at line 1491
if let Some(sub) = sub_menu {match sub {model::SubMenu::Push { opt: Some(opt), .. } => {return sub_menu_push_opt_selection(msg,&mut navigation.status_nav,opt,repo,);}model::SubMenu::Pull { opt: Some(opt), .. } => {return sub_menu_pull_opt_selection(msg,&mut navigation.status_nav,opt,repo,);}model::SubMenu::CompareRemote {opt: Some(opt),..} => {return sub_menu_compare_remote_opt_selection(msg,&mut navigation.status_nav,opt,repo,);}model::SubMenu::Push { opt: _, remote: _ }| model::SubMenu::Pull { opt: _, remote: _ }| model::SubMenu::CompareRemote {opt: _,remote: _,remote_channel: _,}| model::SubMenu::ResetChange| model::SubMenu::InitRepo { path: _ }| model::SubMenu::ImportFromGit { path: _ }| model::SubMenu::Add { recursive: _ } => {}}} - edit in inflorescence/src/main.rs at line 1929
nav: &mut nav_scrollable::State, - replacement in inflorescence/src/main.rs at line 1937
remote_selection(msg, remote, remote_names)remote_selection(msg, nav, remote, remote_names) - edit in inflorescence/src/main.rs at line 1944
nav: &mut nav_scrollable::State, - replacement in inflorescence/src/main.rs at line 1952
remote_selection(msg, remote, remote_names)remote_selection(msg, nav, remote, remote_names) - edit in inflorescence/src/main.rs at line 1959
nav: &mut nav_scrollable::State, - replacement in inflorescence/src/main.rs at line 1967
remote_selection(msg, remote, remote_names)remote_selection(msg, nav, remote, remote_names) - edit in inflorescence/src/main.rs at line 1978
nav: &mut nav_scrollable::State, - replacement in inflorescence/src/main.rs at line 1992
*remote = remote_names.into_iter().nth(ix + 1).cloned();let ix = ix + 1;nav_scrollable::scroll_down_to_section(nav, ix);*remote = remote_names.into_iter().nth(ix).cloned(); - edit in inflorescence/src/main.rs at line 1998
nav_scrollable::scroll_up_to_section(nav, 0); - replacement in inflorescence/src/main.rs at line 2009
*remote = remote_names.into_iter().nth(ix - 1).cloned();let ix = ix - 1;nav_scrollable::scroll_up_to_section(nav, ix);*remote = remote_names.into_iter().nth(ix).cloned(); - edit in inflorescence/src/main.rs at line 2015
nav_scrollable::scroll_down_to_section(nav,remote_names.len().saturating_sub(1),);