avoid refreshing favorite items unnecessarily

This commit is contained in:
tibbi 2021-12-17 12:25:32 +01:00
parent 84e72a57b5
commit d51fa1385a

View file

@ -966,7 +966,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
// update directories and media files in the local db, delete invalid items. Intentionally creating a new thread
updateDBDirectory(directory)
if (!directory.isRecycleBin()) {
if (!directory.isRecycleBin() && !directory.areFavorites()) {
Thread {
try {
mediaDB.insertAll(curMedia)
@ -1065,7 +1065,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
Thread {
try {
directoryDao.insert(newDir)
if (folder != RECYCLE_BIN) {
if (folder != RECYCLE_BIN && folder != FAVORITES) {
mediaDB.insertAll(newMedia)
}
} catch (ignored: Exception) {