From eb4f116c4d2aa5f1717eb09f62585dbbcb9a5674 Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Mon, 19 Oct 2020 17:25:38 +0530 Subject: [PATCH 1/9] fresh start to conversation restructuring attempt #5(may be) --- src/services/ChatService.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/services/ChatService.ts diff --git a/src/services/ChatService.ts b/src/services/ChatService.ts new file mode 100644 index 000000000..230948edd --- /dev/null +++ b/src/services/ChatService.ts @@ -0,0 +1,11 @@ +// This service includes all the actions related to conversations storing + +// write conversation to cache +export const saveConverations = () => { + +} + +// read the conversation from cache +export const getConverations = () => { + +} From 5840c2e27401e425188e91bb19561baa7115682a Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Fri, 23 Oct 2020 22:28:44 +0530 Subject: [PATCH 2/9] let's start another attempt with restructing the code --- src/containers/Chat/Chat.tsx | 21 ++------------------- src/services/ChatService.ts | 30 +++++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/src/containers/Chat/Chat.tsx b/src/containers/Chat/Chat.tsx index 32ae09a45..084da6f53 100644 --- a/src/containers/Chat/Chat.tsx +++ b/src/containers/Chat/Chat.tsx @@ -20,6 +20,7 @@ import { setErrorMessage } from '../../common/notification'; import { SEARCH_QUERY_VARIABLES } from '../../common/constants'; import { SIMULATOR_CONTACT } from '../../common/constants'; import { getUserSession } from '../../services/AuthService'; +import { saveConverations } from '../../services/ChatService'; export interface ChatProps { contactId: number; @@ -40,25 +41,7 @@ export const Chat: React.SFC = ({ contactId }) => { const [getContactQuery] = useLazyQuery(SEARCH_QUERY, { onCompleted: (conversation) => { if (conversation) { - const conversations = client.readQuery({ - query: SEARCH_QUERY, - variables: queryVariables, - }); - - const conversationCopy = JSON.parse(JSON.stringify(conversation)); - conversationCopy.search[0].messages - .sort((currentMessage: any, nextMessage: any) => { - return currentMessage.id - nextMessage.id; - }) - .reverse(); - - const conversationsCopy = JSON.parse(JSON.stringify(conversations)); - conversationsCopy.search.unshift(conversationCopy.search[0]); - client.writeQuery({ - query: SEARCH_QUERY, - variables: queryVariables, - data: conversationsCopy, - }); + saveConverations(conversation, client); } }, }); diff --git a/src/services/ChatService.ts b/src/services/ChatService.ts index 230948edd..0e814a91b 100644 --- a/src/services/ChatService.ts +++ b/src/services/ChatService.ts @@ -1,11 +1,31 @@ // This service includes all the actions related to conversations storing +import { SEARCH_QUERY_VARIABLES } from '../common/constants'; +import { SEARCH_QUERY } from '../graphql/queries/Search'; + // write conversation to cache -export const saveConverations = () => { +export const saveConverations = (conversation: any, client: any) => { + const queryVariables = SEARCH_QUERY_VARIABLES; + const conversations = client.readQuery({ + query: SEARCH_QUERY, + variables: queryVariables, + }); -} + const conversationCopy = JSON.parse(JSON.stringify(conversation)); + conversationCopy.search[0].messages + .sort((currentMessage: any, nextMessage: any) => { + return currentMessage.id - nextMessage.id; + }) + .reverse(); -// read the conversation from cache -export const getConverations = () => { + const conversationsCopy = JSON.parse(JSON.stringify(conversations)); + conversationsCopy.search.unshift(conversationCopy.search[0]); + client.writeQuery({ + query: SEARCH_QUERY, + variables: queryVariables, + data: conversationsCopy, + }); +}; -} +// read the conversation from cache +export const getConverations = () => {}; From 2308e449e37f581276adb5d330e0679756fd20c2 Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Fri, 23 Oct 2020 22:43:43 +0530 Subject: [PATCH 3/9] more clean up --- src/services/ChatService.ts | 39 ++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/src/services/ChatService.ts b/src/services/ChatService.ts index 0e814a91b..eeec809af 100644 --- a/src/services/ChatService.ts +++ b/src/services/ChatService.ts @@ -3,29 +3,50 @@ import { SEARCH_QUERY_VARIABLES } from '../common/constants'; import { SEARCH_QUERY } from '../graphql/queries/Search'; +const queryVariables = SEARCH_QUERY_VARIABLES; + // write conversation to cache export const saveConverations = (conversation: any, client: any) => { - const queryVariables = SEARCH_QUERY_VARIABLES; - const conversations = client.readQuery({ - query: SEARCH_QUERY, - variables: queryVariables, - }); + // get the current conversations from the cache + const conversations = getCachedConverations(client); + // parese the conversation const conversationCopy = JSON.parse(JSON.stringify(conversation)); + + // TODOS: need to check why we need this. conversationCopy.search[0].messages .sort((currentMessage: any, nextMessage: any) => { return currentMessage.id - nextMessage.id; }) .reverse(); + // make a copy of current conversations const conversationsCopy = JSON.parse(JSON.stringify(conversations)); + + // add new conversation conversationsCopy.search.unshift(conversationCopy.search[0]); - client.writeQuery({ + + // update conversations + updateConversationCache(conversationsCopy, client); +}; + +// read the conversation from cache +export const getCachedConverations = (client: any) => { + // fetch conversations from the cache + const conversations = client.readQuery({ query: SEARCH_QUERY, variables: queryVariables, - data: conversationsCopy, }); + + return conversations; }; -// read the conversation from cache -export const getConverations = () => {}; +// update the conversations cache +export const updateConversationCache = (conversations: any, client: any) => { + // write the updated conversations to cached + client.writeQuery({ + query: SEARCH_QUERY, + variables: queryVariables, + data: conversations, + }); +}; From feabc6e2a8bf1ace0a084ff712574ca5e195e703 Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Fri, 23 Oct 2020 23:04:25 +0530 Subject: [PATCH 4/9] more clean up --- src/containers/Chat/Chat.tsx | 3 ++- src/services/ChatService.ts | 13 +++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/containers/Chat/Chat.tsx b/src/containers/Chat/Chat.tsx index 084da6f53..c5161d514 100644 --- a/src/containers/Chat/Chat.tsx +++ b/src/containers/Chat/Chat.tsx @@ -41,7 +41,8 @@ export const Chat: React.SFC = ({ contactId }) => { const [getContactQuery] = useLazyQuery(SEARCH_QUERY, { onCompleted: (conversation) => { if (conversation) { - saveConverations(conversation, client); + // save the conversation and update cache + saveConverations(conversation, client, queryVariables); } }, }); diff --git a/src/services/ChatService.ts b/src/services/ChatService.ts index eeec809af..08ea6d234 100644 --- a/src/services/ChatService.ts +++ b/src/services/ChatService.ts @@ -1,14 +1,11 @@ // This service includes all the actions related to conversations storing -import { SEARCH_QUERY_VARIABLES } from '../common/constants'; import { SEARCH_QUERY } from '../graphql/queries/Search'; -const queryVariables = SEARCH_QUERY_VARIABLES; - // write conversation to cache -export const saveConverations = (conversation: any, client: any) => { +export const saveConverations = (conversation: any, client: any, queryVariables: any) => { // get the current conversations from the cache - const conversations = getCachedConverations(client); + const conversations = getCachedConverations(client, queryVariables); // parese the conversation const conversationCopy = JSON.parse(JSON.stringify(conversation)); @@ -27,11 +24,11 @@ export const saveConverations = (conversation: any, client: any) => { conversationsCopy.search.unshift(conversationCopy.search[0]); // update conversations - updateConversationCache(conversationsCopy, client); + updateConversationCache(conversationsCopy, client, queryVariables); }; // read the conversation from cache -export const getCachedConverations = (client: any) => { +export const getCachedConverations = (client: any, queryVariables: any) => { // fetch conversations from the cache const conversations = client.readQuery({ query: SEARCH_QUERY, @@ -42,7 +39,7 @@ export const getCachedConverations = (client: any) => { }; // update the conversations cache -export const updateConversationCache = (conversations: any, client: any) => { +export const updateConversationCache = (conversations: any, client: any, queryVariables: any) => { // write the updated conversations to cached client.writeQuery({ query: SEARCH_QUERY, From 8b8fa41f3c04d646f47dfe0a7f45de191bc0897e Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Fri, 23 Oct 2020 23:48:29 +0530 Subject: [PATCH 5/9] let move to chatconversationlist clean up --- src/containers/Chat/Chat.tsx | 5 +-- .../ConversationList/ConversationList.tsx | 29 ++++++++++------- src/services/ChatService.ts | 31 ++++++++++++------- 3 files changed, 40 insertions(+), 25 deletions(-) diff --git a/src/containers/Chat/Chat.tsx b/src/containers/Chat/Chat.tsx index c5161d514..4f3dbc2cf 100644 --- a/src/containers/Chat/Chat.tsx +++ b/src/containers/Chat/Chat.tsx @@ -20,7 +20,7 @@ import { setErrorMessage } from '../../common/notification'; import { SEARCH_QUERY_VARIABLES } from '../../common/constants'; import { SIMULATOR_CONTACT } from '../../common/constants'; import { getUserSession } from '../../services/AuthService'; -import { saveConverations } from '../../services/ChatService'; +import { saveConversation } from '../../services/ChatService'; export interface ChatProps { contactId: number; @@ -41,8 +41,9 @@ export const Chat: React.SFC = ({ contactId }) => { const [getContactQuery] = useLazyQuery(SEARCH_QUERY, { onCompleted: (conversation) => { if (conversation) { + console.log('conversation', conversation); // save the conversation and update cache - saveConverations(conversation, client, queryVariables); + saveConversation(conversation, client, queryVariables); } }, }); diff --git a/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx b/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx index e86279c76..10d0f5095 100644 --- a/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx +++ b/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx @@ -14,6 +14,7 @@ import { setErrorMessage } from '../../../../common/notification'; import { SEARCH_QUERY_VARIABLES } from '../../../../common/constants'; import styles from './ConversationList.module.css'; import KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp'; +import { updateConversations } from '../../../../services/ChatService'; interface ConversationListProps { searchVal: string; @@ -150,21 +151,25 @@ export const ConversationList: React.SFC = (props) => { if (data && data.search.length === 0) { setShowLoadMore(false); } else { - const conversations = client.readQuery({ - query: SEARCH_QUERY, - variables: queryVariables, - }); + console.log('data', data); + // const conversations = client.readQuery({ + // query: SEARCH_QUERY, + // variables: queryVariables, + // }); - const conversationCopy = JSON.parse(JSON.stringify(data)); + // const conversationCopy = JSON.parse(JSON.stringify(data)); - const conversationsCopy = JSON.parse(JSON.stringify(conversations)); - conversationsCopy.search = [...conversationsCopy.search, ...conversationCopy.search]; + // const conversationsCopy = JSON.parse(JSON.stringify(conversations)); + // conversationsCopy.search = [...conversationsCopy.search, ...conversationCopy.search]; - client.writeQuery({ - query: SEARCH_QUERY, - variables: queryVariables, - data: conversationsCopy, - }); + // client.writeQuery({ + // query: SEARCH_QUERY, + // variables: queryVariables, + // data: conversationsCopy, + // }); + + // save the conversation and update cache + updateConversations(data, client, queryVariables); setLoadingOffset(loadingOffset + 10); } diff --git a/src/services/ChatService.ts b/src/services/ChatService.ts index 08ea6d234..eae70cf83 100644 --- a/src/services/ChatService.ts +++ b/src/services/ChatService.ts @@ -3,11 +3,27 @@ import { SEARCH_QUERY } from '../graphql/queries/Search'; // write conversation to cache -export const saveConverations = (conversation: any, client: any, queryVariables: any) => { +export const updateConversations = (conversation: any, client: any, queryVariables: any) => { // get the current conversations from the cache const conversations = getCachedConverations(client, queryVariables); - // parese the conversation + // make a copy of current conversations + const conversationsCopy = JSON.parse(JSON.stringify(conversations)); + + // add new conversation + conversationsCopy.search.unshift(conversation); + + // const conversationCopy = JSON.parse(JSON.stringify(data)); + + // const conversationsCopy = JSON.parse(JSON.stringify(conversations)); + // conversationsCopy.search = [...conversationsCopy.search, ...conversationCopy.search]; + + // update conversations + updateConversationsCache(conversationsCopy, client, queryVariables); +}; + +export const saveConversation = (conversation: any, client: any, queryVariables: any) => { + // parse the conversation const conversationCopy = JSON.parse(JSON.stringify(conversation)); // TODOS: need to check why we need this. @@ -17,14 +33,7 @@ export const saveConverations = (conversation: any, client: any, queryVariables: }) .reverse(); - // make a copy of current conversations - const conversationsCopy = JSON.parse(JSON.stringify(conversations)); - - // add new conversation - conversationsCopy.search.unshift(conversationCopy.search[0]); - - // update conversations - updateConversationCache(conversationsCopy, client, queryVariables); + updateConversations(conversation, client, queryVariables); }; // read the conversation from cache @@ -39,7 +48,7 @@ export const getCachedConverations = (client: any, queryVariables: any) => { }; // update the conversations cache -export const updateConversationCache = (conversations: any, client: any, queryVariables: any) => { +export const updateConversationsCache = (conversations: any, client: any, queryVariables: any) => { // write the updated conversations to cached client.writeQuery({ query: SEARCH_QUERY, From 0dc485b7eaa9b1b29035879a6385b99d0f192580 Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Fri, 23 Oct 2020 23:58:46 +0530 Subject: [PATCH 6/9] load more fixes --- .../ConversationList/ConversationList.tsx | 2 +- src/services/ChatService.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx b/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx index 10d0f5095..a19ec8a8b 100644 --- a/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx +++ b/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx @@ -69,7 +69,7 @@ export const ConversationList: React.SFC = (props) => { }, }); } - setShowLoading(true); + //setShowLoading(true); }, [offset, props.selectedContactId]); const { loading: conversationLoading, error: conversationError, data } = useQuery( diff --git a/src/services/ChatService.ts b/src/services/ChatService.ts index eae70cf83..e5e453cbe 100644 --- a/src/services/ChatService.ts +++ b/src/services/ChatService.ts @@ -7,16 +7,16 @@ export const updateConversations = (conversation: any, client: any, queryVariabl // get the current conversations from the cache const conversations = getCachedConverations(client, queryVariables); - // make a copy of current conversations - const conversationsCopy = JSON.parse(JSON.stringify(conversations)); + //const conversationsCopy = JSON.parse(JSON.stringify(conversations)); // add new conversation - conversationsCopy.search.unshift(conversation); + //conversationsCopy.search.unshift(conversation); - // const conversationCopy = JSON.parse(JSON.stringify(data)); + const conversationCopy = JSON.parse(JSON.stringify(conversation)); - // const conversationsCopy = JSON.parse(JSON.stringify(conversations)); - // conversationsCopy.search = [...conversationsCopy.search, ...conversationCopy.search]; + // make a copy of current conversations + const conversationsCopy = JSON.parse(JSON.stringify(conversations)); + conversationsCopy.search = [...conversationsCopy.search, ...conversationCopy.search]; // update conversations updateConversationsCache(conversationsCopy, client, queryVariables); From 0afa6ffa55335dbdf62a7c5585a1a7f0c87adf70 Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Sat, 24 Oct 2020 00:15:16 +0530 Subject: [PATCH 7/9] conversationlist clean up done --- src/containers/Chat/Chat.tsx | 1 - .../ConversationList/ConversationList.tsx | 17 ----------------- src/services/ChatService.ts | 8 +++----- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/containers/Chat/Chat.tsx b/src/containers/Chat/Chat.tsx index 4f3dbc2cf..40e4c599a 100644 --- a/src/containers/Chat/Chat.tsx +++ b/src/containers/Chat/Chat.tsx @@ -41,7 +41,6 @@ export const Chat: React.SFC = ({ contactId }) => { const [getContactQuery] = useLazyQuery(SEARCH_QUERY, { onCompleted: (conversation) => { if (conversation) { - console.log('conversation', conversation); // save the conversation and update cache saveConversation(conversation, client, queryVariables); } diff --git a/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx b/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx index a19ec8a8b..bd5b9f35d 100644 --- a/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx +++ b/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx @@ -151,23 +151,6 @@ export const ConversationList: React.SFC = (props) => { if (data && data.search.length === 0) { setShowLoadMore(false); } else { - console.log('data', data); - // const conversations = client.readQuery({ - // query: SEARCH_QUERY, - // variables: queryVariables, - // }); - - // const conversationCopy = JSON.parse(JSON.stringify(data)); - - // const conversationsCopy = JSON.parse(JSON.stringify(conversations)); - // conversationsCopy.search = [...conversationsCopy.search, ...conversationCopy.search]; - - // client.writeQuery({ - // query: SEARCH_QUERY, - // variables: queryVariables, - // data: conversationsCopy, - // }); - // save the conversation and update cache updateConversations(data, client, queryVariables); diff --git a/src/services/ChatService.ts b/src/services/ChatService.ts index e5e453cbe..9ce161539 100644 --- a/src/services/ChatService.ts +++ b/src/services/ChatService.ts @@ -7,15 +7,13 @@ export const updateConversations = (conversation: any, client: any, queryVariabl // get the current conversations from the cache const conversations = getCachedConverations(client, queryVariables); - //const conversationsCopy = JSON.parse(JSON.stringify(conversations)); - - // add new conversation - //conversationsCopy.search.unshift(conversation); - + // make a copy of current conversation const conversationCopy = JSON.parse(JSON.stringify(conversation)); // make a copy of current conversations const conversationsCopy = JSON.parse(JSON.stringify(conversations)); + + // add new conversation to conversations conversationsCopy.search = [...conversationsCopy.search, ...conversationCopy.search]; // update conversations From 921c2021bdd42790e0bc2f67b2fa7936447a3dd8 Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Sun, 25 Oct 2020 23:39:18 +0530 Subject: [PATCH 8/9] more cleanup --- .../Chat/ChatMessages/ChatMessages.tsx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/containers/Chat/ChatMessages/ChatMessages.tsx b/src/containers/Chat/ChatMessages/ChatMessages.tsx index 8bd05b9c0..b418ed16d 100644 --- a/src/containers/Chat/ChatMessages/ChatMessages.tsx +++ b/src/containers/Chat/ChatMessages/ChatMessages.tsx @@ -21,6 +21,7 @@ import { } from '../../../graphql/mutations/Chat'; import { FILTER_TAGS_NAME } from '../../../graphql/queries/Tag'; import { ReactComponent as TagIcon } from '../../../assets/images/icons/Tags/Selected.svg'; +import { getCachedConverations, updateConversationsCache } from '../../../services/ChatService'; export interface ChatMessagesProps { contactId: number | string; @@ -126,10 +127,9 @@ export const ChatMessages: React.SFC = ({ contactId }) => { if (data.search[0].messages.length === 0) { setShowLoadMore(false); } else { - const conversations = client.readQuery({ - query: SEARCH_QUERY, - variables: queryVariables, - }); + // get the conversations from cache + const conversations = getCachedConverations(client, queryVariables); + const conversationCopy = JSON.parse(JSON.stringify(data)); conversationCopy.search[0].messages .sort((currentMessage: any, nextMessage: any) => { @@ -147,11 +147,9 @@ export const ChatMessages: React.SFC = ({ contactId }) => { return conversation; }); - client.writeQuery({ - query: SEARCH_QUERY, - variables: queryVariables, - data: conversationsCopy, - }); + // update the conversation cache + updateConversationsCache(conversationsCopy, client, queryVariables); + setMessageOffset(messageOffset + 50); } }, From a658d94c4efb8ec2a92855c15b8dd55816ff6ed7 Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Mon, 26 Oct 2020 00:00:02 +0530 Subject: [PATCH 9/9] warning fixes --- src/config/apolloclient.ts | 2 +- src/containers/Group/GroupList/GroupList.tsx | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/config/apolloclient.ts b/src/config/apolloclient.ts index 830b2a746..e5eabc816 100644 --- a/src/config/apolloclient.ts +++ b/src/config/apolloclient.ts @@ -1,4 +1,4 @@ -import { ApolloClient, InMemoryCache, createHttpLink, split } from '@apollo/client'; +import { ApolloClient, InMemoryCache, createHttpLink } from '@apollo/client'; import { onError } from '@apollo/link-error'; import { RetryLink } from '@apollo/client/link/retry'; import { TokenRefreshLink } from 'apollo-link-token-refresh'; diff --git a/src/containers/Group/GroupList/GroupList.tsx b/src/containers/Group/GroupList/GroupList.tsx index 46c2fbe67..c6ca09f59 100644 --- a/src/containers/Group/GroupList/GroupList.tsx +++ b/src/containers/Group/GroupList/GroupList.tsx @@ -3,7 +3,6 @@ import { GET_GROUPS_COUNT, FILTER_GROUPS, GET_GROUPS } from '../../../graphql/qu import { DELETE_GROUP, UPDATE_GROUP_CONTACTS } from '../../../graphql/mutations/Group'; import styles from './GroupList.module.css'; import { ReactComponent as GroupIcon } from '../../../assets/images/icons/Groups/Dark.svg'; -import { ReactComponent as AutomationIcon } from '../../../assets/images/icons/Automations/Selected.svg'; import { ReactComponent as AutomationDarkIcon } from '../../../assets/images/icons/Automations/Dark.svg'; import { ReactComponent as ChatDarkIcon } from '../../../assets/images/icons/Chat/UnselectedDark.svg'; import ChatDarkIconSVG from '../../../assets/images/icons/Chat/UnselectedDark.svg'; @@ -82,7 +81,7 @@ export const GroupList: React.SFC = (props) => { client, `${numberDeleted} contact${ numberDeleted === 1 ? '' : 's were' - } removed and ${numberAdded} contact${numberAdded == 1 ? '' : 's were'} added` + } removed and ${numberAdded} contact${numberAdded === 1 ? '' : 's were'} added` ); } else if (numberDeleted > 0) { setNotification( @@ -90,7 +89,10 @@ export const GroupList: React.SFC = (props) => { `${numberDeleted} contact${numberDeleted === 1 ? '' : 's were'} removed` ); } else { - setNotification(client, `${numberAdded} contact${numberAdded == 1 ? '' : 's were'} added`); + setNotification( + client, + `${numberAdded} contact${numberAdded === 1 ? '' : 's were'} added` + ); } setAddContactsDialogShow(false); }, @@ -243,7 +245,7 @@ export const GroupList: React.SFC = (props) => { , + icon: , title: 'Send a message', onClick: () => setSendMessageDialogShow(true), },