mirror of
https://github.com/zulip/zulip.git
synced 2025-10-22 20:42:14 +00:00
The (1) delay in fetching the read receipts data from the api call to `/json/messages/${message_id}/read_receipts`; followed by the execution of the success callback function, and the (2) use of `.append()` to render the modal and user list, together lead to duplication of the read receipts modal and also the user list inside the read receipts menu. This commit adds a check to set the read receipts menu contents only if the read receipts modal for the selected message ID is open by the time the network request is resolved. In addition, this commit also uses the `on_shown` hook instead of the `on_show` hook in the read receipts modal logic, to add a delay in the calling of the read receipts API, which prevents the stacking of the requests.
21 lines
937 B
Handlebars
21 lines
937 B
Handlebars
<div class="micromodal" id="read_receipts_modal" aria-hidden="true" data-message-id="{{message_id}}">
|
|
<div class="modal__overlay" tabindex="-1">
|
|
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="read_receipts_modal_label">
|
|
<header class="modal__header">
|
|
<h1 class="modal__title" id="read_receipts_modal_label">
|
|
{{t "Read receipts" }}
|
|
</h1>
|
|
<button class="modal__close" aria-label="{{t 'Close modal' }}" data-micromodal-close></button>
|
|
</header>
|
|
<hr/>
|
|
<main class="modal__content">
|
|
<div class="alert" id="read_receipts_error"></div>
|
|
<div class="read_receipts_info">
|
|
</div>
|
|
<div class="loading_indicator"></div>
|
|
<ul class="read_receipts_list"></ul>
|
|
</main>
|
|
</div>
|
|
</div>
|
|
</div>
|