mirror of
https://github.com/haorendashu/nowser.git
synced 2025-12-17 09:54:19 +01:00
delete remotesigninginfo when app was deleted
This commit is contained in:
@@ -73,4 +73,9 @@ class RemoteSigningInfoDB {
|
|||||||
"remote_signing_info", await _toJsonWithEncrypt(o, encryptKey),
|
"remote_signing_info", await _toJsonWithEncrypt(o, encryptKey),
|
||||||
where: "id = ?", whereArgs: [o.id]);
|
where: "id = ?", whereArgs: [o.id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Future<void> deleteByAppId(int appId, {DatabaseExecutor? db}) async {
|
||||||
|
db = await DB.getDB(db);
|
||||||
|
db.execute("delete from remote_signing_info where app_id = ?", [appId]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,6 +122,14 @@ class AppProvider extends ChangeNotifier {
|
|||||||
Future<void> deleteApp(App app) async {
|
Future<void> deleteApp(App app) async {
|
||||||
await AppDB.delete(app.id!);
|
await AppDB.delete(app.id!);
|
||||||
|
|
||||||
|
if (app.appType == AppType.REMOTE) {
|
||||||
|
try {
|
||||||
|
RemoteSigningInfoDB.deleteByAppId(app.id!);
|
||||||
|
} catch (e) {
|
||||||
|
print(e.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await AuthLogDB.deleteByAppId(app.id!);
|
await AuthLogDB.deleteByAppId(app.id!);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user