Commit graph

864 commits

Author SHA1 Message Date
lilia
15d84199c2 Include ourselves in member list for a new group
Otherwise, the next incoming group update will show "<your number>
joined the group".

// FREEBIE
2015-09-15 13:58:17 -07:00
lilia
8b27c99f2b Fix exception while creating a conversation
When confirming the creation of a one on one conversation with a new
contact, the first click would do nothing but the second click would
work. Now the first click works.

Fix by only reject new conversation creation if not saved.

// FREEBIE
2015-09-15 13:24:09 -07:00
lilia
4b0c70fb44 Resolve multiple conflicts independently
When resolving multiple conflicts in a conversation, failure to resolve
one should not block any others.

// FREEBIE
2015-09-15 11:12:47 -07:00
lilia
f8745e1e5b Remove inactive models from inbox collection
Fixes auto archive when deleting all messages, and auto unarchive when
sending a new message. Previously, the convo would not reappear in the
inbox after deleting all messages.

// FREEBIE
2015-09-14 17:37:49 -07:00
lilia
80764bf494 Remove unused function
// FREEBIE
2015-09-14 16:56:01 -07:00
lilia
a390e37abc Fixup change:active_at handling when setting null
When a conversation goes from active to not active, it should be removed
the view rather than promoted.

// FREEBIE
2015-09-14 16:29:03 -07:00
lilia
b81d93177a Fix double selected states
Previously, when changing selection from an unread to a read
conversation, the unread conversation would not be deselected.

// FREEBIE
2015-09-14 15:31:29 -07:00
lilia
50add90fd9 Include image previews in notifications
// FREEBIE
2015-09-14 14:02:05 -07:00
lilia
d89e3ccdc4 Don't fetch messages from the background
Only fetch them from a frontend view. If the conversation is not open,
we don't need to load the messages, and if we do load them, they will
render before we've done the initial contact info loading (as
implemented in 74e96ce).

Fixes #344

// FREEBIE
2015-09-14 13:49:20 -07:00
lilia
bd5f43bdb1 Avoid excessive re-rendering of the inbox list
This listener is doing way more work than necessary to update the dom by
removing all the list items and re-creating them. This also causes the
bug where selected state is cleared when new messages arrive, not to
mention binding new event listeners without unbinding the old ones.

Fix by simply promoting an element to the top of the list when it's
active_at value changes, rather than re-rendering the whole list. This
could backfire if the value gets changed to an earlier timestamp but for
now we assume that won't happen.

// FREEBIE
2015-09-14 13:49:20 -07:00
lilia
e80fa187ba Upsize svg identicons
The chrome.notifications api renders iconUrls at full bleed, as opposed
to the Web Notifications api, which adds padding. This was causing our
identicons to look a bit over stretched.

Fixed by rendering them a bit larger and with some padding.

// FREEBIE
2015-09-14 13:49:19 -07:00
lilia
1a30d003f5 Fetch group contacts before fetching new messages
Messages must wait for sender info to arrive before rendering.

// FREEBIE
2015-09-14 13:49:09 -07:00
lilia
edbf2371bf Don't reset inboxWindowId
// FREEBIE
2015-09-14 11:12:08 -07:00
lilia
e8edbe53bc Improve notification behavior
Only allow one notification at a time. Use a basic notification for
normal messages, and image notification for image messages, and a list
notification when there are multiple unread messages.

// FREEBIE
2015-09-14 11:12:08 -07:00
lilia
59313b5177 Let message models manage blob urls for attachments
// FREEBIE
2015-09-13 19:42:49 -07:00
lilia
04c8796bd3 Disable socket level reconnect
This is now handled at a higher level by the message receiver with the
aid of http requests for diagnosing the disconnect.

// FREEBIE
2015-09-10 01:03:19 -07:00
lilia
0ebdf08ceb Render identicons in notifications
Render an svg, then canvas, then data url.

Fixes #325

// FREEBIE
2015-09-10 00:47:54 -07:00
lilia
3bd9108f6e Use isPrivate helper
// FREEBIE
2015-09-09 17:49:17 -07:00
lilia
d6d1a7da55 Don't notify on sync messages
// FREEBIE
2015-09-09 16:53:34 -07:00
lilia
6b483195cb Fix reconnect bugs from previous commit
Forgot to bind the socket event handler, and the then() handler should
come before the catch() handler or else it will execute every time the
catch handler executes.

// FREEBIE
2015-09-09 01:56:14 -07:00
lilia
16de5aa3d3 Improve reconnect logic
Always test connectivity with an http request after a websocket closes,
regardless of what code/error it closed with. If that request succeeds,
automatically reconnect the socket.

