feat: Visually differentiate unread documents (#1507)
* feat: Visually differentiate unread documents * feat: add document treatment in document preview * fix requested changes Co-authored-by: Tom Moor <tom.moor@gmail.com>
This commit is contained in:
@@ -114,7 +114,7 @@ export default class BaseStore<T: BaseModel> {
|
||||
}
|
||||
|
||||
@action
|
||||
async delete(item: T, options?: Object = {}) {
|
||||
async delete(item: T, options: Object = {}) {
|
||||
if (!this.actions.includes("delete")) {
|
||||
throw new Error(`Cannot delete ${this.modelName}`);
|
||||
}
|
||||
@@ -132,7 +132,7 @@ export default class BaseStore<T: BaseModel> {
|
||||
}
|
||||
|
||||
@action
|
||||
async fetch(id: string, options?: Object = {}): Promise<*> {
|
||||
async fetch(id: string, options: Object = {}): Promise<*> {
|
||||
if (!this.actions.includes("info")) {
|
||||
throw new Error(`Cannot fetch ${this.modelName}`);
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ export default class DocumentsStore extends BaseStore<Document> {
|
||||
@action
|
||||
fetch = async (
|
||||
id: string,
|
||||
options?: FetchOptions = {}
|
||||
options: FetchOptions = {}
|
||||
): Promise<?Document> => {
|
||||
if (!options.prefetch) this.isFetching = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user