mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-11-04 10:11:03 +01:00 
			
		
		
		
	Hide Clear room list filter field shortcut if new search enabled (#7798)
				
					
				
			This commit is contained in:
		
							parent
							
								
									8d3c2eddd6
								
							
						
					
					
						commit
						226eed2a7f
					
				@ -19,6 +19,7 @@ import { _td } from "../languageHandler";
 | 
			
		||||
import { isMac, Key } from "../Keyboard";
 | 
			
		||||
import { ISetting } from "../settings/Settings";
 | 
			
		||||
import SettingsStore from "../settings/SettingsStore";
 | 
			
		||||
import IncompatibleController from "../settings/controllers/IncompatibleController";
 | 
			
		||||
 | 
			
		||||
export enum KeyBindingAction {
 | 
			
		||||
    /** Send a message */
 | 
			
		||||
@ -396,6 +397,7 @@ const KEYBOARD_SHORTCUTS: IKeyboardShortcuts = {
 | 
			
		||||
            key: Key.ESCAPE,
 | 
			
		||||
        },
 | 
			
		||||
        displayName: _td("Clear room list filter field"),
 | 
			
		||||
        controller: new IncompatibleController("feature_spotlight", { key: null }),
 | 
			
		||||
    },
 | 
			
		||||
    [KeyBindingAction.NextRoom]: {
 | 
			
		||||
        default: {
 | 
			
		||||
@ -591,7 +593,12 @@ export const getCustomizableShortcuts = (): IKeyboardShortcuts => {
 | 
			
		||||
        displayName: _td("Redo edit"),
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    return keyboardShortcuts;
 | 
			
		||||
    return Object.keys(keyboardShortcuts).filter(k => {
 | 
			
		||||
        return !keyboardShortcuts[k].controller?.settingDisabled;
 | 
			
		||||
    }).reduce((o, key) => {
 | 
			
		||||
        o[key] = keyboardShortcuts[key];
 | 
			
		||||
        return o;
 | 
			
		||||
    }, {});
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const getKeyboardShortcuts = (): IKeyboardShortcuts => {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user