another.im-ios/old/AppCore/Reducers/SharingReducer.swift
2024-08-11 13:09:29 +02:00

23 lines
553 B
Swift

import Foundation
extension SharingState {
static func reducer(state: inout SharingState, action: SharingAction) {
switch action {
case .showSharing(let shown):
state.sharingShown = shown
case .setCameraAccess(let granted):
state.isCameraAccessGranted = granted
case .setGalleryAccess(let granted):
state.isGalleryAccessGranted = granted
case .galleryItemsUpdated(let items):
state.galleryItems = items
default:
break
}
}
}