diff --git a/.forgejo/workflows/pipeline.yaml b/.forgejo/workflows/pipeline.yaml index 089f873..c76ae86 100644 --- a/.forgejo/workflows/pipeline.yaml +++ b/.forgejo/workflows/pipeline.yaml @@ -19,17 +19,6 @@ jobs: VERSION=${GITHUB_REF_NAME#v} echo "Bumping version to $VERSION" npm version $VERSION --no-git-tag-version - - # Configure Git - git config user.name "Forgejo Actions" - git config user.email "actions@noreply.flegr.me" - - # Commit and push back to main if version changed - if [ -n "$(git status --porcelain package.json)" ]; then - git add package.json package-lock.json - git commit -m "chore: bump version to $VERSION [skip ci]" - git push origin HEAD:main - fi - run: npm ci - run: npm run dist:linux - name: Build Windows installer with 32-bit Wine prefix diff --git a/static/shared/app-core.js b/static/shared/app-core.js index f14b88d..a7ad4e1 100644 --- a/static/shared/app-core.js +++ b/static/shared/app-core.js @@ -354,6 +354,11 @@ function formatDate(isoString) { return d.toLocaleDateString(); } +function scrollMessagesToBottom() { + if (!el.messageList) return; + el.messageList.scrollTop = el.messageList.scrollHeight; +} + let audioCtx = null; // Global interaction listener to unlock AudioContext (autoplay policy) @@ -628,7 +633,17 @@ function renderMessages(messages) { state.lastMessageId = messages[0].id; } - el.messageList.scrollTop = el.messageList.scrollHeight; + scrollMessagesToBottom(); + requestAnimationFrame(() => { + scrollMessagesToBottom(); + }); + + // GIF/image height resolves after initial paint; keep chat pinned to latest. + for (const gifImage of el.messageList.querySelectorAll(".msg-gif img")) { + if (gifImage.complete) continue; + gifImage.addEventListener("load", scrollMessagesToBottom, { once: true }); + gifImage.addEventListener("error", scrollMessagesToBottom, { once: true }); + } } function renderMembers() {