Closed XTREME1738 closed 2 years ago
LGTM
Just added a button in the context menu to remove the edit history / message from the logs aswell but it requires an app restart
Working on adding whitelisting / blacklisting for guilds and channels and also ability to clear the data
Update: Added the ability to clear data from settings and if this pr has been merged ill make a new one when i fix whitelisting / blacklisting and if not ill just make a new commit
Update: added both channel and guild whitelist / blacklist and also clearing whitelists / blacklists from plugin settings
Update: Added 2 new switches to settings for turning off logging of edited messages and/or deleted messages
Update: Added 2 new buttons in settings to import or export the database to / from the Aliucord folder
Made some changes, what do you think?
Made some changes, what do you think?
looking good
This update introduces memory leaks and crashes because you are not properly closing cursors. You are also calling close on the SQLiteOpenHelper manually instead of using proper try with resources or kotlins .use. In any case, you should not even be creating new instances of SQLiteOpenHelper for every single update you're making. Not only is this bad for thread safety because writes are no longer synchronised, it is also a waste of resources.
1) Properly close all cursors with try with resources/.use 2) Reuse one Sqlite instance across the plugin, do not create new instances each time
insane juby merged this pr
Been working on this for a few hours and got it to work like normal except instead of just caching it saves the messages to a SQLite database (using SQLite bc json files like to corrupt)