// FREEBIE
2015-09-09 01:34:36 -07:00
lilia
756875f235 Refactor inbox collection listeners
Create a new collection type for the inbox which listens to events on
the main conversation cache. Also don't reload conversation info from
the database as often or when unnecessary.

Fixes #345

// FREEBIE
2015-09-08 19:28:33 -07:00
lilia
0509bb0f5d Remove global updateInbox, used scoped version
// FREEBIE
2015-09-08 19:27:38 -07:00
lilia
949cb8d8e3 Use generic Backbone collection for inbox
There's no need to use a custom collection type here since we don't use
any of the ConversationCollection methods. This helps prevent the
introduction of duplicate models for the same chat.

// FREEBIE
2015-09-08 19:27:38 -07:00
lilia
2ab7315c80 Use generic collection for conversation contacts
Let the conversation controller instatiate the models in order to avoid
having duplicate models in memory.

// FREEBIE
2015-09-08 19:27:37 -07:00
lilia
6d4bf4e5d1 Whitespace
// FREEBIE
2015-09-08 19:27:37 -07:00
lilia
8dc098093d On delivery receipts, reload messages only
The delivery receipt handler should only update messages, so rather than
reloading the conversation and its contacts, only reload the messages.

// FREEBIE
2015-09-08 19:27:21 -07:00
lilia
f764445c86 Remove erroneous license file and headers
We only use GPLV3 around here.

// FREEBIE
2015-09-07 14:58:42 -07:00
lilia
1427369bd0 Fix suggestion list template
Convention collision.

// FREEBIE
2015-09-04 18:46:33 -07:00
lilia
98aed2975c Fix conversations opening from the background
From a notification, for example, we were opening the inbox but not the
conversation.

// FREEBIE
2015-09-04 18:34:13 -07:00
lilia
24a18e91b3 Clean up shared compose/group update ui
Makes the groupupdate and recipient input fields stick to the top,
restyles the typeahead as a floating dropdown list of suggestions
rather than a full width component, fixes group avatar thumbnail
rendering.

// FREEBIE
2015-09-04 13:11:21 -07:00
lilia
e402338af7 Make it easier to reference templates
Whisper.Views can now use templateName to reference the id of the
desired template.
2015-09-04 13:09:56 -07:00
lilia
239b87a1fa Fix conversation resize bug
Fix behavior where resizing a message detail screen would result in a
mis-sized conversation view when exiting the message detail.
2015-09-04 13:06:40 -07:00
lilia
7d9490e503 Add contact list view
Used by member list view. Refactored some templates for shared markup.
Fixes strange behavior where members in the list were hoverable and
selectable.

// FREEBIE
2015-09-03 14:31:05 -07:00
lilia
5d9965a60e Make all mustache templates available as partials
// FREEBIE
2015-09-03 13:22:52 -07:00
lilia
3e5946a12b Move worker initialization to background.js
Not sure why I put it in panel controller. Probably an oversight.

// FREEBIE
2015-09-01 16:56:21 -07:00
lilia
43aaf541c1 Compose flow style tweaks 2015-08-31 16:09:05 -07:00
lilia
cc92cdfa29 After destroying messages, remove the conversation view 2015-08-31 16:01:56 -07:00
lilia
50939d1851 Restyle conversation menu button 2015-08-31 13:59:12 -07:00
lilia
89f5f216ed Fix new conversation with no lastMessage 2015-08-27 18:02:39 -07:00
lilia
5b430fa8aa Make sure newly active conversations are added to the inbox 2015-08-27 17:54:07 -07:00
lilia
e8b4bd708e Fix lint warnings 2015-08-27 17:45:23 -07:00
lilia
9e79ecddf8 Fix scroll stickiness while hidden
Fix bug: Open thread A, open thread B, receive message in thread A, open
thread A. Scroll bar has reset to the top.
2015-08-27 16:25:35 -07:00
lilia
e3c56a0c03 Refactor and remove old window mgmt code/globals 2015-08-27 15:23:22 -07:00
lilia
3bc64cbed5 Remove unused function 2015-08-27 15:04:43 -07:00
lilia
21aaf0fab5 Clean up notification and unread indicator behavior 2015-08-27 15:04:43 -07:00
lilia
e0f84d9c8e Clear unread on focus iff convo is open 2015-08-27 15:04:43 -07:00
lilia
baa55c9018 Refactor for less model duplication 2015-08-27 12:38:51 -07:00
lilia
c4eac76032 Fix for new contact button bug 2015-08-26 22:33:00 -07:00
lilia
a5a1dad03c Redelegate events for new contact view
And rename for consistency

// FREEBIE
2015-08-26 17:52:44 -07:00