1
0
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:
FreeScout 2020-11-21 22:15:57 -08:00
parent 1eadd06f9d
commit fedaa33741
2 changed files with 3 additions and 3 deletions

View File

@ -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
View File

@ -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