Fix typos

This commit is contained in:
Thomas Nordquist
2019-03-26 16:04:32 +01:00
parent 01f42a1c32
commit 100bfdd560
9 changed files with 25 additions and 25 deletions

View File

@@ -1,7 +1,7 @@
import { AppState } from '../reducers'
import { clearLegacyConnectionOptions, loadLegacyConnectionOptions } from '../model/LegacyConnectionSettings'
import { ConnectionOptions, createEmptyConnection, makeDefaultConnections, CertificateParameters } from '../model/ConnectionOptions'
import { default as persistantStorage, StorageIdentifier } from '../PersistantStorage'
import { default as persistentStorage, StorageIdentifier } from '../PersistentStorage'
import { Dispatch } from 'redux'
import { showError } from './Global'
import { remote } from 'electron'
@@ -21,7 +21,7 @@ export const loadConnectionSettings = () => async (dispatch: Dispatch<any>, getS
let connections
try {
await ensureConnectionsHaveBeenInitialized()
connections = await persistantStorage.load(storedConnectionsIdentifier)
connections = await persistentStorage.load(storedConnectionsIdentifier)
} catch (error) {
dispatch(showError(error))
}
@@ -87,7 +87,7 @@ async function openCertificate(): Promise<CertificateParameters> {
export const saveConnectionSettings = () => async (dispatch: Dispatch<any>, getState: () => AppState) => {
try {
console.log('store settings')
await persistantStorage.store(storedConnectionsIdentifier, getState().connectionManager.connections)
await persistentStorage.store(storedConnectionsIdentifier, getState().connectionManager.connections)
} catch (error) {
dispatch(showError(error))
}
@@ -111,7 +111,7 @@ export const deleteSubscription = (subscription: string, connectionId: string):
type: ActionTypes.CONNECTION_MANAGER_DELETE_SUBSCRIPTION,
})
export const createConnection = () => (dispatch: Dispatch<any>, getState: () => AppState) => {
export const createConnection = () => (dispatch: Dispatch<any>) => {
const newConnection = createEmptyConnection()
dispatch(addConnection(newConnection))
dispatch(selectConnection(newConnection.id))
@@ -155,12 +155,12 @@ export const deleteConnection = (connectionId: string) => (dispatch: Dispatch<an
}
async function ensureConnectionsHaveBeenInitialized() {
const connections = await persistantStorage.load(storedConnectionsIdentifier)
const connections = await persistentStorage.load(storedConnectionsIdentifier)
const requiresInitialization = !connections
if (requiresInitialization) {
const migratedConnection = loadLegacyConnectionOptions()
const defaultConnections = makeDefaultConnections()
persistantStorage.store(storedConnectionsIdentifier, {
persistentStorage.store(storedConnectionsIdentifier, {
...migratedConnection,
...defaultConnections,
})

View File

@@ -2,7 +2,7 @@ import * as q from '../../../backend/src/Model'
import { AppState } from '../reducers'
import { autoExpandLimitSet } from '../components/Settings'
import { batchActions } from 'redux-batched-actions'
import { default as persistantStorage, StorageIdentifier } from '../PersistantStorage'
import { default as persistentStorage, StorageIdentifier } from '../PersistentStorage'
import { Dispatch } from 'redux'
import { showError } from './Global'
import { showTree } from './Tree'
@@ -19,7 +19,7 @@ const settingsIdentifier: StorageIdentifier<Partial<SettingsState>> = {
export const loadSettings = () => async (dispatch: Dispatch<any>, _getState: () => AppState) => {
try {
const settings = await persistantStorage.load(settingsIdentifier)
const settings = await persistentStorage.load(settingsIdentifier)
dispatch({
settings,
type: ActionTypes.SETTINGS_DID_LOAD_SETTINGS,
@@ -37,7 +37,7 @@ export const storeSettings = () => async (dispatch: Dispatch<any>, getState: ()
}
try {
await persistantStorage.store(settingsIdentifier, settings)
await persistentStorage.store(settingsIdentifier, settings)
} catch (error) {
dispatch(showError(error))
}
@@ -74,7 +74,7 @@ export const toggleSettingsVisibility = () => (dispatch: Dispatch<any>, _getStat
dispatch(storeSettings())
}
export const togglehighlightTopicUpdates = () => (dispatch: Dispatch<any>, _getState: () => AppState) => {
export const toggleHighlightTopicUpdates = () => (dispatch: Dispatch<any>, _getState: () => AppState) => {
dispatch({
type: ActionTypes.SETTINGS_TOGGLE_HIGHLIGHT_ACTIVITY,
})