From d6678531023fbafcaf72f4f4048207a884915fcf Mon Sep 17 00:00:00 2001 From: alperozturk Date: Thu, 16 May 2024 16:39:09 +0200 Subject: [PATCH] Optimize imports Signed-off-by: alperozturk --- .../com/owncloud/android/ui/preview/PreviewImageActivity.java | 4 ---- .../owncloud/android/ui/preview/PreviewImagePagerAdapter.kt | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageActivity.java b/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageActivity.java index 2102fa2b45..4f5d4508a6 100644 --- a/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageActivity.java +++ b/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageActivity.java @@ -21,7 +21,6 @@ import android.content.IntentFilter; import android.os.Bundle; import android.view.MenuItem; import android.view.View; -import android.view.ViewGroup; import com.nextcloud.client.account.User; import com.nextcloud.client.di.Injectable; @@ -52,8 +51,6 @@ import com.owncloud.android.ui.fragment.OCFileListFragment; import com.owncloud.android.utils.MimeTypeUtil; import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; import java.util.Optional; import javax.inject.Inject; @@ -62,7 +59,6 @@ import androidx.annotation.NonNull; import androidx.appcompat.app.ActionBar; import androidx.drawerlayout.widget.DrawerLayout; import androidx.localbroadcastmanager.content.LocalBroadcastManager; -import androidx.recyclerview.widget.RecyclerView; import androidx.viewpager2.widget.ViewPager2; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; diff --git a/app/src/main/java/com/owncloud/android/ui/preview/PreviewImagePagerAdapter.kt b/app/src/main/java/com/owncloud/android/ui/preview/PreviewImagePagerAdapter.kt index a88ccab929..2f9069a796 100644 --- a/app/src/main/java/com/owncloud/android/ui/preview/PreviewImagePagerAdapter.kt +++ b/app/src/main/java/com/owncloud/android/ui/preview/PreviewImagePagerAdapter.kt @@ -129,7 +129,7 @@ class PreviewImagePagerAdapter : FragmentStateAdapter { */ fun getFileAt(position: Int): OCFile? { return try { - imageFiles!![position] + imageFiles[position] } catch (exception: IndexOutOfBoundsException) { null }