smol fix
This commit is contained in:
parent
b348def5fa
commit
ddeef1acae
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -78,16 +78,7 @@ BdApi.getCore = function () {
|
|||
* @param {string} content - a string of text to display in the modal
|
||||
*/
|
||||
BdApi.alert = function (title, content) {
|
||||
const ModalStack = BdApi.findModuleByProps("push", "update", "pop", "popWithKey");
|
||||
const AlertModal = BdApi.findModuleByPrototypes("handleCancel", "handleSubmit", "handleMinorConfirm");
|
||||
if (!ModalStack || !AlertModal) return mainCore.alert(title, content);
|
||||
|
||||
ModalStack.push(function(props) {
|
||||
return BdApi.React.createElement(AlertModal, Object.assign({
|
||||
title: title,
|
||||
body: content,
|
||||
}, props));
|
||||
});
|
||||
Utils.showConfirmationModal(title, content, {cancelText: null});
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -199,6 +199,10 @@ Core.prototype.showChangelogModal = function(options = {}) {
|
|||
return Utils.showChangelogModal(options);
|
||||
};
|
||||
|
||||
Core.prototype.alert = function(title, content) {
|
||||
return Utils.alert(title, content);
|
||||
};
|
||||
|
||||
Core.prototype.patchSocial = function() {
|
||||
if (this.socialPatch) return;
|
||||
const TabBar = WebpackModules.find(m => m.displayName == "TabBar");
|
||||
|
|
Loading…
Reference in New Issue