Skip to content

Commit

Permalink
Correção da marca de leitura da mensagem
Browse files Browse the repository at this point in the history
  • Loading branch information
rtenorioh committed Oct 20, 2022
1 parent cc82c6e commit 6e68ec8
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions frontend/src/components/MessagesList/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React, { useState, useEffect, useReducer, useRef } from "react";

import { isSameDay, parseISO, format } from "date-fns";
import {
isSameDay,
parseISO,
format
} from "date-fns";
import openSocket from "../../services/socket-io";
import clsx from "clsx";

Expand All @@ -26,11 +30,11 @@ import VcardPreview from "../VcardPreview";
import LocationPreview from "../LocationPreview";
import ModalImageCors from "../ModalImageCors";
import MessageOptionsMenu from "../MessageOptionsMenu";
import Audio from "../Audio";

import api from "../../services/api";
import toastError from "../../errors/toastError";
import { toast } from "react-toastify";
import Audio from "../Audio";

const useStyles = makeStyles((theme) => ({
messagesListWrapper: {
Expand Down Expand Up @@ -534,16 +538,16 @@ const MessagesList = ({ ticketId, isGroup }) => {
};

const renderMessageAck = (message) => {
if (message.ack === 1) {
if (message.ack === 0) {
return <AccessTime fontSize="small" className={classes.ackIcons} />;
}
if (message.ack === 2) {
if (message.ack === 1) {
return <Done fontSize="small" className={classes.ackIcons} />;
}
if (message.ack === 3) {
if (message.ack === 2) {
return <DoneAll fontSize="small" className={classes.ackIcons} />;
}
if (message.ack === 4 || message.ack === 5) {
if (message.ack === 3 || message.ack === 4) {
return <DoneAll fontSize="small" className={classes.ackDoneAllIcon} />;
}
};
Expand Down

0 comments on commit 6e68ec8

Please sign in to comment.