feat: hide ref database view (#2682)

This commit is contained in:
Nathan.fooo
2023-06-02 12:04:14 +08:00
committed by GitHub
parent 82dcd4b99e
commit 265177e444
7 changed files with 50 additions and 9 deletions

View File

@ -17,6 +17,14 @@ class DatabaseViewBackendService {
required this.viewId,
});
/// Returns the datbaase id associated with the view.
Future<Either<String, FlowyError>> getDatabaseId() async {
final payload = DatabaseViewIdPB(value: viewId);
return DatabaseEventGetDatabaseId(payload)
.send()
.then((value) => value.leftMap((l) => l.value));
}
Future<Either<DatabasePB, FlowyError>> openGrid() async {
await FolderEventSetLatestView(ViewIdPB(value: viewId)).send();