Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix code review nits
Browse files Browse the repository at this point in the history
  • Loading branch information
robintown committed Apr 14, 2022
1 parent 6527d31 commit 765800c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/events/EventTileFactory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,9 @@ export function pickFactory(
return JSONEventFactory;
}

const noEventFactoryFactory: (() => Optional<Factory>) = () => showHiddenEvents ?
JSONEventFactory : undefined; // just don't render things that we shouldn't render
const noEventFactoryFactory: (() => Optional<Factory>) = () => showHiddenEvents
? JSONEventFactory
: undefined; // just don't render things that we shouldn't render

// We run all the event type checks first as they might override the factory entirely.

Expand Down
4 changes: 2 additions & 2 deletions src/utils/EventUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ export enum MessageModerationState {

// This is lazily initialized and cached since getMessageModerationState needs it,
// and is called on timeline rendering hot-paths
let msc3531Enabled: boolean;
let msc3531Enabled: boolean | null = null;
const getMsc3531Enabled = (): boolean => {
if (msc3531Enabled == null) {
if (msc3531Enabled === null) {
msc3531Enabled = SettingsStore.getValue("feature_msc3531_hide_messages_pending_moderation");
}
return msc3531Enabled;
Expand Down

0 comments on commit 765800c

Please sign in to comment.