Remove duplicate connection-error message.

There's really no need for a separate user-visible error message for
get_messages vs. get_events.

Fixes #4703.
This commit is contained in:
Rohitt Vashishtha 2017-05-08 18:48:43 +05:30 committed by Tim Abbott
parent 94b7058743
commit 5be7494ddf
2 changed files with 2 additions and 7 deletions

View File

@ -14,7 +14,7 @@ exports.reset_load_more_status = function reset_load_more_status() {
}; };
function process_result(messages, opts) { function process_result(messages, opts) {
$('#get_old_messages_error').removeClass("show"); $('#connection-error').removeClass("show");
if ((messages.length === 0) && (current_msg_list === message_list.narrowed) && if ((messages.length === 0) && (current_msg_list === message_list.narrowed) &&
message_list.narrowed.empty()) { message_list.narrowed.empty()) {
@ -120,7 +120,7 @@ exports.load_old_messages = function load_old_messages(opts) {
} }
// We might want to be more clever here // We might want to be more clever here
$('#get_old_messages_error').addClass("show"); $('#connection-error').addClass("show");
setTimeout(function () { setTimeout(function () {
exports.load_old_messages(opts); exports.load_old_messages(opts);
}, 5000); }, 5000);

View File

@ -80,11 +80,6 @@ var page_params = {{ page_params }};
{% trans %}<strong class="message">Unable to connect to {% trans %}<strong class="message">Unable to connect to
Zulip.</strong> Updates may be delayed.{% endtrans %} {{ _('Retrying soon...') }} <a class="restart_get_events_button">{{ _('Try now.') }}</a> Zulip.</strong> Updates may be delayed.{% endtrans %} {{ _('Retrying soon...') }} <a class="restart_get_events_button">{{ _('Try now.') }}</a>
</div> </div>
<div class="alert alert_sidebar alert-error home-error-bar" id="get_old_messages_error">
<div class="exit"></div>
{% trans %}<strong class="message">Unable to connect to
Zulip.</strong> Could not fetch messages.{% endtrans %} {{ _('Retrying soon...') }}
</div>
<div class="alert alert_sidebar alert-error home-error-bar" id="zephyr-mirror-error"> <div class="alert alert_sidebar alert-error home-error-bar" id="zephyr-mirror-error">
<div class="exit"></div> <div class="exit"></div>
{# The below isn't tagged for translation {# The below isn't tagged for translation