Add comment for refactoring FileViewerUtils

Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
Tim Krüger 2022-05-19 17:20:26 +02:00
parent 0d65824fa6
commit 52ec1b76fa
No known key found for this signature in database
GPG Key ID: FECE3A7222C52A4E
2 changed files with 12 additions and 0 deletions

View File

@ -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 {

View File

@ -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(