aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-31 01:58:39 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-31 01:58:39 +0800
commit9a0595a607af2d5d33ea68dae01dce1f85d13680 (patch)
treef23b54bd4db34461acfa5c1da4d551fe8cd10248 /packages
parent37405038e8f377b65f4dc32b09932fb9ba38efc5 (diff)
downloaddexon-sol-tools-9a0595a607af2d5d33ea68dae01dce1f85d13680.tar
dexon-sol-tools-9a0595a607af2d5d33ea68dae01dce1f85d13680.tar.gz
dexon-sol-tools-9a0595a607af2d5d33ea68dae01dce1f85d13680.tar.bz2
dexon-sol-tools-9a0595a607af2d5d33ea68dae01dce1f85d13680.tar.lz
dexon-sol-tools-9a0595a607af2d5d33ea68dae01dce1f85d13680.tar.xz
dexon-sol-tools-9a0595a607af2d5d33ea68dae01dce1f85d13680.tar.zst
dexon-sol-tools-9a0595a607af2d5d33ea68dae01dce1f85d13680.zip
Rename functions and get rid of old unused function
Diffstat (limited to 'packages')
-rw-r--r--packages/instant/src/util/progress.ts16
1 files changed, 4 insertions, 12 deletions
diff --git a/packages/instant/src/util/progress.ts b/packages/instant/src/util/progress.ts
index 5649a78c8..3c328f2f1 100644
--- a/packages/instant/src/util/progress.ts
+++ b/packages/instant/src/util/progress.ts
@@ -63,8 +63,8 @@ export class Progress {
private _tick(): void {
const rawPercentageDone =
this._tickingStatus.state === TickingState.Finishing
- ? this._tickFinishing(this._tickingStatus)
- : this._tickNormal();
+ ? this._getNewPercentageFinishing(this._tickingStatus)
+ : this._getNewPercentageNormal();
const maxPercentage = this._tickingStatus.state === TickingState.Finishing ? 100 : PROGRESS_STALL_AT_PERCENTAGE;
const percentageDone = Math.min(rawPercentageDone, maxPercentage);
@@ -82,7 +82,7 @@ export class Progress {
}
}
- private _tickNormal(): number {
+ private _getNewPercentageNormal(): number {
if (_.isUndefined(this._startTimeUnix) || _.isUndefined(this._expectedTimeMs)) {
throw new Error('Cant tick, missing var');
}
@@ -93,15 +93,7 @@ export class Progress {
return percentageDone;
}
- private _tickFinishing(finishingState: TickingFinishingStatus): number {
+ private _getNewPercentageFinishing(finishingState: TickingFinishingStatus): number {
return this._percentageDone + finishingState.increasePercentageEveryTick;
}
-
- private _clearInterval(): void {
- return window.clearInterval(this._intervalId);
- }
-
- // reset function
-
- // end function
}