Эх сурвалжийг харах

Add comment for refactoring FileViewerUtils

Signed-off-by: Tim Krüger <t@timkrueger.me>
Tim Krüger 3 жил өмнө
parent
commit
52ec1b76fa

+ 6 - 0
app/src/main/java/com/nextcloud/talk/shareditems/adapters/SharedItemsViewHolder.kt

@@ -48,6 +48,12 @@ abstract class SharedItemsViewHolder(
             image.controller = configurePreview(item)
         }
 
+        /*
+        The FileViewerUtils forces us to do things at this points which should be done separated in the activity and
+        the view model.
+
+        This should be done after a refactoring of FileViewerUtils.
+         */
         val fileViewerUtils = FileViewerUtils(image.context, userEntity)
 
         clickTarget.setOnClickListener {

+ 6 - 0
app/src/main/java/com/nextcloud/talk/utils/FileViewerUtils.kt

@@ -52,6 +52,12 @@ import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_FILE_ID
 import java.io.File
 import java.util.concurrent.ExecutionException
 
+/*
+Usage of this class forces us to do things at one location which should be separated in a activity and view model.
+
+Example:
+  - SharedItemsViewHolder
+ */
 class FileViewerUtils(private val context: Context, private val userEntity: UserEntity) {
 
     fun openFile(