mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-17 02:17:03 -04:00
second batch of fixes (#2596)
Co-authored-by: programminglaboratorys <107296738+programminglaboratorys@users.noreply.github.com> Co-authored-by: Haruka <personal@shiroko.me> Co-authored-by: Amia <9750071+aamiaa@users.noreply.github.com> Co-authored-by: AutumnVN <autumnvnchino@gmail.com> Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com>
This commit is contained in:
parent
d6f1209438
commit
d19b0aeb5b
20 changed files with 58 additions and 63 deletions
|
@ -9,13 +9,16 @@ import "./style.css";
|
|||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { filters, findByPropsLazy, mapMangledModuleLazy } from "@webpack";
|
||||
import { Timestamp } from "@webpack/common";
|
||||
import type { Message } from "discord-types/general";
|
||||
import type { HTMLAttributes } from "react";
|
||||
|
||||
const { getMessageTimestampId } = findByPropsLazy("getMessageTimestampId");
|
||||
const { calendarFormat, dateFormat, isSameDay } = findByPropsLazy("calendarFormat", "dateFormat", "isSameDay", "accessibilityLabelCalendarFormat");
|
||||
const { calendarFormat, dateFormat, isSameDay } = mapMangledModuleLazy("millisecondsInUnit:", {
|
||||
calendarFormat: filters.byCode("sameElse"),
|
||||
dateFormat: filters.byCode('":'),
|
||||
isSameDay: filters.byCode("Math.abs(+"),
|
||||
});
|
||||
const MessageClasses = findByPropsLazy("separator", "latin24CompactTimeStamp");
|
||||
|
||||
function Sep(props: HTMLAttributes<HTMLElement>) {
|
||||
|
@ -42,7 +45,6 @@ function ReplyTimestamp({
|
|||
const baseTimestamp = baseMessage.timestamp as any;
|
||||
return (
|
||||
<Timestamp
|
||||
id={getMessageTimestampId(referencedMessage.message)}
|
||||
className="vc-reply-timestamp"
|
||||
compact={isSameDay(refTimestamp, baseTimestamp)}
|
||||
timestamp={refTimestamp}
|
||||
|
@ -65,7 +67,7 @@ export default definePlugin({
|
|||
|
||||
patches: [
|
||||
{
|
||||
find: "renderSingleLineMessage:function()",
|
||||
find: ".REPLY_QUOTE_MESSAGE_BLOCKED",
|
||||
replacement: {
|
||||
match: /(?<="aria-label":\i,children:\[)(?=\i,\i,\i\])/,
|
||||
replace: "$self.ReplyTimestamp(arguments[0]),"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue