1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-07 22:15:38 -05:00

dwl: tag changes

This commit is contained in:
bbedward
2025-10-29 23:39:12 -04:00
parent 76637fab33
commit 19b13a1e81
2 changed files with 48 additions and 19 deletions

View File

@@ -218,17 +218,22 @@ Singleton {
return [0]
}
const activeTags = output.tags
.filter(tag => tag.state === 1)
.map(tag => tag.tag)
const occupiedTags = output.tags
.filter(tag => tag.clients > 0)
.map(tag => tag.tag)
.sort((a, b) => a - b)
if (occupiedTags.length === 0) {
const combinedTags = [...new Set([...activeTags, ...occupiedTags])].sort((a, b) => a - b)
if (combinedTags.length === 0) {
return [0]
}
const minTag = occupiedTags[0]
const maxTag = occupiedTags[occupiedTags.length - 1]
const minTag = combinedTags[0]
const maxTag = combinedTags[combinedTags.length - 1]
const visibleTags = []
for (let i = minTag; i <= maxTag; i++) {