1
0
Fork 0
mirror of https://github.com/Luzifer/streamdeck.git synced 2024-12-20 09:41:19 +00:00

Fix: Do not pile up the same page on refresh

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-11-14 15:44:17 +01:00
parent 512ebfaa8a
commit 5ee7785103
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

View file

@ -246,7 +246,10 @@ func togglePage(page string) error {
}(idx, kd)
}
pageStack = append([]string{page}, pageStack...)
if len(pageStack) == 0 || pageStack[0] != page {
pageStack = append([]string{page}, pageStack...)
}
if len(pageStack) > 100 {
pageStack = pageStack[:100]
}