/*
- * Copyright © 2019 Damyan Ivanov.
+ * Copyright © 2020 Damyan Ivanov.
* This file is part of MoLe.
* MoLe is free software: you can distribute it and/or modify it
* under the term of the GNU General Public License as published by
try {
SQLiteDatabase db = App.getDatabase();
- db.beginTransaction();
+ db.beginTransactionNonExclusive();
try {
try (LockHolder lh = params[0].accountList.lockForWriting()) {
for (int i = 0; i < params[0].accountList.size(); i++ ){
db.execSQL("UPDATE accounts SET hidden=? WHERE profile=? AND name=?",
new Object[]{acc.isHiddenByStarToBe() ? 1 : 0, profile, acc.getName()
});
-
- acc.setHiddenByStar(acc.isHiddenByStarToBe());
- if (!params[0].showOnlyStarred || !acc.isHiddenByStar()) newList.add(acc);
}
db.setTransactionSuccessful();
}