Skip to content

Commit

Permalink
Improve code: get durations values
Browse files Browse the repository at this point in the history
  • Loading branch information
pakaoraki committed Mar 27, 2024
1 parent 3626715 commit 79915b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions caffeine@patapon.info/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ class CaffeineToggle extends QuickSettings.QuickMenuToggle {
_syncTimers(resetDefault) {
this._itemsSection.removeAll();
this._timerItems.clear();
const variantDuration = this._settings.get_value(DURATION_TIMER_LIST);
const durationValues = variantDuration.deepUnpack();
durationValues.push(0); // Add '0' for the 'infinite' entry (no timer)
// Get duration list and add '0' for the 'infinite' entry (no timer)
let durationValues = this._settings.get_value(DURATION_TIMER_LIST).deepUnpack();
durationValues.push(0);

// Create menu timer
for (const [index, timer] of durationValues.entries()) {
Expand Down

0 comments on commit 79915b7

Please sign in to comment.