2023-05-01 19:05:33 +02:00
|
|
|
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';
|
2023-08-25 18:37:17 +02:00
|
|
|
import 'package:np_string/np_string.dart';
|
2023-05-01 19:05:33 +02:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|