mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-19 19:37:01 -04:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
acf04bb01d
49 changed files with 944 additions and 868 deletions
|
@ -16,7 +16,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { addChatBarButton, ChatBarButton, removeChatBarButton } from "@api/ChatButtons";
|
||||
import { ChatBarButton, ChatBarButtonFactory } from "@api/ChatButtons";
|
||||
import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption, sendBotMessage } from "@api/Commands";
|
||||
import { findGroupChildrenByChildId, NavContextMenuPatchCallback } from "@api/ContextMenu";
|
||||
import { definePluginSettings } from "@api/Settings";
|
||||
|
@ -85,7 +85,7 @@ const settings = definePluginSettings({
|
|||
}
|
||||
});
|
||||
|
||||
const SilentTypingToggle: ChatBarButton = ({ isMainChat }) => {
|
||||
const SilentTypingToggle: ChatBarButtonFactory = ({ isMainChat }) => {
|
||||
const { isEnabled, showIcon } = settings.use(["isEnabled", "showIcon"]);
|
||||
const toggle = () => settings.store.isEnabled = !settings.store.isEnabled;
|
||||
|
||||
|
@ -137,11 +137,12 @@ export default definePlugin({
|
|||
name: "SilentTyping",
|
||||
authors: [Devs.Ven, Devs.Rini, Devs.ImBanana],
|
||||
description: "Hide that you are typing",
|
||||
dependencies: ["ChatInputButtonAPI"],
|
||||
settings,
|
||||
|
||||
contextMenus: {
|
||||
"textarea-context": ChatBarContextCheckbox
|
||||
},
|
||||
|
||||
patches: [
|
||||
{
|
||||
find: '.dispatch({type:"TYPING_START_LOCAL"',
|
||||
|
@ -201,8 +202,5 @@ export default definePlugin({
|
|||
FluxDispatcher.dispatch({ type: "TYPING_START_LOCAL", channelId });
|
||||
},
|
||||
|
||||
start: () => {
|
||||
addChatBarButton("SilentTyping", SilentTypingToggle);
|
||||
},
|
||||
stop: () => removeChatBarButton("SilentTyping"),
|
||||
renderChatBarButton: SilentTypingToggle,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue