Fixing Build + Screen Messages

This commit is contained in:
Vishal 2022-08-03 21:18:03 +05:30 committed by GitHub
parent cb7b85190e
commit f6bf4d3bd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -80,9 +80,11 @@ class Plugin:
with open(self.install_path, "wb") as fout: with open(self.install_path, "wb") as fout:
fout.write(response.read()) fout.write(response.read())
self.enable() self.enable()
_ba.screenmessage("Plugin Installed")
def uninstall(self): def uninstall(self):
os.remove(self.install_path) os.remove(self.install_path)
_ba.screenmessage("Plugin Uninstalled")
def _set_status(self, to_enable=True): def _set_status(self, to_enable=True):
if self.entry_point not in ba.app.config["Plugins"]: if self.entry_point not in ba.app.config["Plugins"]:
@ -92,10 +94,12 @@ class Plugin:
def enable(self): def enable(self):
self._set_status(to_enable=True) self._set_status(to_enable=True)
ba.app.config.apply_and_commit() ba.app.config.apply_and_commit()
_ba.screenmessage("Plugin Enabled")
def disable(self): def disable(self):
self._set_status(to_enable=False) self._set_status(to_enable=False)
ba.app.config.commit() ba.app.config.commit()
_ba.screenmessage("Plugin Disabled")
class PluginWindow(popup.PopupWindow): class PluginWindow(popup.PopupWindow):
@ -218,6 +222,7 @@ class PluginWindow(popup.PopupWindow):
ba.containerwidget(edit=self._root_widget, transition='out_scale') ba.containerwidget(edit=self._root_widget, transition='out_scale')
return None return None
class PluginManager: class PluginManager:
def __init__(self): def __init__(self):
self.request_headers = HEADERS self.request_headers = HEADERS

View file

@ -10,7 +10,7 @@
}, },
{ {
"name": "Vishal", "name": "Vishal",
"email": null, "email": "vishal.u338@gmail.com",
"discord": "𝑽𝑰𝑺𝑯𝑼𝑼𝑼#2921" "discord": "𝑽𝑰𝑺𝑯𝑼𝑼𝑼#2921"
} }
], ],