Fix broken stuff for discord update (#3349)

Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: Vending Machine <vendicated@riseup.net>
This commit is contained in:
sadan4 2025-04-04 16:46:01 -04:00 committed by GitHub
parent eeea8d9291
commit 478699d1b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 12 additions and 19 deletions

View file

@ -47,19 +47,11 @@ export default definePlugin({
{
match: /\i\.\i\.dispatch\({type:"IDLE",idle:!1}\)/,
replace: "$self.handleOnline()"
},
{
match: /(setInterval\(\i,\.25\*)\i\.\i/,
replace: "$1$self.getIntervalDelay()" // For web installs
}
]
}
],
getIntervalDelay() {
return Math.min(6e5, this.getIdleTimeout());
},
handleOnline() {
if (!settings.store.remainInIdle) {
FluxDispatcher.dispatch({