Skip to content

Commit

Permalink
Adding EXIF information on photo details sheet and minor ui tweaks to…
Browse files Browse the repository at this point in the history
… the sheet. Fixes #93
  • Loading branch information
savvasdalkitsis committed Jul 14, 2022
1 parent 88c90eb commit 305693d
Show file tree
Hide file tree
Showing 30 changed files with 622 additions and 82 deletions.
5 changes: 5 additions & 0 deletions api/icons/src/main/res/drawable/ic_aspect_ratio.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M19,12h-2v3h-3v2h5v-5zM7,9h3L10,7L5,7v5h2L7,9zM21,3L3,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h18c1.1,0 2,-0.9 2,-2L23,5c0,-1.1 -0.9,-2 -2,-2zM21,19.01L3,19.01L3,4.99h18v14.02z"/>
</vector>
6 changes: 6 additions & 0 deletions api/icons/src/main/res/drawable/ic_camera.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"/>
<path android:fillColor="@android:color/white" android:pathData="M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z"/>
</vector>
5 changes: 5 additions & 0 deletions api/icons/src/main/res/drawable/ic_camera_roll.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M14,5c0,-1.1 -0.9,-2 -2,-2h-1L11,2c0,-0.55 -0.45,-1 -1,-1L6,1c-0.55,0 -1,0.45 -1,1v1L4,3c-1.1,0 -2,0.9 -2,2v15c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2h8L22,5h-8zM12,18h-2v-2h2v2zM12,9h-2L10,7h2v2zM16,18h-2v-2h2v2zM16,9h-2L14,7h2v2zM20,18h-2v-2h2v2zM20,9h-2L18,7h2v2z"/>
</vector>
5 changes: 5 additions & 0 deletions api/icons/src/main/res/drawable/ic_image_aspect_ratio.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M16,10h-2v2h2v-2zM16,14h-2v2h2v-2zM8,10L6,10v2h2v-2zM12,10h-2v2h2v-2zM20,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,18L4,18L4,6h16v12z"/>
</vector>
5 changes: 5 additions & 0 deletions api/icons/src/main/res/drawable/ic_iso.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M19,3L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM5.5,7.5h2v-2L9,5.5v2h2L11,9L9,9v2L7.5,11L7.5,9h-2L5.5,7.5zM19,19L5,19L19,5v14zM17,17v-1.5h-5L12,17h5z"/>
</vector>
5 changes: 5 additions & 0 deletions api/icons/src/main/res/drawable/ic_lens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M14.25,2.26l-0.08,-0.04 -0.01,0.02C13.46,2.09 12.74,2 12,2 6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10c0,-4.75 -3.31,-8.72 -7.75,-9.74zM19.41,9h-7.99l2.71,-4.7c2.4,0.66 4.35,2.42 5.28,4.7zM13.1,4.08L10.27,9l-1.15,2L6.4,6.3C7.84,4.88 9.82,4 12,4c0.37,0 0.74,0.03 1.1,0.08zM5.7,7.09L8.54,12l1.15,2L4.26,14C4.1,13.36 4,12.69 4,12c0,-1.85 0.64,-3.55 1.7,-4.91zM4.59,15h7.98l-2.71,4.7c-2.4,-0.67 -4.34,-2.42 -5.27,-4.7zM10.9,19.91L14.89,13l2.72,4.7C16.16,19.12 14.18,20 12,20c-0.38,0 -0.74,-0.04 -1.1,-0.09zM18.3,16.91l-4,-6.91h5.43c0.17,0.64 0.27,1.31 0.27,2 0,1.85 -0.64,3.55 -1.7,4.91z"/>
</vector>
5 changes: 5 additions & 0 deletions api/icons/src/main/res/drawable/ic_lens_blur.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M6,13c-0.55,0 -1,0.45 -1,1s0.45,1 1,1s1,-0.45 1,-1S6.55,13 6,13zM6,17c-0.55,0 -1,0.45 -1,1s0.45,1 1,1s1,-0.45 1,-1S6.55,17 6,17zM6,9c-0.55,0 -1,0.45 -1,1s0.45,1 1,1s1,-0.45 1,-1S6.55,9 6,9zM3,9.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5s0.5,-0.22 0.5,-0.5S3.28,9.5 3,9.5zM6,5C5.45,5 5,5.45 5,6s0.45,1 1,1s1,-0.45 1,-1S6.55,5 6,5zM21,10.5c0.28,0 0.5,-0.22 0.5,-0.5S21.28,9.5 21,9.5s-0.5,0.22 -0.5,0.5S20.72,10.5 21,10.5zM14,7c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1s-1,0.45 -1,1S13.45,7 14,7zM14,3.5c0.28,0 0.5,-0.22 0.5,-0.5S14.28,2.5 14,2.5S13.5,2.72 13.5,3S13.72,3.5 14,3.5zM3,13.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5s0.5,-0.22 0.5,-0.5S3.28,13.5 3,13.5zM10,20.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5s0.5,-0.22 0.5,-0.5S10.28,20.5 10,20.5zM10,3.5c0.28,0 0.5,-0.22 0.5,-0.5S10.28,2.5 10,2.5S9.5,2.72 9.5,3S9.72,3.5 10,3.5zM10,7c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1S9,5.45 9,6S9.45,7 10,7zM10,12.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5S10.83,12.5 10,12.5zM18,13c-0.55,0 -1,0.45 -1,1s0.45,1 1,1s1,-0.45 1,-1S18.55,13 18,13zM18,17c-0.55,0 -1,0.45 -1,1s0.45,1 1,1s1,-0.45 1,-1S18.55,17 18,17zM18,9c-0.55,0 -1,0.45 -1,1s0.45,1 1,1s1,-0.45 1,-1S18.55,9 18,9zM18,5c-0.55,0 -1,0.45 -1,1s0.45,1 1,1s1,-0.45 1,-1S18.55,5 18,5zM21,13.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5s0.5,-0.22 0.5,-0.5S21.28,13.5 21,13.5zM14,17c-0.55,0 -1,0.45 -1,1s0.45,1 1,1s1,-0.45 1,-1S14.55,17 14,17zM14,20.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5s0.5,-0.22 0.5,-0.5S14.28,20.5 14,20.5zM10,8.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5S10.83,8.5 10,8.5zM10,17c-0.55,0 -1,0.45 -1,1s0.45,1 1,1s1,-0.45 1,-1S10.55,17 10,17zM14,12.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5S14.83,12.5 14,12.5zM14,8.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5S14.83,8.5 14,8.5z"/>
</vector>
5 changes: 5 additions & 0 deletions api/icons/src/main/res/drawable/ic_photo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M19,5v14L5,19L5,5h14m0,-2L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM14.14,11.86l-3,3.87L9,13.14 6,17h12l-3.86,-5.14z"/>
</vector>
5 changes: 5 additions & 0 deletions api/icons/src/main/res/drawable/ic_save.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M17,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,7l-4,-4zM12,19c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM15,9L5,9L5,5h10v4z"/>
</vector>
5 changes: 5 additions & 0 deletions api/icons/src/main/res/drawable/ic_shutter_speed.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M15,1L9,1v2h6L15,1zM19.03,7.39l1.42,-1.42c-0.43,-0.51 -0.9,-0.99 -1.41,-1.41l-1.42,1.42C16.07,4.74 14.12,4 12,4c-4.97,0 -9,4.03 -9,9s4.02,9 9,9 9,-4.03 9,-9c0,-2.12 -0.74,-4.07 -1.97,-5.61zM12,20c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7zM11.68,15L6.35,15c0.57,1.62 1.82,2.92 3.41,3.56l-0.11,-0.06 2.03,-3.5zM17.65,11c-0.57,-1.6 -1.78,-2.89 -3.34,-3.54L12.26,11h5.39zM10.61,18.83c0.45,0.11 0.91,0.17 1.39,0.17 1.34,0 2.57,-0.45 3.57,-1.19l-2.11,-3.9 -2.85,4.92zM7.55,8.99C6.59,10.05 6,11.46 6,13c0,0.34 0.04,0.67 0.09,1h4.72L7.55,8.99zM16.34,17.13C17.37,16.06 18,14.6 18,13c0,-0.34 -0.04,-0.67 -0.09,-1h-4.34l2.77,5.13zM13.33,7.15C12.9,7.06 12.46,7 12,7c-1.4,0 -2.69,0.49 -3.71,1.29l2.32,3.56 2.72,-4.7z"/>
</vector>
5 changes: 5 additions & 0 deletions api/icons/src/main/res/drawable/ic_videocam.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M17,10.5V7c0,-0.55 -0.45,-1 -1,-1H4c-0.55,0 -1,0.45 -1,1v10c0,0.55 0.45,1 1,1h12c0.55,0 1,-0.45 1,-1v-3.5l4,4v-11l-4,4z"/>
</vector>
2 changes: 2 additions & 0 deletions api/people/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ android {
dependencies {
api project(":api:db")
implementation project(':api:image')
implementation project(':api:strings')
implementation project(':api:ui')
implementation(
libs.androidx.compose.foundation,
libs.androidx.compose.material,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ import androidx.compose.material.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.savvasdalkitsis.uhuruphotos.api.strings.R
import com.savvasdalkitsis.uhuruphotos.api.people.view.state.Person
import com.savvasdalkitsis.uhuruphotos.api.ui.view.SectionHeader

@Composable
fun PeopleBar(
Expand All @@ -44,20 +47,10 @@ fun PeopleBar(
.fillMaxWidth(),
verticalArrangement = Arrangement.spacedBy(8.dp),
) {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(8.dp, end = 8.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp),
verticalAlignment = Alignment.CenterVertically,
) {
Text(
modifier = Modifier.weight(1f),
text = "People"
)
SectionHeader(title = stringResource(R.string.people)) {
if (onViewAllClicked != null) {
TextButton(onClick = onViewAllClicked) {
Text("View all")
Text(stringResource(R.string.view_all))
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions api/strings/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
<item quantity="one">Are you sure you want to send this %d photo to the trash?</item>
<item quantity="other">Are you sure you want to send these %d photos to the trash?</item>
</plurals>
<string name="people">People</string>
<string name="view_all">View all</string>
<string name="error_refreshing_people">There was an error refreshing people</string>
<string name="error_loading_photo_details">There was an error loading photo details</string>
<string name="error_changing_photo_favourite">There was an error changing the photo favourite status</string>
Expand Down Expand Up @@ -76,6 +78,9 @@
<string name="downloading_photo_details">Downloading photo details</string>
<string name="trashing_photo">Sending photo to trash</string>
<string name="restoring_photo">Restoring photo from trash</string>
<string name="location">Location</string>
<string name="open_in_maps">Open in Maps</string>
<string name="details">Details</string>
<string name="deleting_photo">Deleting photo</string>
<string name="refreshing_albums">Refreshing albums</string>
<string name="photos_on_map">Photos on map (%1$d out of %2$d)</string>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
Copyright 2022 Savvas Dalkitsis
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.savvasdalkitsis.uhuruphotos.api.ui.view

import androidx.compose.foundation.layout.Arrangement.spacedBy
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp

@Composable
fun SectionHeader(
modifier: Modifier = Modifier,
title: String,
endContent: @Composable () -> Unit = {},
) {
Row(
modifier = modifier
.fillMaxWidth(),
horizontalArrangement = spacedBy(8.dp),
verticalAlignment = Alignment.CenterVertically,
) {
Text(
modifier = Modifier.weight(1f),
text = title,
style = MaterialTheme.typography.subtitle1.copy(fontWeight = FontWeight.Bold),
)
endContent()
}

}
2 changes: 2 additions & 0 deletions implementation/photos/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ dependencies {
libs.androidx.compose.material.windowsize,
libs.androidx.work,
libs.androidx.work.hilt,
libs.coil.base,
libs.exif,
libs.infobar,
libs.moshi,
libs.retrofit.core,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package com.savvasdalkitsis.uhuruphotos.implementation.photos.seam
import com.savvasdalkitsis.uhuruphotos.api.map.model.LatLon
import com.savvasdalkitsis.uhuruphotos.api.people.view.state.Person
import com.savvasdalkitsis.uhuruphotos.api.photos.model.PhotoSequenceDataSource
import com.savvasdalkitsis.uhuruphotos.implementation.photos.view.state.SinglePhotoState

sealed class PhotoAction {
object ToggleUI : PhotoAction()
Expand All @@ -32,7 +33,7 @@ sealed class PhotoAction {
object TrashPhoto : PhotoAction()
object RestorePhoto : PhotoAction()
object SharePhoto : PhotoAction()
data class FullImageLoaded(val id: String) : PhotoAction()
data class FullImageLoaded(val photo: SinglePhotoState) : PhotoAction()
data class ClickedOnMap(val gps: LatLon) : PhotoAction()
data class LoadPhoto(
val id: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ import com.savvasdalkitsis.uhuruphotos.implementation.photos.seam.PhotoMutation.
import com.savvasdalkitsis.uhuruphotos.implementation.photos.seam.PhotoMutation.RemovePhotoFromSource
import com.savvasdalkitsis.uhuruphotos.implementation.photos.seam.PhotoMutation.ShowDeleteConfirmationDialog
import com.savvasdalkitsis.uhuruphotos.implementation.photos.seam.PhotoMutation.ShowErrorMessage
import com.savvasdalkitsis.uhuruphotos.implementation.photos.seam.PhotoMutation.ShowMetadata
import com.savvasdalkitsis.uhuruphotos.implementation.photos.seam.PhotoMutation.ShowMultiplePhotos
import com.savvasdalkitsis.uhuruphotos.implementation.photos.seam.PhotoMutation.ShowPhotoFavourite
import com.savvasdalkitsis.uhuruphotos.implementation.photos.seam.PhotoMutation.ShowRestorationConfirmationDialog
Expand All @@ -80,6 +81,7 @@ import com.savvasdalkitsis.uhuruphotos.implementation.photos.seam.PhotoMutation.
import com.savvasdalkitsis.uhuruphotos.implementation.photos.seam.PhotoMutation.ShowSinglePhoto
import com.savvasdalkitsis.uhuruphotos.implementation.photos.seam.PhotoMutation.ShowTrashingConfirmationDialog
import com.savvasdalkitsis.uhuruphotos.implementation.photos.seam.PhotoMutation.ShowUI
import com.savvasdalkitsis.uhuruphotos.implementation.photos.usecase.MetadataUseCase
import com.savvasdalkitsis.uhuruphotos.implementation.photos.view.state.PhotoState
import com.savvasdalkitsis.uhuruphotos.implementation.photos.view.state.PhotoType
import com.savvasdalkitsis.uhuruphotos.implementation.photos.view.state.PhotoType.TRASHED
Expand All @@ -98,6 +100,7 @@ class PhotoActionHandler @Inject constructor(
private val albumsUseCase: AlbumsUseCase,
private val searchUseCase: SearchUseCase,
private val dateDisplayer: DateDisplayer,
private val metadataUseCase: MetadataUseCase,
) : ActionHandler<PhotoState, PhotoEffect, PhotoAction, PhotoMutation> {

private var photoType = PhotoType.default
Expand Down Expand Up @@ -213,7 +216,13 @@ class PhotoActionHandler @Inject constructor(
SharePhoto -> flow {
effect(PhotoEffect.SharePhoto(state.currentPhoto.fullResUrl))
}
is FullImageLoaded -> flowOf(ShowShareIcon(action.id))
is FullImageLoaded -> flow {
emit(ShowShareIcon(action.photo.id))
val metadata = metadataUseCase.extractMetadata(action.photo.fullResUrl)
if (metadata != null) {
emit(ShowMetadata(action.photo.id, metadata))
}
}
is PersonSelected -> flow {
effect(NavigateToPerson(action.person.id))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import com.savvasdalkitsis.uhuruphotos.api.db.photos.PhotoDetails
import com.savvasdalkitsis.uhuruphotos.api.people.view.state.Person
import com.savvasdalkitsis.uhuruphotos.api.photos.model.latLng
import com.savvasdalkitsis.uhuruphotos.api.seam.Mutation
import com.savvasdalkitsis.uhuruphotos.implementation.photos.usecase.PhotoMetadata
import com.savvasdalkitsis.uhuruphotos.implementation.photos.view.state.PhotoState
import com.savvasdalkitsis.uhuruphotos.implementation.photos.view.state.SinglePhotoState
import kotlin.math.min
Expand Down Expand Up @@ -97,6 +98,12 @@ sealed class PhotoMutation(
}
})

data class ShowMetadata(val id: String, val metadata: PhotoMetadata) : PhotoMutation({
it.copyPhoto(id) { photoState ->
photoState.copy(metadata = metadata)
}
})

data class ShowSinglePhoto(val photoState: SinglePhotoState) : PhotoMutation({
it.copy(
currentIndex = 0,
Expand Down
Loading

0 comments on commit 305693d

Please sign in to comment.