mirror of
https://github.com/freescout-helpdesk/freescout.git
synced 2024-11-24 19:33:07 +01:00
conversation.view.focus event
This commit is contained in:
parent
1eadd06f9d
commit
fedaa33741
@ -120,10 +120,10 @@ class PolycastServiceProvider extends ServiceProvider
|
||||
if (!empty($request->data) && !empty($request->data['conversation_id'])) {
|
||||
$viewing_conversation_id = $request->data['conversation_id'];
|
||||
|
||||
if (!empty($request->data['conversation_view_start'])) {
|
||||
if (!empty($request->data['conversation_view_focus'])) {
|
||||
$conversation = Conversation::find($request->data['conversation_id']);
|
||||
if ($conversation) {
|
||||
\Eventy::action('conversation.view.start', $conversation);
|
||||
\Eventy::action('conversation.view.focus', $conversation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
public/js/main.js
vendored
2
public/js/main.js
vendored
@ -2967,7 +2967,7 @@ function polycastInit()
|
||||
data.replying = 0;
|
||||
}
|
||||
if (!fs_prev_focus && document.hasFocus()) {
|
||||
data.conversation_view_start = 1;
|
||||
data.conversation_view_focus = 1;
|
||||
}
|
||||
fs_prev_focus = document.hasFocus();
|
||||
// If conversation_id is passed it means that user is viewing the converation
|
||||
|
Loading…
Reference in New Issue
Block a user