mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
🔥 refreshingCount.
This commit is contained in:
@@ -42,7 +42,6 @@ export default class GitRepositoryAsync {
|
||||
this.upstream = {}
|
||||
this.submodules = {}
|
||||
|
||||
this._refreshingCount = 0
|
||||
this._refreshingPromise = Promise.resolve()
|
||||
|
||||
let {refreshOnWindowFocus = true} = options
|
||||
@@ -460,8 +459,6 @@ export default class GitRepositoryAsync {
|
||||
// Returns a {Promise} which resolves to a {Number} which is the refreshed
|
||||
// status bit for the path.
|
||||
refreshStatusForPath (_path) {
|
||||
this._refreshingCount++
|
||||
|
||||
let relativePath
|
||||
return this.getRepo()
|
||||
.then(repo => {
|
||||
@@ -483,10 +480,6 @@ export default class GitRepositoryAsync {
|
||||
|
||||
return status
|
||||
})
|
||||
.then(status => {
|
||||
this._refreshingCount--
|
||||
return status
|
||||
})
|
||||
}
|
||||
|
||||
// Returns a Promise that resolves to the status bit of a given path if it has
|
||||
@@ -876,8 +869,6 @@ export default class GitRepositoryAsync {
|
||||
//
|
||||
// Returns a {Promise} which will resolve to {null}.
|
||||
_refreshStatus () {
|
||||
this._refreshingCount++
|
||||
|
||||
return Promise.all([this._getRepositoryStatus(), this._getSubmoduleStatuses()])
|
||||
.then(([repositoryStatus, submoduleStatus]) => {
|
||||
const statusesByPath = _.extend({}, repositoryStatus, submoduleStatus)
|
||||
@@ -886,7 +877,6 @@ export default class GitRepositoryAsync {
|
||||
}
|
||||
this.pathStatusCache = statusesByPath
|
||||
})
|
||||
.then(_ => this._refreshingCount--)
|
||||
}
|
||||
|
||||
// Refreshes the git status.
|
||||
@@ -967,13 +957,6 @@ export default class GitRepositoryAsync {
|
||||
// Section: Private
|
||||
// ================
|
||||
|
||||
// Is the repository currently refreshing its status?
|
||||
//
|
||||
// Returns a {Boolean}.
|
||||
_isRefreshing () {
|
||||
return this._refreshingCount === 0
|
||||
}
|
||||
|
||||
// Has the repository been destroyed?
|
||||
//
|
||||
// Returns a {Boolean}.
|
||||
|
||||
Reference in New Issue
Block a user