mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-21 04:17:01 -04:00
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:
parent
eeea8d9291
commit
478699d1b0
7 changed files with 12 additions and 19 deletions
|
@ -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({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue