chore: Deprecate collection.url on client

This commit is contained in:
Tom Moor
2024-01-31 20:08:01 -05:00
parent 4800b60825
commit 7417514e7c
11 changed files with 32 additions and 24 deletions

View File

@@ -65,6 +65,9 @@ export default class Collection extends ParanoidModel {
@observable
documents?: NavigationNode[];
/**
* @deprecated Use path instead.
*/
@observable
url: string;
@@ -139,6 +142,11 @@ export default class Collection extends ParanoidModel {
return (this.name ? this.name[0] : "?").toUpperCase();
}
@computed
get path() {
return this.url;
}
fetchDocuments = async (options?: { force: boolean }) => {
if (this.isFetching) {
return;

View File

@@ -166,7 +166,7 @@ class Notification extends Model {
const collection = this.collectionId
? this.store.rootStore.collections.get(this.collectionId)
: undefined;
return collection ? collectionPath(collection.url) : "";
return collection ? collectionPath(collection.path) : "";
}
case NotificationEventType.AddUserToDocument:
case NotificationEventType.MentionedInDocument: {