mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 13:14:16 +08:00
fix(find-in-thread): minor rename fixes
This commit is contained in:
parent
10e0fcc965
commit
b727fe374d
3 changed files with 8 additions and 9 deletions
|
@ -61,7 +61,9 @@ export default class FindInThread extends React.Component {
|
|||
return ""
|
||||
}
|
||||
|
||||
_navEnabled() { return this.state.resultsLength > 0 }
|
||||
_navEnabled() {
|
||||
return this.state.resultsLength > 0;
|
||||
}
|
||||
|
||||
_onPrevResult = () => {
|
||||
if (this._navEnabled()) { Actions.previousSearchResult() }
|
||||
|
|
|
@ -31,7 +31,7 @@ class Scrollbar extends React.Component
|
|||
|
||||
componentDidMount: ->
|
||||
if @props.scrollbarTickProvider?.listen
|
||||
@_tickUnsub = @props.scrollbarTickProvider.listen(@_onTickProvider)
|
||||
@_tickUnsub = @props.scrollbarTickProvider.listen(@_onTickProviderChange)
|
||||
|
||||
shouldComponentUpdate: (nextProps, nextState) =>
|
||||
not Utils.isEqualReact(nextProps, @props) or
|
||||
|
@ -69,7 +69,7 @@ class Scrollbar extends React.Component
|
|||
@props.getScrollRegion()._recomputeDimensions(options)
|
||||
@_recomputeDimensions(options)
|
||||
|
||||
_onTickProvider: =>
|
||||
_onTickProviderChange: =>
|
||||
if not @props.scrollbarTickProvider?.scrollbarTicks
|
||||
throw new Error("The scrollbarTickProvider must implement `scrollbarTicks`")
|
||||
@setState scrollbarTicks: @props.scrollbarTickProvider.scrollbarTicks()
|
||||
|
|
|
@ -23,15 +23,12 @@ class SearchableComponentStore extends NylasStore {
|
|||
this.listenTo(Actions.previousSearchResult, this._previousSearchResult)
|
||||
}
|
||||
|
||||
/**
|
||||
* The searchIndex
|
||||
*/
|
||||
getCurrentRegionIndex(regionId) {
|
||||
let searchIndex = null;
|
||||
let regionOffset = null;
|
||||
if (regionId && this.currentMatch && this.currentMatch.node.getAttribute('data-region-id') === regionId) {
|
||||
searchIndex = +this.currentMatch.node.getAttribute('data-render-index')
|
||||
regionOffset = +this.currentMatch.node.getAttribute('data-render-index')
|
||||
}
|
||||
return searchIndex
|
||||
return regionOffset
|
||||
}
|
||||
|
||||
getCurrentSearchData() {
|
||||
|
|
Loading…
Reference in a new issue