Skip to content

Commit

Permalink
remove TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
bvr-yr committed Mar 18, 2024
1 parent 664aa92 commit 441b4af
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/renderer/widgets/PasswordInputField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ bool CPasswordInputField::draw(const SRenderData& data) {

bool forceReload = false;

if (passwordLength == 0 && g_pHyprlock->getPasswordFailedAttempts() > failedAttempts)
forceReload = true;

failedAttempts = g_pHyprlock->getPasswordFailedAttempts();
passwordLength = g_pHyprlock->getPasswordBufferDisplayLen();
checkWaiting = g_pHyprlock->passwordCheckWaiting();

Expand Down Expand Up @@ -303,12 +307,6 @@ bool CPasswordInputField::draw(const SRenderData& data) {
forceReload = true;
}

// TODO: find out why failAsset not shown on empty input
if (passwordLength == 0 && g_pHyprlock->getPasswordFailedAttempts() > failedAttempts)
forceReload = true;

failedAttempts = g_pHyprlock->getPasswordFailedAttempts();

return dots.currentAmount != passwordLength || fade.animated || col.animated || redrawShadow || data.opacity < 1.0 || forceReload;
}

Expand Down Expand Up @@ -424,7 +422,7 @@ void CPasswordInputField::updateColors() {
// some cases when events happen too quick (within transitionMs)
// TODO: find more?
const bool LOCKCHANGED = col.stateNum != (col.invertNum ? !g_pHyprlock->m_bNumLock : g_pHyprlock->m_bNumLock) || col.stateCaps != g_pHyprlock->m_bCapsLock;
const bool ANIMONCHECK = checkWaiting && TARGET == (BORDERLESS ? INNER : OUTER);
const bool ANIMONCHECK = checkWaiting && (TARGET == (BORDERLESS ? INNER : OUTER) || TARGET == col.fail);

if (LOCKCHANGED || ANIMONCHECK) {
SOURCE = BORDERLESS ? col.inner : col.outer;
Expand Down

0 comments on commit 441b4af

Please sign in to comment.