mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-04 10:39:25 +00:00
Reduced logging
This commit is contained in:
parent
373492e51f
commit
0d369bef4f
2 changed files with 7 additions and 4 deletions
|
@ -2481,13 +2481,13 @@ public abstract class DB extends RoomDatabase {
|
|||
@Override
|
||||
public void migrate(@NonNull SupportSQLiteDatabase db) {
|
||||
logMigration(startVersion, endVersion);
|
||||
EntityMessage.convert(context);
|
||||
EntityMessage.convert(context, true);
|
||||
}
|
||||
}).addMigrations(new Migration(246, 247) {
|
||||
@Override
|
||||
public void migrate(@NonNull SupportSQLiteDatabase db) {
|
||||
logMigration(startVersion, endVersion);
|
||||
EntityMessage.convert(context);
|
||||
EntityMessage.convert(context, false);
|
||||
}
|
||||
}).addMigrations(new Migration(998, 999) {
|
||||
@Override
|
||||
|
|
|
@ -582,7 +582,7 @@ public class EntityMessage implements Serializable {
|
|||
return new File(dir, id.toString());
|
||||
}
|
||||
|
||||
static void convert(Context context) {
|
||||
static void convert(Context context, boolean silent) {
|
||||
File root = new File(context.getFilesDir(), "messages");
|
||||
File[] files = root.listFiles();
|
||||
if (files == null)
|
||||
|
@ -595,7 +595,10 @@ public class EntityMessage implements Serializable {
|
|||
Helper.copy(file, target);
|
||||
file.delete();
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
if (silent)
|
||||
Log.i(ex);
|
||||
else
|
||||
Log.e(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue