Skip to content

Commit 2c1e275

Browse files
committed
feat: delete associated .mdx and .mdd files on dictionary removal for Android
1 parent d0cd1f0 commit 2c1e275

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/dictionary.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,16 @@ class Mdict {
259259
await file.delete();
260260

261261
await dictionaryListDao.remove(path);
262+
263+
if (Platform.isAndroid) {
264+
final mdxFile = File("$path.mdx");
265+
await mdxFile.delete();
266+
267+
final mddFile = File("$path.mdd");
268+
if (await mddFile.exists()) {
269+
await mddFile.delete();
270+
}
271+
}
262272
}
263273

264274
void setDefaultTitle() {

0 commit comments

Comments
 (0)