Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8ca15422f | ||
| eee419c0d4 |
@@ -104,12 +104,6 @@ export function DialogInput() {
|
||||
}, [dialog, editableDivRef]);
|
||||
|
||||
useEffect(() => {
|
||||
if(systemAccounts.find((acc) => acc.publicKey == dialog)){
|
||||
/**
|
||||
* У системных аккаунтов нельзя отвечать на сообщения
|
||||
*/
|
||||
return;
|
||||
}
|
||||
if(replyMessages.inDialogInput && replyMessages.inDialogInput == dialog){
|
||||
setAttachments([{
|
||||
type: AttachmentType.MESSAGES,
|
||||
@@ -117,10 +111,8 @@ export function DialogInput() {
|
||||
blob: JSON.stringify([...replyMessages.messages]),
|
||||
preview: ""
|
||||
}]);
|
||||
if(editableDivRef.current){
|
||||
editableDivRef.current.focus();
|
||||
}
|
||||
}
|
||||
}, [dialog, replyMessages]);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -216,12 +208,6 @@ export function DialogInput() {
|
||||
}
|
||||
|
||||
const onClickCamera = async () => {
|
||||
if(systemAccounts.find((acc) => acc.publicKey == dialog)){
|
||||
/**
|
||||
* У системных аккаунтов нельзя вызывать вложения
|
||||
*/
|
||||
return;
|
||||
}
|
||||
if(avatars.length == 0){
|
||||
return;
|
||||
}
|
||||
@@ -231,10 +217,8 @@ export function DialogInput() {
|
||||
type: AttachmentType.AVATAR,
|
||||
preview: await base64ImageToBlurhash(avatars[0].avatar)
|
||||
}]);
|
||||
if(editableDivRef.current){
|
||||
editableDivRef.current.focus();
|
||||
}
|
||||
}
|
||||
|
||||
const sendTypeingPacket = () => {
|
||||
let packet = new PacketTyping();
|
||||
@@ -245,12 +229,6 @@ export function DialogInput() {
|
||||
}
|
||||
|
||||
const onPaste = async (event: React.ClipboardEvent) => {
|
||||
if(systemAccounts.find((acc) => acc.publicKey == dialog)){
|
||||
/**
|
||||
* У системных аккаунтов нельзя вызывать вложения
|
||||
*/
|
||||
return;
|
||||
}
|
||||
if(attachments.length >= MAX_ATTACHMENTS_IN_MESSAGE){
|
||||
return;
|
||||
}
|
||||
@@ -271,9 +249,7 @@ export function DialogInput() {
|
||||
preview: await base64ImageToBlurhash(base64Image)
|
||||
}]);
|
||||
}
|
||||
if(editableDivRef.current){
|
||||
editableDivRef.current.focus();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ export function MentionRow(props : MentionRowProps) {
|
||||
{props.username == 'all' && <Avatar title="@" variant="filled" color={colors.brandColor}>@</Avatar>}
|
||||
{props.username == 'admin' && <Avatar title="@" variant="filled" color={colors.error}>@</Avatar>}
|
||||
{props.username != 'all' && props.username != 'admin' && <Avatar
|
||||
name={props.title}
|
||||
variant="light"
|
||||
title={props.title}
|
||||
variant="filled"
|
||||
color="initials"
|
||||
src={avatars.length > 0 ? avatars[0].avatar : null}
|
||||
></Avatar>}
|
||||
|
||||
Reference in New Issue
Block a user