Enhancement: Paginate conversation calls in tabs (#560)

* Use conversationPage module for pagination

* Load more conversations

* Reset list if conversation status is changed

* Add specs to conversationPage

* Reset filter when page is re-mounted

* Update text

* Update text
This commit is contained in:
Pranav Raj S
2020-02-26 21:15:01 +05:30
committed by GitHub
parent e5bc372a29
commit 0740d4762f
28 changed files with 395 additions and 141 deletions

View File

@@ -17,7 +17,7 @@ json.payload do
json.messages conversation.unread_messages.map(&:push_event_data)
end
json.inbox_id conversation.inbox_id
json.status conversation.status_before_type_cast
json.status conversation.status
json.timestamp conversation.messages.last.try(:created_at).try(:to_i)
json.user_last_seen_at conversation.user_last_seen_at.to_i
json.agent_last_seen_at conversation.agent_last_seen_at.to_i

View File

@@ -24,7 +24,7 @@ json.data do
json.messages conversation.unread_messages.map(&:push_event_data)
end
json.inbox_id conversation.inbox_id
json.status conversation.status_before_type_cast
json.status conversation.status
json.timestamp conversation.messages.last.try(:created_at).try(:to_i)
json.user_last_seen_at conversation.user_last_seen_at.to_i
json.agent_last_seen_at conversation.agent_last_seen_at.to_i

View File

@@ -3,6 +3,6 @@ end
json.payload do
json.success @status
json.current_status @conversation.status_before_type_cast
json.current_status @conversation.status
json.conversation_id @conversation.display_id
end