Use a QueryMatcher for forward dialog filtering
This also allows us to filter by room aliases. Signed-off-by: Robin Townsend <robin@robin.town>
This commit is contained in:
parent
4ef69fcbf6
commit
59660df0cb
2 changed files with 14 additions and 5 deletions
|
@ -35,8 +35,8 @@ export const useSettingValue = <T>(settingName: string, roomId: string = null, e
|
|||
};
|
||||
|
||||
// Hook to fetch whether a feature is enabled and dynamically update when that changes
|
||||
export const useFeatureEnabled = (featureName: string, roomId: string = null) => {
|
||||
const [enabled, setEnabled] = useState(SettingsStore.getValue(featureName, roomId));
|
||||
export const useFeatureEnabled = (featureName: string, roomId: string = null): boolean => {
|
||||
const [enabled, setEnabled] = useState(SettingsStore.getValue<boolean>(featureName, roomId));
|
||||
|
||||
useEffect(() => {
|
||||
const ref = SettingsStore.watchSetting(featureName, roomId, () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue