Cable-Desktop/js/views
lilia fd6e2954f7 Curtail over-zealous websocket reconnects
Closes #173

Previously, in the event of a failed websocket auth, we would attempt to
reconnect once a second ad infinitum. This changeset ensures that we
only reconnect automatically if the socket closed 'normally' as
indicated by the code on the socket's CloseEvent. Otherwise, show a
'Websocket closed' error on the inbox view.

Ideally we would show a more contextual error (ie, 'Unauthorized'), but
unfortunately the actual server response code is not available to our
code. It can be observed in the console output from the background page,
but programmatically, we only receive the WebSocket CloseEvent codes
listed here:
https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#Status_codes

The websocket error message is displayed by a normally-hidden but ever
present socket status element. Clicking this element will immediately
refresh the background page, which will try again to open the websocket
connection.
2015-03-09 16:04:26 -07:00
..
attachment_preview_view.js Rename Whisper.View#attributes 2015-03-06 17:05:36 -08:00
attachment_view.js Trigger update events after attachments load 2015-03-03 13:23:55 -08:00
conversation_list_item_view.js Use consistent boiler plate throughout js files 2015-03-05 15:45:35 -08:00
conversation_list_view.js Use consistent boiler plate throughout js files 2015-03-05 15:45:35 -08:00
conversation_view.js Rename Whisper.View#attributes 2015-03-06 17:05:36 -08:00
end_session_view.js Render end session messages correctly 2015-02-13 14:25:16 -08:00
file_input_view.js Use consistent boiler plate throughout js files 2015-03-05 15:45:35 -08:00
group_update_view.js Render leave-group messages correctly 2015-02-16 12:47:36 -08:00
inbox_view.js Curtail over-zealous websocket reconnects 2015-03-09 16:04:26 -07:00
key_verification_view.js Rename Whisper.View#attributes 2015-03-06 17:05:36 -08:00
list_view.js Use consistent boiler plate throughout js files 2015-03-05 15:45:35 -08:00
message_detail_view.js Fix multiple from address in message detail 2015-03-05 15:54:23 -08:00
message_list_view.js Use consistent boiler plate throughout js files 2015-03-05 15:45:35 -08:00
message_view.js Auto-link urls in message bodies 2015-03-06 17:01:04 -08:00
new_conversation_view.js Rename Whisper.View#attributes 2015-03-06 17:05:36 -08:00
new_group_update_view.js Remove unneeded if-gaurd 2015-03-05 17:48:07 -08:00
phone-input-view.js Use consistent boiler plate throughout js files 2015-03-05 15:45:35 -08:00
toast_view.js Use consistent boiler plate throughout js files 2015-03-05 15:45:35 -08:00
whisper_view.js Rename Whisper.View#attributes 2015-03-06 17:05:36 -08:00