Kamera funktionalität
-AlbumAndroidViewModel -AlbumEvents -AlbumViewModel -AlbumViewState
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.example.snapandsolve.camera
|
||||
|
||||
import android.content.Context
|
||||
import android.net.Uri
|
||||
/*
|
||||
Das sind die Funktionen beim Drücken der Knöpfe. Übersichtlicher wäre es sie direkt mit den
|
||||
Knöpfen in der ViewModel zu platzieren. AlbumEvents als name ist vielleicht unglücklich gewählt.
|
||||
*/
|
||||
/**
|
||||
* User generated events that can be triggered from the UI.
|
||||
*/
|
||||
sealed class Intent {
|
||||
data object OnPermissionGranted: Intent()
|
||||
|
||||
data class OnPermissionGrantedWith(val compositionContext: Context): Intent()
|
||||
|
||||
data object OnPermissionDenied: Intent()
|
||||
|
||||
data object OnImageSaved: Intent()
|
||||
|
||||
data class OnImageSavedWith (val compositionContext: Context): Intent()
|
||||
|
||||
data object OnImageSavingCanceled: Intent()
|
||||
|
||||
data class OnFinishPickingImages(val imageUrls: List<Uri>): Intent()
|
||||
|
||||
data class OnFinishPickingImagesWith(val compositionContext: Context, val imageUrls: List<Uri>): Intent()
|
||||
}
|
||||
Reference in New Issue
Block a user