Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#34 Replace MaterialFilePicker dependency and fragmentActivity usage #81

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from

Conversation

ZiXOps
Copy link

@ZiXOps ZiXOps commented Apr 26, 2024

No description provided.

@ZiXOps ZiXOps force-pushed the replace-fragment-activity-usage branch from 5c0defb to e86c72a Compare April 26, 2024 09:11
@Alex009 Alex009 changed the base branch from master to develop May 1, 2024 17:18
@Alex009 Alex009 linked an issue May 1, 2024 that may be closed by this pull request
@Alex009 Alex009 added this to the 0.11.1 milestone May 1, 2024
@ZiXOps ZiXOps force-pushed the replace-fragment-activity-usage branch from ebbb3d4 to ccf893d Compare May 2, 2024 04:13
Copy link
Member

@Alex009 Alex009 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

required rework to fix large duplication

Comment on lines 18 to 22
private var callback: CallbackData? = null

private val takePictureLauncherHolder = MutableStateFlow<ActivityResultLauncher<Uri>?>(null)
private val pickVisualMediaLauncherHolder =
MutableStateFlow<ActivityResultLauncher<PickVisualMediaRequest>?>(null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks very simillar in multiple places. can we do reused implementation that will use in each case?

.commitNow()
}
}
val outputUri = createPhotoUri()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we create it here? in case of gallery we not need it at all

@@ -27,6 +27,10 @@ class ImageSelectionViewModel(
selectImage(MediaSource.GALLERY)
}

fun onFilePressed() {
selectFile()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test it on ios too

import android.net.Uri
import dev.icerock.moko.media.BitmapUtils

internal abstract class ImagePickerDelegate<C, I> : PickerDelegate<C, I>() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add here more common logic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove MaterialFilePicker dependency
2 participants