Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust default step to 2 #375

Merged
merged 1 commit into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion com.neil-enns.trackaudio.sdPlugin/pi/mainVolume.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
setting="changeAmount"
min="1"
max="10"
default="1"
default="2"
showlabels
required
></sdpi-range>
Expand Down
2 changes: 1 addition & 1 deletion com.neil-enns.trackaudio.sdPlugin/pi/stationVolume.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
setting="changeAmount"
min="1"
max="10"
default="1"
default="2"
showlabels
required
></sdpi-range>
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/mainVolume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ export class MainVolumeController extends BaseController {
* Convenience property to get the changeAmount value of settings.
*/
get changeAmount() {
const amount = this.settings.changeAmount ?? 1;
return amount > 0 ? amount : 1;
const amount = this.settings.changeAmount ?? 2;
return amount > 0 ? amount : 2;
}

override reset(): void {
Expand Down
7 changes: 4 additions & 3 deletions src/controllers/stationVolume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ export class StationVolumeController extends BaseController {

this._outputVolume = newValue;

// This isn't debounced to ensure speedy updates when the volume changes.
// This isn't debounced to ensure speedy updates when the volume changes.
this.refreshImage();
this.refreshTitle();
this.refreshTitle();
}

/**
Expand Down Expand Up @@ -205,7 +205,8 @@ export class StationVolumeController extends BaseController {
* Convenience property to get the changeAmount value of settings.
*/
get changeAmount() {
return this.settings.changeAmount ?? 1;
const amount = this.settings.changeAmount ?? 2;
return amount > 0 ? amount : 2;
}

override reset(): void {
Expand Down