forked from esafirm/android-image-picker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* optimize load images remove mvp view * add test
- Loading branch information
Showing
22 changed files
with
424 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
imagepicker/src/main/java/com/esafirm/imagepicker/features/ImagePickerAction.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.esafirm.imagepicker.features | ||
|
||
import com.esafirm.imagepicker.helper.state.ObservableState | ||
import com.esafirm.imagepicker.helper.state.SingleEvent | ||
import com.esafirm.imagepicker.model.Folder | ||
import com.esafirm.imagepicker.model.Image | ||
|
||
data class ImagePickerState( | ||
val images: List<Image> = emptyList(), | ||
val folders: List<Folder> = emptyList(), | ||
val isLoading: Boolean = false, | ||
val error: SingleEvent<Throwable>? = null, | ||
val finishPickImage: SingleEvent<List<Image>>? = null, | ||
val showCapturedImage: SingleEvent<Unit>? = null | ||
) | ||
|
||
interface ImagePickerAction { | ||
fun getUiState(): ObservableState<ImagePickerState> | ||
fun loadData(config: ImagePickerConfig) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.