Make chat faster

This commit is contained in:
cuom1999 2023-11-01 20:54:09 -05:00
parent 58f3807b8d
commit e5b2481345
10 changed files with 135 additions and 102 deletions

View file

@ -82,7 +82,7 @@
{% include 'chat/user_online_status.html' %}
</div>
<div id="chat-box">
<img src="{{static('loading.gif')}}" id="loader">
<img src="{{static('loading.gif')}}" id="loader" style="display: none;">
<ul id="chat-log">
{% include 'chat/message_list.html' %}
</ul>

View file

@ -1,10 +1,4 @@
<script type="text/javascript">
let META_HEADER = [
"{{_('Recent')}}",
"{{_('Following')}}",
"{{_('Admin')}}",
"{{_('Other')}}",
];
let isMobile = window.matchMedia("only screen and (max-width: 799px)").matches;
function load_next_page(last_id, refresh_html=false) {

View file

@ -1,12 +1,12 @@
<li class="message" id="message-{{ message.id }}" message-id="{{ message.id }}">
<a href="{{ url('user_page', message.author.user.username) }}">
<a href="{{ url('user_page', message.author.username) }}">
<img src="{{ gravatar(message.author, 135) }}" class="profile-pic">
</a>
<div class="body-message">
<div class="user-time">
<span class="username {{ message.author.css_class }}">
<a href="{{ url('user_page', message.author.user.username) }}">
{{ message.author }}
<a href="{{ url('user_page', message.author.username) }}">
{{ message.author.username }}
</a>
</span>
<span class="time">