This commit is contained in:
2024-09-27 02:03:44 +03:00
parent 9b14f5be19
commit c577b91dfe
4 changed files with 228 additions and 218 deletions

View File

@@ -53,7 +53,7 @@ import ArrowDownSVG from "../../../assets/svgs/ArrowDown.svg";
import { LoadingSnackbar } from "../../Snackbar/LoadingSnackbar";
import { executeEvent, subscribeToEvent, unsubscribeFromEvent } from "../../../utils/events";
import RefreshIcon from '@mui/icons-material/Refresh';
import { getArbitraryEndpointReact, getBaseApiReact } from "../../../App";
import { getArbitraryEndpointReact, getBaseApiReact, isMobile } from "../../../App";
import { WrapperUserAction } from "../../WrapperUserAction";
import { addDataPublishesFunc, getDataPublishesFunc } from "../Group";
const filterOptions = ["Recently active", "Newest", "Oldest"];
@@ -105,12 +105,15 @@ export const GroupMail = ({
const setTempData = async ()=> {
try {
const getTempAnnouncements = await getTempPublish()
if(getTempAnnouncements?.thread){
let tempData = []
Object.keys(getTempAnnouncements?.thread || {}).map((key)=> {
const value = getTempAnnouncements?.thread[key]
tempData.push(value.data)
if(value?.data?.groupId === groupIdRef?.current){
tempData.push(value.data)
}
})
setTempPublishedList(tempData)
}
@@ -720,15 +723,18 @@ export const GroupMail = ({
display: "flex",
flexDirection: "column",
justifyContent: "center",
width: '100%'
}}
>
<ThreadSingleTitle
sx={{
fontWeight: shouldAppearLighter && 300,
fontSize: isMobile && '18px'
}}
>
{thread?.threadData?.title}
</ThreadSingleTitle>
<Spacer height="10px" />
{filterMode === "Recently active" && (
<div
style={{

View File

@@ -172,7 +172,10 @@ export const NewThread = ({
const closeModal = () => {
setIsOpen(false);
setValue("");
setPostReply(null)
if(setPostReply){
setPostReply(null)
}
};
async function publishQDNResource() {
@@ -288,6 +291,7 @@ export const NewThread = ({
service: 'DOCUMENT',
tempData: threadObject,
created: Date.now(),
groupId: groupInfo.groupId
}
const dataToSaveToStoragePost = {
name: myName,
@@ -313,15 +317,7 @@ export const NewThread = ({
// );
if (publishCallback) {
publishCallback()
// threadCallback({
// threadData: threadObject,
// threadOwner: name,
// name,
// threadId: identifierThread,
// created: Date.now(),
// service: 'MAIL_PRIVATE',
// identifier: identifier
// })
}
closeModal();
} else {