Reviewed-on: #11
This commit was merged in pull request #11.
This commit is contained in:
@@ -60,6 +60,7 @@ export function DialogInput() {
|
|||||||
useHotkeys([
|
useHotkeys([
|
||||||
['Esc', () => {
|
['Esc', () => {
|
||||||
setAttachments([]);
|
setAttachments([]);
|
||||||
|
deselectAllMessages();
|
||||||
}]
|
}]
|
||||||
], [], true);
|
], [], true);
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ export function MessageAttachments(props: MessageAttachmentsProps) {
|
|||||||
text: props.text,
|
text: props.text,
|
||||||
parent: props.parent,
|
parent: props.parent,
|
||||||
}
|
}
|
||||||
console.info("Rendering attachment", attachProps);
|
|
||||||
switch (att.type) {
|
switch (att.type) {
|
||||||
case AttachmentType.MESSAGES:
|
case AttachmentType.MESSAGES:
|
||||||
return <MessageReplyMessages {...attachProps} key={index}></MessageReplyMessages>
|
return <MessageReplyMessages {...attachProps} key={index}></MessageReplyMessages>
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ export function Message(props: MessageProps) {
|
|||||||
userSelect: 'text',
|
userSelect: 'text',
|
||||||
fontSize: '13px',
|
fontSize: '13px',
|
||||||
color: messageStyle == MessageStyle.BUBBLES ? (computedTheme == 'light' ? (props.parent?.from_me ? 'white' : 'black') : 'white') : (computedTheme == 'light' ? 'black' : 'white')
|
color: messageStyle == MessageStyle.BUBBLES ? (computedTheme == 'light' ? (props.parent?.from_me ? 'white' : 'black') : 'white') : (computedTheme == 'light' ? 'black' : 'white')
|
||||||
}} ml={props.avatar_no_render ? 50 : undefined}>
|
}} ml={props.avatar_no_render ? 50 : undefined} onDoubleClick={(e) => e.stopPropagation()}>
|
||||||
<TextParser performanceEntityLimit={ENTITY_LIMITS_TO_PARSE_IN_MESSAGE} oversizeIfTextSmallerThan={1} text={props.message.trim()}></TextParser>
|
<TextParser performanceEntityLimit={ENTITY_LIMITS_TO_PARSE_IN_MESSAGE} oversizeIfTextSmallerThan={1} text={props.message.trim()}></TextParser>
|
||||||
</Box>
|
</Box>
|
||||||
</Flex>
|
</Flex>
|
||||||
@@ -302,7 +302,7 @@ export function Message(props: MessageProps) {
|
|||||||
userSelect: 'text',
|
userSelect: 'text',
|
||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
color: props.from_me ? 'white' : (computedTheme == 'light' ? 'black' : 'white')
|
color: props.from_me ? 'white' : (computedTheme == 'light' ? 'black' : 'white')
|
||||||
}}>
|
}} onDoubleClick={(e) => e.stopPropagation()}>
|
||||||
<TextParser __reserved_2 performanceEntityLimit={ENTITY_LIMITS_TO_PARSE_IN_MESSAGE} oversizeIfTextSmallerThan={1} text={props.message.trim()}></TextParser>
|
<TextParser __reserved_2 performanceEntityLimit={ENTITY_LIMITS_TO_PARSE_IN_MESSAGE} oversizeIfTextSmallerThan={1} text={props.message.trim()}></TextParser>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRosettaColors } from "@/app/hooks/useRosettaColors";
|
import { useRosettaColors } from "@/app/hooks/useRosettaColors";
|
||||||
import { useReplyMessages } from "@/app/providers/DialogProvider/useReplyMessages";
|
import { useReplyMessages } from "@/app/providers/DialogProvider/useReplyMessages";
|
||||||
import { Button, Flex, Modal, Text } from "@mantine/core";
|
import { Button, Flex, Modal, Text } from "@mantine/core";
|
||||||
import { useDisclosure, useHotkeys } from "@mantine/hooks";
|
import { useDisclosure } from "@mantine/hooks";
|
||||||
import { IconCornerUpLeft, IconCornerUpRightDouble, IconTrash, IconX } from "@tabler/icons-react";
|
import { IconCornerUpLeft, IconCornerUpRightDouble, IconTrash, IconX } from "@tabler/icons-react";
|
||||||
import classes from "./ReplyHeader.module.css";
|
import classes from "./ReplyHeader.module.css";
|
||||||
import { DialogsList } from "../DialogsList/DialogsList";
|
import { DialogsList } from "../DialogsList/DialogsList";
|
||||||
@@ -19,10 +19,6 @@ export function ReplyHeader() {
|
|||||||
const [opened, { open, close }] = useDisclosure(false);
|
const [opened, { open, close }] = useDisclosure(false);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const {deleteSelectedMessages} = useDialog();
|
const {deleteSelectedMessages} = useDialog();
|
||||||
|
|
||||||
useHotkeys([
|
|
||||||
['Esc', deselectAllMessages]
|
|
||||||
], [], true);
|
|
||||||
|
|
||||||
const onClickForward = () => {
|
const onClickForward = () => {
|
||||||
open();
|
open();
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ export function useReplyMessages() {
|
|||||||
const {dialog} = context;
|
const {dialog} = context;
|
||||||
|
|
||||||
const selectMessage = (message : MessageReply) => {
|
const selectMessage = (message : MessageReply) => {
|
||||||
|
console.info("-> ", replyMessages);
|
||||||
console.info(message);
|
console.info(message);
|
||||||
if(replyMessages.publicKey != dialog){
|
if(replyMessages.publicKey != dialog){
|
||||||
/**
|
/**
|
||||||
@@ -70,6 +71,7 @@ export function useReplyMessages() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const deselectAllMessages = () => {
|
const deselectAllMessages = () => {
|
||||||
|
console.info("Deselecting all messages");
|
||||||
setReplyMessages({
|
setReplyMessages({
|
||||||
publicKey: "",
|
publicKey: "",
|
||||||
messages: []
|
messages: []
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
export const APP_VERSION = "1.0.5";
|
export const APP_VERSION = "1.0.6";
|
||||||
export const CORE_MIN_REQUIRED_VERSION = "1.5.0";
|
export const CORE_MIN_REQUIRED_VERSION = "1.5.0";
|
||||||
|
|
||||||
export const RELEASE_NOTICE = `
|
export const RELEASE_NOTICE = `
|
||||||
**Обновление v1.0.5** :emoji_1f631:
|
**Обновление v1.0.6** :emoji_1f631:
|
||||||
- Оптимизирован код ядра
|
- Исправлена очистка сообщения при нажатии ESC
|
||||||
- Исправление ошибки с системой обновления в результате гонки потоков в ядре
|
- При клике на текст в сообщении теперь сообщение не уходит в ответ
|
||||||
- Исправление уведомлений при синхронизации
|
|
||||||
- Анимация перемещения диалогов
|
|
||||||
- Оптимизирован код вложений
|
|
||||||
- Исправлен скролл при подгрузке сообщений сверху
|
|
||||||
- Ускорена загрузка диалогов при большом количестве тяжелых изображений
|
|
||||||
`;
|
`;
|
||||||
Reference in New Issue
Block a user