-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IMPROVE][Omnichannel] More info and better design of Past Chats List #17346
Changes from 12 commits
7ac2a47
428c047
cf71487
759eaff
faaa0e8
1dd9fae
19d6184
2650e56
8388d6e
6ec867f
65d03ae
45ee0dd
4a7e476
2996e42
63ee375
1450021
866130c
ff89afc
74e51a6
efee120
3cf7fa9
845b7e9
36e5ad7
57d6457
587cd3d
048c1d4
6e14f32
7db6ce0
685a770
7317eac
12111e1
9536f15
c0990b2
9607da0
b5ed51a
1e98343
0e4bc40
127132e
bba74e3
0dacdf9
9d2e42e
a6d8ef4
5d28d35
26a5c98
0632ee2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,26 @@ | ||||||
<template name='chatRoomHistoryItem'> | ||||||
<li class='list-chat' id='{{_id}}' aria='{{v.token}}' > | ||||||
<div class="history-div"> | ||||||
<div class="visitor-img"> | ||||||
<img src="/avatar/{{responseBy.username}}" alt=""> | ||||||
</div> | ||||||
<div class="visitor-history-details"> | ||||||
<div class="visitor-details"> | ||||||
<h1>{{responseBy.username}}</h1> | ||||||
{{#if open}} | ||||||
<p class='open'>Open</p> | ||||||
{{else}} | ||||||
<p>Close at time {{time}}</p> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Create a helper method to return the formatted There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||||||
{{/if}} | ||||||
</div> | ||||||
<div class="total-messages"> | ||||||
<p>{{room.msgs}} messages</p> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done but this also includes the one as a connected message and one as a promptscript so there will be always +2 then the original message |
||||||
</div> | ||||||
<div class="agent-comment"> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The closing room message is not mandatory, there is a setting that forces the agent to leave a message when closing the conversation. So, this block of code is conditional, the template will need to provide a helper method that will be used to check if the closing message exists or not.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||||||
<p class="comment-heading">Agent comment:</p> | ||||||
<p class="comment-text">"{{lastMessage.msg}}"</p> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. performed a check if the lastMesaage is livechat-close message only then it will be displayed |
||||||
</div> | ||||||
</div> | ||||||
</div> | ||||||
</li> | ||||||
</template> |
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,55 @@ | ||||||||||||
<template name='customerChatHistory'> | ||||||||||||
<div class="content"> | ||||||||||||
<div class="list-view"> | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's check if the customer already has chat history, if not, let's display a message.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added a check if there is chat history available or not |
||||||||||||
<div> | ||||||||||||
<div class="active-pink-4 mb-4 inner-addon right-addon"> | ||||||||||||
<i class="glyphicon glyphicon-search icon-search"></i> | ||||||||||||
<input type="text" id="searchInput" class="" placeholder="Search" aria-label="Search"> | ||||||||||||
</div> | ||||||||||||
</div> | ||||||||||||
{{#if hasChatHistory}} | ||||||||||||
{{#if isAllChat}} | ||||||||||||
<div class="vistior-history-block"> | ||||||||||||
<ul id='allist'> | ||||||||||||
{{#if isSearching}} | ||||||||||||
{{#if isfound }} | ||||||||||||
{{#each searchResults}} | ||||||||||||
<li class='search-li'> | ||||||||||||
<div class="history-main"> | ||||||||||||
<div class="history-img"> | ||||||||||||
<img src="/avatar/{{u.username}}" > | ||||||||||||
</div> | ||||||||||||
<div class="history-detail-main"> | ||||||||||||
<div class="detail-main-upper"> | ||||||||||||
<h1>{{u.name}}</h1> | ||||||||||||
<p>{{time}}</p> | ||||||||||||
</div> | ||||||||||||
<div class="detail-main-lower"> | ||||||||||||
<p>{{msg}}</p> | ||||||||||||
</div> | ||||||||||||
</div> | ||||||||||||
</div> | ||||||||||||
</li> | ||||||||||||
{{/each}} | ||||||||||||
{{else}} | ||||||||||||
<h1 class='noresult'>No result found</h1> | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to add the translated string value here instead of a hardcoded "No result found".
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||||||||||||
{{/if}} | ||||||||||||
{{else}} | ||||||||||||
{{#each room in previousChats}} | ||||||||||||
{{> chatRoomHistoryItem room}} | ||||||||||||
{{/each}} | ||||||||||||
{{/if}} | ||||||||||||
</ul> | ||||||||||||
</div> | ||||||||||||
{{else}} | ||||||||||||
{{#if isChatClicked}} | ||||||||||||
{{> customerChatHistoryMessages}} | ||||||||||||
{{/if}} | ||||||||||||
{{/if}} | ||||||||||||
{{else}} | ||||||||||||
<h1 class='noresult'>No Previous Chats found</h1> | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to add the translated string value here instead of a hardcoded "No Previous Chats found".
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||||||||||||
{{/if}} | ||||||||||||
</div> | ||||||||||||
</div> | ||||||||||||
</template> | ||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,161 @@ | ||||||
import { Template } from 'meteor/templating'; | ||||||
import moment from 'moment'; | ||||||
import { ReactiveVar } from 'meteor/reactive-var'; | ||||||
import './customerChatHistory.html'; | ||||||
import './chatRoomHistoryItem.html'; | ||||||
import { APIClient, t } from '../../../../../utils/client'; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 't' is defined but never used. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed |
||||||
import { Session } from 'meteor/session'; | ||||||
import _ from 'underscore'; | ||||||
const ITEMS_COUNT = 50; | ||||||
let isChanged; | ||||||
Template.customerChatHistory.helpers({ | ||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove all of the blank lines like this. |
||||||
hasChatHistory() { | ||||||
// will return if user has any chatHistory or not | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need comments in all helper methods. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed |
||||||
return Template.instance().hasHistory.get() | ||||||
}, | ||||||
isSearching() { | ||||||
return Template.instance().isSearching.get() | ||||||
}, | ||||||
isAllChat() { | ||||||
// will return is have to load all chat | ||||||
return Template.instance().isAllChat.get(); | ||||||
}, | ||||||
isChatClicked() { | ||||||
// will return that if you have clicked in a single chatHistory | ||||||
return Template.instance().isChatClicked.get(); | ||||||
}, | ||||||
isfound() { | ||||||
// will return if find any search result | ||||||
return Session.get('found'); | ||||||
}, | ||||||
searchResults(){ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't need this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i have removed it |
||||||
// will return search result | ||||||
return Template.instance().searchResult.get(); | ||||||
}, | ||||||
previousChats() { | ||||||
// will return pervious chats list | ||||||
return addTime(Template.instance().history.get(),'true'); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My editor(VS CODE) is displaying this => "'addTime' is not defined". In addition, this is happening because the In addition, you don't need that function(addTime). You have created a new template -> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||||||
}, | ||||||
title() { | ||||||
|
||||||
let title = moment(this.ts).format('L LTS'); | ||||||
|
||||||
if (this.label) { | ||||||
title += ` - ${ this.label }`; | ||||||
} | ||||||
return title; | ||||||
}, | ||||||
}); | ||||||
|
||||||
const DEBOUNCE_TIME_FOR_SEARCH_DEPARTMENTS_IN_MS = 300; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're not using this const anywhere, you aren't applying the
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not using a correct name for this CONST? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||||||
Template.customerChatHistory.onCreated(function() { | ||||||
isChanged = false; | ||||||
const currentData = Template.currentData(); | ||||||
this.filter = new ReactiveVar(''); | ||||||
this.hasHistory = new ReactiveVar(false); | ||||||
this.visitorId = new ReactiveVar(); | ||||||
this.history = new ReactiveVar([]); | ||||||
this.offset = new ReactiveVar(0); | ||||||
this.total = new ReactiveVar(0); | ||||||
this.isAllChat = new ReactiveVar(true); | ||||||
this.isSearching = new ReactiveVar(false); | ||||||
this.isChatClicked = new ReactiveVar(true); | ||||||
this.autorun(async () => { | ||||||
const { room } = await APIClient.v1.get(`rooms.info?roomId=${ currentData.rid }`); | ||||||
if (room && room.v) { | ||||||
this.visitorId.set(room.v._id); | ||||||
} | ||||||
}); | ||||||
this.autorun(async () => { | ||||||
const filter = this.filter.get() | ||||||
if (!this.visitorId.get() || !currentData || !currentData.rid) { | ||||||
return; | ||||||
} | ||||||
const offset = this.offset.get(); | ||||||
const searchText='null'; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Please, don't do this. You just need to declare the
Inside this method, you will call the endpoint, and then you'll just apply a ternary operator to add the search term as parameters only when necessary. |
||||||
let baseUrl = `livechat/visitors.chatHistory/room/${ currentData.rid}/visitor/${ this.visitorId.get() }?searchText=${searchText}&count=${ ITEMS_COUNT }&offset=${ offset }` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Move this code inside the
Suggested change
this.loadRooms(searchTerm) {
}; There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||||||
const { history, total,resultArray } = await APIClient.v1.get(baseUrl); | ||||||
if(history.length > 0){ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't need this. What you need to do is:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. now i am doing this on server side |
||||||
for(var i=0 ;i<history.length; i++){ | ||||||
if(!history[i].open){ | ||||||
this.hasHistory.set(true); | ||||||
} | ||||||
} | ||||||
} | ||||||
this.total.set(total); | ||||||
this.history.set(this.history.get().concat(history)); | ||||||
}); | ||||||
}); | ||||||
|
||||||
Template.customerChatHistory.events({ | ||||||
'scroll .visitor-scroll': _.throttle(function(e, instance) { | ||||||
if (e.target.scrollTop >= (e.target.scrollHeight - e.target.clientHeight)) { | ||||||
const history = instance.history.get(); | ||||||
if (instance.total.get() <= history.length) { | ||||||
return; | ||||||
} | ||||||
return instance.offset.set(instance.offset.get() + ITEMS_COUNT); | ||||||
} | ||||||
}, 200), | ||||||
'keyup #searchInput': async function(event,template){ | ||||||
const offset = template.offset.get(); | ||||||
template.isSearching.set(true); | ||||||
template.isChatClicked.set(false); | ||||||
template.isAllChat.set(true); | ||||||
Session.set('found',false); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you need this? I didn't get yet why you're using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. now i am not using session anywhere |
||||||
if(event.target.value == ''){ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't need this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i have performed check on loadRoom method and removed it from here |
||||||
template.isSearching.set(false); | ||||||
}else{ | ||||||
Template.instance().searchResult = new ReactiveVar([]); | ||||||
var result = loadRoom(event.target.value ,Template.currentData().rid,template.visitorId.get(),offset) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You just need to pass the search term value through the
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. now only search term is passing on loadRoom method |
||||||
result.then(function(v){ | ||||||
if(v != null){ | ||||||
Session.set('found',true); | ||||||
Session.set('searchResult',v); | ||||||
template.searchResult.set(v); | ||||||
} | ||||||
}) | ||||||
}}, | ||||||
'click .list-chat': async function(event,template){ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here you just need to get the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i am getting the Room Id and token and storing into the session and getting from the customer chat history messages There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||||||
event.preventDefault(); | ||||||
template.isAllChat.set(false); | ||||||
template.isChatClicked.set(true); | ||||||
let id = event.currentTarget.id | ||||||
let token = event.currentTarget.attributes.aria.value; | ||||||
Session.set('FetchID',id); | ||||||
Session.set('FetchToken',token) | ||||||
} | ||||||
|
||||||
}); | ||||||
|
||||||
Template.customerChatHistory.onDestroyed(function(){ | ||||||
var header = document.getElementsByClassName('Contextualheading'); | ||||||
if(header[0]){ | ||||||
header[0].innerText = '' | ||||||
header[0].className = 'contextual-bar__header-title'; | ||||||
} | ||||||
}) | ||||||
|
||||||
loadRoom = async (searchTerm,rid,visitorId,offset) =>{ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As I mentioned before, move this code to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||||||
let baseUrl = `livechat/visitors.chatHistory/room/${ rid}/visitor/${ visitorId }?searchText=${searchTerm}&count=${ ITEMS_COUNT }&offset=${ offset }` | ||||||
const { resultArray } = await APIClient.v1.get(baseUrl); | ||||||
if(resultArray.length==0){ | ||||||
return null; | ||||||
}else{ | ||||||
return addTime(resultArray); | ||||||
} | ||||||
} | ||||||
|
||||||
addTime = (array,value='false') => { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't need this method. Then you will not need any loop, you will apply the method for each There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. now implementing this on chatRoomHistoryItem.js |
||||||
if(value=='true'){ | ||||||
if(!isChanged){ | ||||||
array.shift(); | ||||||
isChanged = true; | ||||||
} | ||||||
} | ||||||
for(var i=0; i<array.length;i++){ | ||||||
array[i].time = moment(array[i].ts).format('LT'); | ||||||
}; | ||||||
return array; | ||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<template name='customerChatHistoryMessages'> | ||
{{#if isLoading}} | ||
<h2 class='loding'> | ||
{{_ "Loading..."}} | ||
</h2> | ||
{{else}} | ||
<div class="chatHistory"> | ||
<div class='msgcount'> | ||
<p><span>{{len}} messages</span></p> | ||
</div> | ||
<ul> | ||
{{#each historyResult}} | ||
{{#unless t}} | ||
<li> | ||
<div class="history-main"> | ||
<div class="history-img"> | ||
<img src="/avatar/{{u.username}}" > | ||
</div> | ||
<div class="history-detail-main"> | ||
<div class="detail-main-upper"> | ||
<h1>{{u.name}}</h1> | ||
<p>{{time}}</p> | ||
</div> | ||
<div class="detail-main-lower"> | ||
<p>{{msg}}</p> | ||
</div> | ||
</div> | ||
</div> | ||
</li> | ||
{{else}} | ||
{{#if u.name}} | ||
<div class="closed-div"> | ||
<p class='closed-div-p'><span>Conversation closed</span></p> | ||
<div class="history-main"> | ||
<div class="history-img"> | ||
<div class='belldiv'> | ||
<i class="icon-bell"></i> | ||
</div> | ||
</div> | ||
<div class="history-detail-main"> | ||
<div class="detail-main-upper closed-h1"> | ||
<h1>Agent comment:</h1> | ||
</div> | ||
<div class="detail-main-lower closed-p"> | ||
<p>"{{msg}}".</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{{/if}} | ||
{{/unless}} | ||
{{/each}} | ||
</ul> | ||
</div> | ||
{{/if}} | ||
</template> |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,54 @@ | ||||||
import { Template } from 'meteor/templating'; | ||||||
import moment from 'moment'; | ||||||
import './customerChatHistoryMessages.html'; | ||||||
import { APIClient, t } from '../../../../../utils/client'; | ||||||
import { Session } from 'meteor/session'; | ||||||
import { ReactiveVar } from 'meteor/reactive-var'; | ||||||
|
||||||
Template.customerChatHistoryMessages.helpers({ | ||||||
historyResult() { | ||||||
// will return all the messages in history room | ||||||
return Template.instance().historyResult.get(); | ||||||
}, | ||||||
len() { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't need this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The helper method is still there. |
||||||
// will return length of total messages in room | ||||||
let len = Template.instance().historyResult.get(); | ||||||
return len = len.length; | ||||||
}, | ||||||
}) | ||||||
Template.customerChatHistoryMessages.onCreated(function() { | ||||||
this.historyResult = new ReactiveVar([]); | ||||||
this.history = new ReactiveVar([]); | ||||||
var id = Session.get('FetchID'); | ||||||
var token = Session.get('FetchToken') | ||||||
this.autorun(async () => { | ||||||
const{ messages } = await APIClient.v1.get(`livechat/messages.history/${ id }?token=${token}`); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to improve this kind of code, it's not according to the ESLint indentation.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed all type of these errors |
||||||
// will return pervious chats list | ||||||
this.history.set(messages); | ||||||
let allMessages = addTIME(this.history.get()); | ||||||
var header = document.getElementsByClassName('contextual-bar__header-title'); | ||||||
var day,agentName; | ||||||
|
||||||
if(allMessages.length !== 0){ | ||||||
var len = allMessages.length-1; | ||||||
agentName = allMessages[len].u.username; | ||||||
day = moment(allMessages[len].ts).format('dddd'); | ||||||
} | ||||||
if(header[0]){ | ||||||
header[0].innerText= `${agentName}, closed at ${day}` | ||||||
header[0].className = 'Contextualheading'; | ||||||
} | ||||||
this.historyResult.set(allMessages); | ||||||
}) | ||||||
}) | ||||||
addTIME = (array) => { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, you don't need this code here, we need to implement a helper method on the right template. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for this i am implementing on the on-created method itself |
||||||
let newArray = []; | ||||||
for(var j=array.length-2; j>=1;j--){ | ||||||
array[j].time = moment(array[j].ts).format('LT'); | ||||||
newArray.push(array[j]) | ||||||
}; | ||||||
return newArray; | ||||||
|
||||||
} | ||||||
|
||||||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This template will only display closed conversations, so this
if
condition does not make sense.Please, remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed