[core] Fix `removeModuleScopeWithoutCache` (#1461)

This commit is contained in:
LoveSy 2021-11-30 10:23:56 +08:00 committed by vvb2060
parent 8a684b8d0d
commit fa2bd0cd7c
No known key found for this signature in database
GPG Key ID: 59B2BF15A79E26FA
1 changed files with 3 additions and 1 deletions

View File

@ -780,7 +780,9 @@ public class ConfigManager {
private boolean removeModuleScopeWithoutCache(Application module) {
if (module.packageName.equals("lspd")) return false;
boolean res = executeInTransaction(() -> db.delete("scope", "mid = ? and user_id = ?", new String[]{module.packageName, String.valueOf(module.userId)}) > 0);
int mid = getModuleId(module.packageName);
if (mid == -1) return false;
boolean res = executeInTransaction(() -> db.delete("scope", "mid = ? and user_id = ?", new String[]{String.valueOf(mid), String.valueOf(module.userId)}) > 0);
try {
removeModulePrefs(module.userId, module.packageName);
} catch (IOException e) {