SyncedFoldersActivity: don't refresh entire adapter when toggling a folder from dialog

It's enough to refresh its header, and it doesn't have to refresh all pictures

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
Álvaro Brey 2022-06-08 16:54:20 +02:00
parent affe52e49a
commit fb4eaf11ff
No known key found for this signature in database
GPG key ID: 2585783189A62105

View file

@ -672,8 +672,7 @@ class SyncedFoldersActivity :
)
saveOrUpdateSyncedFolder(item)
// TODO test if notifyItemChanged is sufficient (should improve performance)
adapter.notifyDataSetChanged()
adapter.notifyItemChanged(adapter.getSectionHeaderIndex(syncedFolder.section))
}
syncedFolderPreferencesDialogFragment = null
if (syncedFolder.isEnabled) {