Wait to scroll comments until sidebar animation is complete

Cleanup some unused code
This commit is contained in:
Tom Moor
2023-04-02 11:41:28 -04:00
parent 16a5be1aa6
commit 40103c9d8f
7 changed files with 37 additions and 29 deletions

View File

@@ -1,4 +1,3 @@
import { subMilliseconds } from "date-fns";
import { FindOrCreateOptions, Op } from "sequelize";
import {
BelongsTo,
@@ -9,7 +8,6 @@ import {
DataType,
Scopes,
} from "sequelize-typescript";
import { USER_PRESENCE_INTERVAL } from "@shared/constants";
import Document from "./Document";
import User from "./User";
import IdModel from "./base/IdModel";
@@ -94,18 +92,6 @@ class View extends IdModel {
});
}
static async findRecentlyEditingByDocument(documentId: string) {
return this.findAll({
where: {
documentId,
lastEditingAt: {
[Op.gt]: subMilliseconds(new Date(), USER_PRESENCE_INTERVAL * 2),
},
},
order: [["lastEditingAt", "DESC"]],
});
}
static async touch(documentId: string, userId: string, isEditing: boolean) {
const values: Partial<View> = {
updatedAt: new Date(),