From 938518b303bd40d2daf0361a5c4853a51b834926 Mon Sep 17 00:00:00 2001 From: alperozturk Date: Tue, 17 Dec 2024 11:23:57 +0100 Subject: [PATCH] notifyItemChanged Signed-off-by: alperozturk --- .../android/ui/adapter/OCFileListAdapter.java | 3 +-- .../android/ui/fragment/OCFileListFragment.java | 5 +---- build.gradle | 2 +- gradle/verification-metadata.xml | 13 +++++++++++++ 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java b/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java index cb5663f13f..1624a355e7 100644 --- a/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java +++ b/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java @@ -31,7 +31,6 @@ import android.widget.LinearLayout; import com.elyeproj.loaderviewlibrary.LoaderImageView; import com.nextcloud.android.common.ui.theme.utils.ColorRole; -import com.nextcloud.android.lib.resources.recommendations.GetRecommendationsRemoteOperation; import com.nextcloud.android.lib.resources.recommendations.Recommendation; import com.nextcloud.client.account.User; import com.nextcloud.client.database.entity.OfflineOperationEntity; @@ -417,11 +416,11 @@ public class OCFileListAdapter extends RecyclerView.Adapter { - // TODO add height if recommended files is empty ListHeaderBinding binding = ListHeaderBinding.inflate( LayoutInflater.from(parent.getContext()), parent, false); + return new OCFileListHeaderViewHolder(binding); } } diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java b/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java index 4a19999267..ad350b5934 100644 --- a/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java @@ -76,7 +76,6 @@ import com.owncloud.android.datamodel.e2e.v2.decrypted.DecryptedFolderMetadataFi import com.owncloud.android.lib.common.Creator; import com.owncloud.android.lib.common.OwnCloudClient; import com.owncloud.android.lib.common.OwnCloudClientFactory; -import com.owncloud.android.lib.common.accounts.AccountUtils; import com.owncloud.android.lib.common.operations.RemoteOperation; import com.owncloud.android.lib.common.operations.RemoteOperationResult; import com.owncloud.android.lib.common.utils.Log_OC; @@ -137,7 +136,6 @@ import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executors; import java.util.concurrent.Future; -import java.util.concurrent.RejectedExecutionException; import javax.inject.Inject; @@ -156,7 +154,6 @@ import androidx.media3.common.util.UnstableApi; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; -import kotlin.collections.CollectionsKt; import static com.owncloud.android.datamodel.OCFile.ROOT_PATH; import static com.owncloud.android.ui.dialog.setupEncryption.SetupEncryptionDialogFragment.SETUP_ENCRYPTION_DIALOG_TAG; @@ -452,7 +449,7 @@ public class OCFileListFragment extends ExtendedListFragment implements @SuppressLint("NotifyDataSetChanged") @Override public void run() { - mAdapter.notifyDataSetChanged(); + mAdapter.notifyItemChanged(0); } }); } diff --git a/build.gradle b/build.gradle index 6fda8df588..d03b9a97eb 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ */ buildscript { ext { - androidLibraryVersion ="e77e21da5928674243f5e329f9eaaa3db1b1c09a" + androidLibraryVersion ="509ed3c80e" androidPluginVersion = '8.7.3' androidxMediaVersion = '1.4.1' androidxTestVersion = "1.6.1" diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 6c57c61b14..7b3a2d6b5a 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -7794,6 +7794,14 @@ + + + + + + + + @@ -9689,6 +9697,11 @@ + + + + +