diff --git a/app/src/ui/lib/configure-git-user.tsx b/app/src/ui/lib/configure-git-user.tsx index 0a004d22dd..f02de55eee 100644 --- a/app/src/ui/lib/configure-git-user.tsx +++ b/app/src/ui/lib/configure-git-user.tsx @@ -35,7 +35,6 @@ interface IConfigureGitUserState { readonly name: string readonly email: string - readonly avatarURL: string | null /** * If unable to save Git configuration values (name, email) @@ -67,7 +66,6 @@ export class ConfigureGitUser extends React.Component< globalUserEmail: null, name: '', email: '', - avatarURL: null, } } @@ -132,7 +130,6 @@ export class ConfigureGitUser extends React.Component< if (preferredEmail) { this.setState({ email: preferredEmail.email, - avatarURL: this.avatarURLForEmail(preferredEmail.email), }) } } @@ -235,20 +232,7 @@ export class ConfigureGitUser extends React.Component< } private onEmailChange = (email: string) => { - const avatarURL = this.avatarURLForEmail(email) - - this.setState({ - name: this.state.name, - email, - avatarURL, - }) - } - - private avatarURLForEmail(email: string): string | null { - const matchingAccount = this.props.accounts.find( - a => a.emails.findIndex(e => e.email === email) > -1 - ) - return matchingAccount ? matchingAccount.avatarURL : null + this.setState({ email }) } private save = async () => { diff --git a/app/src/ui/preferences/preferences.tsx b/app/src/ui/preferences/preferences.tsx index cab42df7ad..ab9f4f5f9b 100644 --- a/app/src/ui/preferences/preferences.tsx +++ b/app/src/ui/preferences/preferences.tsx @@ -61,7 +61,6 @@ interface IPreferencesState { readonly confirmRepositoryRemoval: boolean readonly confirmDiscardChanges: boolean readonly confirmForcePush: boolean - readonly automaticallySwitchTheme: boolean readonly uncommittedChangesStrategyKind: UncommittedChangesStrategyKind readonly availableEditors: ReadonlyArray readonly selectedExternalEditor: ExternalEditor | null @@ -100,7 +99,6 @@ export class Preferences extends React.Component< confirmDiscardChanges: false, confirmForcePush: false, uncommittedChangesStrategyKind: uncommittedChangesStrategyKindDefault, - automaticallySwitchTheme: false, selectedExternalEditor: this.props.selectedExternalEditor, availableShells: [], selectedShell: this.props.selectedShell, diff --git a/app/src/ui/rebase/rebase-flow.tsx b/app/src/ui/rebase/rebase-flow.tsx index f3af60512d..bd3b729af3 100644 --- a/app/src/ui/rebase/rebase-flow.tsx +++ b/app/src/ui/rebase/rebase-flow.tsx @@ -73,14 +73,6 @@ interface IRebaseFlowProps { /** A component for initiating and performing a rebase of the current branch. */ export class RebaseFlow extends React.Component { - public constructor(props: IRebaseFlowProps) { - super(props) - - this.state = { - userHasResolvedConflicts: false, - } - } - private moveToShowConflictedFileState = (step: ConfirmAbortStep) => { const { conflictState } = step this.props.dispatcher.setRebaseFlowStep(this.props.repository, { diff --git a/app/src/ui/repository.tsx b/app/src/ui/repository.tsx index cd7da3ab23..32786eabec 100644 --- a/app/src/ui/repository.tsx +++ b/app/src/ui/repository.tsx @@ -87,7 +87,6 @@ interface IRepositoryViewProps { } interface IRepositoryViewState { - readonly sidebarHasFocusWithin: boolean readonly changesListScrollTop: number readonly compareListScrollTop: number } @@ -108,7 +107,6 @@ export class RepositoryView extends React.Component< super(props) this.state = { - sidebarHasFocusWithin: false, changesListScrollTop: 0, compareListScrollTop: 0, } @@ -283,9 +281,6 @@ export class RepositoryView extends React.Component< } private onSidebarFocusWithinChanged = (sidebarHasFocusWithin: boolean) => { - // this lets us know that focus is somewhere within the sidebar - this.setState({ sidebarHasFocusWithin }) - if ( sidebarHasFocusWithin === false && this.props.state.selectedSection === RepositorySectionTab.History