Skip to content

Commit

Permalink
Merge pull request #4770 from thelounge/smallTScleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxLeiter committed Jul 31, 2023
2 parents 2878f87 + c0b38d4 commit 9f05a75
Showing 1 changed file with 24 additions and 25 deletions.
49 changes: 24 additions & 25 deletions client/js/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,31 +90,30 @@ export type State = {
searchEnabled: boolean;
};

const state = () =>
({
appLoaded: false,
activeChannel: undefined,
currentUserVisibleError: null,
desktopNotificationState: detectDesktopNotificationState(),
isAutoCompleting: false,
isConnected: false,
networks: [],
mentions: [],
hasServiceWorker: false,
pushNotificationState: "unsupported",
serverConfiguration: null,
sessions: [],
sidebarOpen: false,
sidebarDragging: false,
userlistOpen: storage.get("thelounge.state.userlist") !== "false",
versionData: null,
versionStatus: "loading",
versionDataExpired: false,
serverHasSettings: false,
messageSearchResults: null,
messageSearchPendingQuery: null,
searchEnabled: false,
} as State);
const state = (): State => ({
appLoaded: false,
activeChannel: undefined,
currentUserVisibleError: null,
desktopNotificationState: detectDesktopNotificationState(),
isAutoCompleting: false,
isConnected: false,
networks: [],
mentions: [],
hasServiceWorker: false,
pushNotificationState: "unsupported",
serverConfiguration: null,
sessions: [],
sidebarOpen: false,
sidebarDragging: false,
userlistOpen: storage.get("thelounge.state.userlist") !== "false",
versionData: null,
versionStatus: "loading",
versionDataExpired: false,
serverHasSettings: false,
messageSearchResults: null,
messageSearchPendingQuery: null,
searchEnabled: false,
});

type Getters = {
findChannelOnCurrentNetwork: (state: State) => (name: string) => ClientChan | undefined;
Expand Down

0 comments on commit 9f05a75

Please sign in to comment.