mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-01 06:16:19 +01:00
26 lines
782 B
Dart
26 lines
782 B
Dart
|
import 'package:flutter/foundation.dart';
|
||
|
import 'package:nc_photos/account.dart';
|
||
|
import 'package:nc_photos/di_container.dart';
|
||
|
import 'package:nc_photos/entity/collection.dart';
|
||
|
import 'package:nc_photos/entity/collection/adapter.dart';
|
||
|
import 'package:nc_photos/entity/collection/util.dart';
|
||
|
import 'package:np_common/ci_string.dart';
|
||
|
|
||
|
class UnshareCollection {
|
||
|
const UnshareCollection(this._c);
|
||
|
|
||
|
/// Unshare the collection with a user
|
||
|
Future<CollectionShareResult> call(
|
||
|
Account account,
|
||
|
Collection collection,
|
||
|
CiString userId, {
|
||
|
required ValueChanged<Collection> onCollectionUpdated,
|
||
|
}) =>
|
||
|
CollectionAdapter.of(_c, account, collection).unshare(
|
||
|
userId,
|
||
|
onCollectionUpdated: onCollectionUpdated,
|
||
|
);
|
||
|
|
||
|
final DiContainer _c;
|
||
|
}
|