mirror of
https://github.com/thelounge/thelounge
synced 2024-11-21 19:43:07 +00:00
wip sharedmsg in client
This commit is contained in:
parent
68ba13ca12
commit
b67e4699f5
2 changed files with 6 additions and 6 deletions
|
@ -79,7 +79,7 @@ import {
|
|||
} from "vue";
|
||||
import {useStore} from "../js/store";
|
||||
import {ClientChan, ClientMessage, ClientNetwork, ClientLinkPreview} from "../js/types";
|
||||
import Msg from "../../server/models/msg";
|
||||
import {SharedMsg} from "../../shared/types/msg";
|
||||
|
||||
type CondensedMessageContainer = {
|
||||
type: "condensed";
|
||||
|
@ -242,7 +242,7 @@ export default defineComponent({
|
|||
});
|
||||
|
||||
const shouldDisplayDateMarker = (
|
||||
message: Msg | ClientMessage | CondensedMessageContainer,
|
||||
message: SharedMsg | ClientMessage | CondensedMessageContainer,
|
||||
id: number
|
||||
) => {
|
||||
const previousMessage = condensedMessages.value[id - 1];
|
||||
|
@ -270,7 +270,7 @@ export default defineComponent({
|
|||
return false;
|
||||
};
|
||||
|
||||
const isPreviousSource = (currentMessage: ClientMessage | Msg, id: number) => {
|
||||
const isPreviousSource = (currentMessage: ClientMessage | SharedMsg, id: number) => {
|
||||
const previousMessage = condensedMessages.value[id - 1];
|
||||
return !!(
|
||||
previousMessage &&
|
||||
|
|
6
client/js/types.d.ts
vendored
6
client/js/types.d.ts
vendored
|
@ -3,7 +3,7 @@ import {defineComponent} from "vue";
|
|||
import Chan from "../../server/models/chan";
|
||||
import Network from "../../server/models/network";
|
||||
import User from "../../server/models/user";
|
||||
import Message from "../../server/models/msg";
|
||||
import SharedMessage from "../../shared/types/msg";
|
||||
import {Mention} from "../../server/client";
|
||||
import {ClientConfiguration} from "../../server/server";
|
||||
import {LinkPreview} from "../../server/plugins/irc-events/link";
|
||||
|
@ -20,8 +20,8 @@ type ClientUser = User & {
|
|||
//
|
||||
};
|
||||
|
||||
type ClientMessage = Omit<Message, "users"> & {
|
||||
time: number;
|
||||
type ClientMessage = Omit<SharedMessage, "users"> & {
|
||||
time: Date;
|
||||
users: string[];
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue