Compare commits

...

3 commits

Author SHA1 Message Date
pajlada b67b8db86d
Merge branch 'master' into test/usernotice-tests 2024-10-19 11:57:12 +02:00
nerix d0b9fd0dc3
fix: animate emotes when overlay is open (#5659) 2024-10-19 09:56:46 +00:00
pajlada 85d34c8ff0
test: use httpbox fork release (#5655) 2024-10-18 19:23:13 +00:00
7 changed files with 39 additions and 18 deletions

View file

@ -8,6 +8,7 @@ on:
env: env:
TWITCH_PUBSUB_SERVER_TAG: v1.0.7 TWITCH_PUBSUB_SERVER_TAG: v1.0.7
HTTPBOX_TAG: v0.2.1
QT_QPA_PLATFORM: minimal QT_QPA_PLATFORM: minimal
HOMEBREW_NO_AUTO_UPDATE: 1 HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
@ -58,6 +59,13 @@ jobs:
run: | run: |
brew install boost openssl rapidjson p7zip create-dmg cmake brew install boost openssl rapidjson p7zip create-dmg cmake
- name: Install httpbox
run: |
curl -L -o httpbox.tar.xz "https://github.com/Chatterino/httpbox/releases/download/${{ env.HTTPBOX_TAG }}/httpbox-x86_64-apple-darwin.tar.xz"
tar -xJf httpbox.tar.xz
mv ./httpbox-x86_64-apple-darwin/httpbox /usr/local/bin
working-directory: /tmp
- name: Build - name: Build
run: | run: |
mkdir build-test mkdir build-test
@ -83,10 +91,6 @@ jobs:
curl -L -o server.key "https://github.com/Chatterino/twitch-pubsub-server-test/raw/${{ env.TWITCH_PUBSUB_SERVER_TAG }}/cmd/server/server.key" curl -L -o server.key "https://github.com/Chatterino/twitch-pubsub-server-test/raw/${{ env.TWITCH_PUBSUB_SERVER_TAG }}/cmd/server/server.key"
cd .. cd ..
- name: Cargo Install httpbox
run: |
cargo install --git https://github.com/kevinastone/httpbox --rev 89b971f
- name: Test - name: Test
timeout-minutes: 30 timeout-minutes: 30
run: | run: |

View file

@ -8,6 +8,7 @@ on:
env: env:
TWITCH_PUBSUB_SERVER_TAG: v1.0.7 TWITCH_PUBSUB_SERVER_TAG: v1.0.7
HTTPBOX_TAG: v0.2.1
QT_QPA_PLATFORM: minimal QT_QPA_PLATFORM: minimal
# Last known good conan version # Last known good conan version
# 2.0.3 has a bug on Windows (conan-io/conan#13606) # 2.0.3 has a bug on Windows (conan-io/conan#13606)
@ -111,6 +112,13 @@ jobs:
mkdir -Force build-test/bin mkdir -Force build-test/bin
cp "$((ls $Env:VCToolsRedistDir/onecore/x64 -Filter '*.CRT')[0].FullName)/*" build-test/bin cp "$((ls $Env:VCToolsRedistDir/onecore/x64 -Filter '*.CRT')[0].FullName)/*" build-test/bin
- name: Install httpbox
run: |
mkdir httpbox
Invoke-WebRequest -Uri "https://github.com/Chatterino/httpbox/releases/download/${{ env.HTTPBOX_TAG }}/httpbox-x86_64-pc-windows-msvc.zip" -outfile "httpbox.zip"
Expand-Archive httpbox.zip -DestinationPath httpbox
rm httpbox.zip
- name: Build - name: Build
run: | run: |
cmake ` cmake `
@ -139,14 +147,10 @@ jobs:
Invoke-WebRequest -Uri "https://github.com/Chatterino/twitch-pubsub-server-test/raw/${{ env.TWITCH_PUBSUB_SERVER_TAG }}/cmd/server/server.key" -outfile "server.key" Invoke-WebRequest -Uri "https://github.com/Chatterino/twitch-pubsub-server-test/raw/${{ env.TWITCH_PUBSUB_SERVER_TAG }}/cmd/server/server.key" -outfile "server.key"
cd .. cd ..
- name: Cargo Install httpbox
run: |
cargo install --git https://github.com/kevinastone/httpbox --rev 89b971f
- name: Test - name: Test
timeout-minutes: 30 timeout-minutes: 30
run: | run: |
httpbox --port 9051 & ..\httpbox\httpbox.exe --port 9051 &
cd ..\pubsub-server-test cd ..\pubsub-server-test
.\server.exe 127.0.0.1:9050 & .\server.exe 127.0.0.1:9050 &
cd ..\build-test cd ..\build-test

View file

@ -5,7 +5,7 @@
- Major: Add option to show pronouns in user card. (#5442, #5583) - Major: Add option to show pronouns in user card. (#5442, #5583)
- Major: Release plugins alpha. (#5288) - Major: Release plugins alpha. (#5288)
- Major: Improve high-DPI support on Windows. (#4868, #5391) - Major: Improve high-DPI support on Windows. (#4868, #5391)
- Major: Added transparent overlay window (default keybind: <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>N</kbd>). (#4746, #5643) - Major: Added transparent overlay window (default keybind: <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>N</kbd>). (#4746, #5643, #5659)
- Minor: Removed the Ctrl+Shift+L hotkey for toggling the "live only" tab visibility state. (#5530) - Minor: Removed the Ctrl+Shift+L hotkey for toggling the "live only" tab visibility state. (#5530)
- Minor: Add support for Shared Chat messages. Shared chat messages can be filtered with the `flags.shared` filter variable, or with search using `is:shared`. Some messages like subscriptions are filtered on purpose to avoid confusion for the broadcaster. If you have both channels participating in Shared Chat open, only one of the message triggering your highlight will trigger. (#5606, #5625) - Minor: Add support for Shared Chat messages. Shared chat messages can be filtered with the `flags.shared` filter variable, or with search using `is:shared`. Some messages like subscriptions are filtered on purpose to avoid confusion for the broadcaster. If you have both channels participating in Shared Chat open, only one of the message triggering your highlight will trigger. (#5606, #5625)
- Minor: Moved tab visibility control to a submenu, without any toggle actions. (#5530) - Minor: Moved tab visibility control to a submenu, without any toggle actions. (#5530)

View file

@ -26,6 +26,7 @@ void GIFTimer::initialize()
QObject::connect(&this->timer, &QTimer::timeout, [this] { QObject::connect(&this->timer, &QTimer::timeout, [this] {
if (getSettings()->animationsWhenFocused && if (getSettings()->animationsWhenFocused &&
this->openOverlayWindows_ == 0 &&
QApplication::activeWindow() == nullptr) QApplication::activeWindow() == nullptr)
{ {
return; return;

View file

@ -18,9 +18,21 @@ public:
return this->position_; return this->position_;
} }
void registerOpenOverlayWindow()
{
this->openOverlayWindows_++;
}
void unregisterOpenOverlayWindow()
{
assert(this->openOverlayWindows_ >= 1);
this->openOverlayWindows_--;
}
private: private:
QTimer timer; QTimer timer;
long unsigned position_{}; long unsigned position_{};
size_t openOverlayWindows_ = 0;
}; };
} // namespace chatterino } // namespace chatterino

View file

@ -4,6 +4,7 @@
#include "common/FlagsEnum.hpp" #include "common/FlagsEnum.hpp"
#include "common/Literals.hpp" #include "common/Literals.hpp"
#include "controllers/hotkeys/HotkeyController.hpp" #include "controllers/hotkeys/HotkeyController.hpp"
#include "singletons/Emotes.hpp"
#include "singletons/Settings.hpp" #include "singletons/Settings.hpp"
#include "singletons/WindowManager.hpp" #include "singletons/WindowManager.hpp"
#include "widgets/BaseWidget.hpp" #include "widgets/BaseWidget.hpp"
@ -166,6 +167,7 @@ OverlayWindow::OverlayWindow(IndirectChannel channel,
this->addShortcuts(); this->addShortcuts();
this->triggerFirstActivation(); this->triggerFirstActivation();
getApp()->getEmotes()->getGIFTimer().registerOpenOverlayWindow();
} }
OverlayWindow::~OverlayWindow() OverlayWindow::~OverlayWindow()
@ -173,6 +175,7 @@ OverlayWindow::~OverlayWindow()
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
::DestroyCursor(this->sizeAllCursor_); ::DestroyCursor(this->sizeAllCursor_);
#endif #endif
getApp()->getEmotes()->getGIFTimer().unregisterOpenOverlayWindow();
} }
void OverlayWindow::applyTheme() void OverlayWindow::applyTheme()

View file

@ -1,10 +1,7 @@
To run all tests you will need to run the `kennethreitz/httpbin` and `ghcr.io/chatterino/twitch-pubsub-server-test:latest` docker images. # Pre-requisites to running tests
For example: - Download & run [httpbox](https://github.com/Chatterino/httpbox/releases/latest)
`httpbox --port 9051`
```bash - Download & run [twitch-pubsub-server-test](https://github.com/Chatterino/twitch-pubsub-server-test/releases/latest)
docker run --network=host --detach ghcr.io/chatterino/twitch-pubsub-server-test:latest `twitch-pubsub-server-test`
docker run -p 9051:80 --detach kennethreitz/httpbin
```
If you're unable to use docker, you can use [httpbox](https://github.com/kevinastone/httpbox) (`httpbox --port 9051`) and [Chatterino/twitch-pubsub-server-test](https://github.com/Chatterino/twitch-pubsub-server-test/releases/latest) manually.