Skip to content

Commit

Permalink
Merge pull request #16543 from nextcloud/backport/16532/stable16
Browse files Browse the repository at this point in the history
[stable16] Fix max contrast retrieval to limit minimum color for relative time
  • Loading branch information
rullzer authored Jul 26, 2019
2 parents 00379eb + 6ee98f3 commit 159ff6d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions apps/files/js/filelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -1542,13 +1542,16 @@

try {
var maxContrastHex = window.getComputedStyle(document.documentElement)
.getPropertyValue('--color-text-maxcontrast')
.getPropertyValue('--color-text-maxcontrast').trim()
if (maxContrastHex.length < 4) {
throw Error();
}
var maxContrast = parseInt(maxContrastHex.substring(1, 3), 16)
} catch(error) {
var maxContrast = OCA.Accessibility
&& OCA.Accessibility.theme === 'themedark'
? '130'
: '118'
? 130
: 118
}

// size column
Expand Down

0 comments on commit 159ff6d

Please sign in to comment.