mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-10 10:11:46 +00:00
The callback sends multiple events, in particular two pause when going to the next song, so the timeout wasn't properly cleared. Add menu buttons for the two options
22 lines
461 B
JavaScript
22 lines
461 B
JavaScript
const { setOptions } = require("../../config/plugins");
|
|
const { edit } = require("../../config");
|
|
|
|
module.exports = (win, options) => [
|
|
{
|
|
label: "Clear activity after timeout",
|
|
type: "checkbox",
|
|
checked: options.activityTimoutEnabled,
|
|
click: (item) => {
|
|
options.activityTimoutEnabled = item.checked;
|
|
setOptions('discord', options);
|
|
},
|
|
},
|
|
{
|
|
label: "Set timeout time in config",
|
|
click: () => {
|
|
// open config.json
|
|
edit();
|
|
},
|
|
},
|
|
];
|