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FRQC YKHE3XMWOWPGOWYSISF73MIAKN7WB3AHCV2OA4ECAFPF47YHUXEAC KEPKF3WO7ZZ2VB2DRVVTWTGPL7TCA52BMYUPHUNUJH6WO3HAT6JQC KWTBNTO3QUUE2YADF6SYW6G6ZOKYEWRJQKIWDGZXR33S3YNDVIZQC 5MUEECMJHU44FL5RDUR3VFBIWK3H4X2L5MVJ73J37PYHZWLUKU2AC PTWZYQFRWWUOE2WMQT26CKZKFSHAIJVJS3QWHJFYUFDRRTVPHSUAC UR4J677RWA3OFG6HQTD46BUUE5YFPSBEFCJAEM5OMT4V5A7SBNNQC A6Z4O6RC33HYWP7JIVQ6FDWE4EOCQWQTIGENK2WAHUGSHDDLSA7QC JZXYSIYDPBWQZCAMGDZ5BFMN6SU73EVVDIYEGTDJN6DVOSBNHN4QC OJPGHVC3RFBQ7TTSCZH6URSSATII3TESD74EISDNOTNXXSX7PQMAC ZIUHKVJKIXUQ3H3BK5XRTSBXAQXI5CZWKXCG7RSC56YT53GBDJNAC 3XRG4BB6V5V4DICZCMOZMLQNTANWKPO7BBRATTXOZLRNSEUQIA5AC WAOGSCOJ5A372BZKHEYD2BCDBCENNVLFYW3INKUOOAZMDADDIFIQC 23SFYK4Q5NKBPJG53PQNPWQH6UOUU2YKJEL7RLXYBRLJOJYV7AWQC WT3GA27PQ2AOAIGK65O3Q4DMX4AZDVNULBLRL6GF4QW6QCASUEAAC 6YZAVBWU6E5FYOI5JGEIPXGZLIKAW6LS2AOFIQWEE5DMOPPCD5PQC selection::Unified::EntireLog(log_change) => match log_change {Some(selection::LogChange {file:Some(selection::LogChangeFileSelection {diff_selected, ..}),..}) => !*diff_selected,_ => false,},
selection::Unified::EntireLog(Some(selection::LogChange {file: Some(selection::LogChangeFileSelection { diff_selected, .. }),..})) => !*diff_selected,
repo_path: &repo_path,repo: repo.as_ref(),record_msg: record_msg.as_ref(),status_selection: None,channel_selection: None,entire_log_selection: None,
repo_path: repo_path.clone(),sub: SubState::Loading {user_ids: vec![],repo: None,},
let status_nav = nav_scrollable::State::default();let repo = Some(Repo {state: repo_state,status_nav,switching_channel: false,forking_channel_name: None,entire_log: None,});
repo_path: &repo_path,repo: repo.as_ref(),record_msg: record_msg.as_ref(),status_selection: None,channel_selection: None,entire_log_selection: None,
repo_path: repo_path.clone(),sub: SubState::Ready(ready_state),
let status_nav = nav_scrollable::State::default();let repo = Some(Repo {state: repo_state,status_nav,switching_channel: false,forking_channel_name: None,entire_log: None,});
let ready_state = ReadyState {user_id: Id::default().unwrap(),repo: repo.clone(),selection: default(),navigation: default(),record_msg: default(),logs: default(),forking_channel_name: default(),};
repo_path: &repo_path,repo: repo.as_ref(),record_msg: record_msg.as_ref(),status_selection: None,channel_selection: None,entire_log_selection: None,
repo_path: repo_path.clone(),sub: SubState::Ready(ready_state),
let state = State {window_size: WINDOW_SIZE,repo_path: &repo_path,repo: repo.as_ref(),record_msg: record_msg.as_ref(),status_selection: None,channel_selection: None,entire_log_selection: None,};test_view_change_sim(&mut results,uniq_name,view(state, window_id),size,|sim| {let target = sim.find(selector::text("untracked.rs")).unwrap();sim.point_at(target.bounds.center());},);
test_view_change_sim(&mut results, uniq_name, view(&state), size, |sim| {let target = sim.find(selector::text("untracked.rs")).unwrap();sim.point_at(target.bounds.center());});
repo_path: &repo_path,repo: repo.as_ref(),record_msg: record_msg.as_ref(),status_selection,channel_selection: None,entire_log_selection: None,
repo_path: repo_path.clone(),sub: SubState::Ready(ready_state),
assert_eq!(&content.text(), record_msg);
let ready_state = get_ready_state(&state);assert!(ready_state.record_msg.is_some());assert_matches!(ready_state.record_msg.as_ref().unwrap(),RecordMsg::Typing(_));if let RecordMsg::Typing(content) =ready_state.record_msg.as_ref().unwrap(){assert_eq!(&content.text(), record_msg);}
state.selection.view.status = Some(selection::Status::UntrackedFile {ix: 0,path: file_to_record.to_string(),diff_selected: false,});
{let ready_state = get_ready_state_mut(&mut state);ready_state.selection.status = Some(selection::Status::UntrackedFile {ix: 0,path: file_to_record.to_string(),diff_selected: false,});}
assert_eq!(&content.text(), record_msg);
let ready_state = get_ready_state(&state);assert!(ready_state.record_msg.is_some());assert_matches!(ready_state.record_msg.as_ref().unwrap(),RecordMsg::Typing(_));if let RecordMsg::Typing(content) =ready_state.record_msg.as_ref().unwrap(){assert_eq!(&content.text(), record_msg);}
assert_eq!(&content.text(), record_msg);
let ready_state = get_ready_state(&state);assert!(ready_state.record_msg.is_some());assert_matches!(ready_state.record_msg.as_ref().unwrap(),RecordMsg::Typing(_));if let RecordMsg::Typing(content) =ready_state.record_msg.as_ref().unwrap(){assert_eq!(&content.text(), record_msg);}
assert!(state.record_msg.is_some());assert_matches!(state.record_msg.as_ref().unwrap(),app::RecordMsg::Canceled { old_msg } if old_msg == record_msg);
{let ready_state = get_ready_state(&state);assert!(ready_state.record_msg.is_some());assert_matches!(ready_state.record_msg.as_ref().unwrap(),RecordMsg::Canceled { old_msg } if old_msg == record_msg);}
assert!(state.record_msg.is_some());assert!(state.record_msg.is_some());assert_matches!(state.record_msg.as_ref().unwrap(),app::RecordMsg::Typing(msg) if msg.text() == record_msg);
{let ready_state = get_ready_state(&state);assert!(ready_state.record_msg.is_some());assert!(ready_state.record_msg.is_some());assert_matches!(ready_state.record_msg.as_ref().unwrap(),RecordMsg::Typing(msg) if msg.text() == record_msg);}
let repo::State {dir_name: _,channel: _,other_channels: _,untracked_files,changed_files,log,} = &state.repo.as_ref().unwrap().state;
let SubState::Ready(ready_state) = &mut state.sub.sub else {panic!("Unexpected state: {:?}", state.sub)};
state.selection.view.status =Some(selection::Status::LogChange(selection::LogChange {ix: 0,hash: change_hash_0,message: "".to_string(),file: None,}));
{let ready_state = get_ready_state_mut(&mut state);ready_state.selection.status =Some(selection::Status::LogChange(selection::LogChange {ix: 0,hash: change_hash_0,message: "".to_string(),file: None,}));}
state.selection.view.status =Some(selection::Status::LogChange(selection::LogChange {ix: 0,hash: change_hash_1,message: "".to_string(),file: None,}));
{let ready_state = get_ready_state_mut(&mut state);ready_state.selection.status =Some(selection::Status::LogChange(selection::LogChange {ix: 0,hash: change_hash_1,message: "".to_string(),file: None,}));}
#[track_caller]fn get_ready_state(state: &State) -> &ReadyState {let SubState::Ready(ready_state) = &state.sub.sub else {panic!("Unexpected state: {:?}", state.sub.sub)};ready_state}#[track_caller]fn get_ready_state_mut(state: &mut State) -> &mut ReadyState {let state_dbg = format!("{:?}", state.sub.sub);let SubState::Ready(ready_state) = &mut state.sub.sub else {panic!("Unexpected state: {state_dbg}")};ready_state}
if let Some(RecordMsg::Typing(msg)) = record_msg.as_ref() {let msg = msg.text();if msg.trim().is_empty() {info!("Cannot record with an empty message");} else {// TODO: this call has CLI prompt - replace itlet (sk, _) = user_id.decrypt().unwrap();let sk = Arc::new(sk);state.repo_tx_in.send(repo::MsgIn::Record { msg, sk }).unwrap();
let msg = msg.text();if msg.trim().is_empty() {info!("Cannot record with an empty message");} else {// TODO: this call has CLI prompt - replace itlet (sk, _) = user_id.decrypt().unwrap();let sk = Arc::new(sk);state.repo_tx_in.send(repo::MsgIn::Record { msg, sk }).unwrap();
// Reset most things*selection = selection::State::default();*record_msg = None;// Status view fieldsnavigation.files_diffs.diffs_nav = None;navigation.status_logs_navs.files_nav = None;navigation.status_logs_navs.diffs_nav = None;
// Reset most things*selection = selection::State::default();*record_msg = None;// Status view fieldsnavigation.files_diffs.diffs_nav = None;navigation.status_logs_navs.files_nav = None;navigation.status_logs_navs.diffs_nav = None;
if let Some(RecordMsg::Typing(msg)) = record_msg.as_ref() {let old_msg = msg.text();*record_msg = if !old_msg.trim().is_empty() {Some(RecordMsg::Canceled { old_msg })} else {None};}
let old_msg = msg.text();*record_msg = if !old_msg.trim().is_empty() {Some(RecordMsg::Canceled { old_msg })} else {None};