avoid refreshing favorite items unnecessarily
This commit is contained in:
parent
84e72a57b5
commit
d51fa1385a
1 changed files with 2 additions and 2 deletions
|
@ -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
|
// update directories and media files in the local db, delete invalid items. Intentionally creating a new thread
|
||||||
updateDBDirectory(directory)
|
updateDBDirectory(directory)
|
||||||
if (!directory.isRecycleBin()) {
|
if (!directory.isRecycleBin() && !directory.areFavorites()) {
|
||||||
Thread {
|
Thread {
|
||||||
try {
|
try {
|
||||||
mediaDB.insertAll(curMedia)
|
mediaDB.insertAll(curMedia)
|
||||||
|
@ -1065,7 +1065,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||||
Thread {
|
Thread {
|
||||||
try {
|
try {
|
||||||
directoryDao.insert(newDir)
|
directoryDao.insert(newDir)
|
||||||
if (folder != RECYCLE_BIN) {
|
if (folder != RECYCLE_BIN && folder != FAVORITES) {
|
||||||
mediaDB.insertAll(newMedia)
|
mediaDB.insertAll(newMedia)
|
||||||
}
|
}
|
||||||
} catch (ignored: Exception) {
|
} catch (ignored: Exception) {
|
||||||
|
|
Loading…
Reference in a new issue