feat(predlozhnik): allow useful switches with active selection
this lets users switch between all compatible prepositions and cases for the currently selected combination, which makes the UI a bit easier to explore. Спасибо /u/wrest3! Change-Id: Iaf4e90403c90beb5d75acfa73fd0f5f2cb5035c5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5996 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
This commit is contained in:
		
							parent
							
								
									1a5e62c076
								
							
						
					
					
						commit
						caf068253a
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -152,8 +152,8 @@ fn объясни(падеж: Падеж, предлог: &str) -> Html {
 | 
			
		|||
fn ограничить(м: &Модель) -> Вывод {
 | 
			
		||||
    match (м.падеж, &м.предлог) {
 | 
			
		||||
        (Some(пж), Some(пл)) => Вывод {
 | 
			
		||||
            доступные_падежи: BTreeSet::from([пж]),
 | 
			
		||||
            доступные_предлоги: BTreeSet::from([*пл]),
 | 
			
		||||
            доступные_падежи: (*ПО_ПРЕДЛОГУ)[пл].clone(),
 | 
			
		||||
            доступные_предлоги: (*ПО_ПАДЕЖУ)[&пж].clone(),
 | 
			
		||||
            объяснение: Some(объясни(пж, пл)),
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue