Commit graph

123 commits

Author SHA1 Message Date
lilia
0bd5f3e3c2 If for some reason a group has no name, provide a default 2014-10-17 13:25:39 -07:00
lilia
0036e4ef74 Store group ids as strings 2014-10-17 13:11:08 -07:00
lilia
143254cec8 Group ids are stored in groupId 2014-10-16 17:50:36 -07:00
lilia
4f21bbd21f Use textsecure.messaging to create groups
Not textsecure.storage. Sigh. Also accomodate the fact that
the group id is not returned directly, but rather at the end
of a promise chain.
2014-10-16 14:15:13 -07:00
lilia
fa4c385598 Make initial timestamp on a thread match the 1st message 2014-10-16 14:13:03 -07:00
lilia
f14cd2eed1 Don't validate presence of thread id
It's undefined until the first save();
2014-10-16 14:11:51 -07:00
lilia
6db3eeb52e Convert incoming timestamps into numbers
Fixes #59

protip: don't use << for anything over 2^32. The operands of all bitwise
operators are converted to signed 32-bit integers
2014-10-16 12:32:02 -07:00
lilia
dc41ebf701 Small frontend fixes for the new group view 2014-10-14 15:47:51 -07:00
lilia
c034ac8267 Refactor components for the main content section
Each conversation views now manages its own separate elements
rather than all binding to a shared #conversation element, and
similarly for message composition ui.

Also includes the beginnings of group creation UI (not working yet),
featuring bootstrap-tagsinput field for entering group recipients
2014-08-25 18:54:55 -07:00
lilia
dc957415c2 Cull dead code
Most of this no longer needed because of templating and list views.
2014-07-27 11:35:49 -10:00
lilia
6d5e32bca8 Don't make a new collection on every call to thread.messages() 2014-07-27 11:35:48 -10:00
lilia
06ff6c3087 Let thread collection double as contacts db
When a thread is 'destroyed' from the UI we delete its messages and mark
the thread as inactive, (in other words, keep it around as contact info).
Additionally, we only load active threads when initializing the UI, and
reactivate threads when new messages are added to them.

Conflicts:
	js/models/messages.js
	js/models/threads.js
	js/views/conversations/show.js
2014-07-27 11:35:48 -10:00
lilia
c6b79236d9 Fix whitespace, lint 2014-07-27 11:35:48 -10:00
lilia
ebf1b3352f Use separate message collections for each thread to facilitate lookup and lazy loading 2014-07-27 11:35:48 -10:00
lilia
ec900e0ea4 Fix double display of outgoing messages 2014-06-03 20:05:41 -07:00
lilia
a09a4776d3 Fix incoming message display/storage
There were a few problems.

1. The message event was being triggered in background, not popup
2. The initial message/thread fetches from localStorage were mis-ordered
3. The timestamp wasn't being extracted from the right place
4. #3 caused messages to fail validation and not be saved

1-3 are fixed. To address 4 I switched validate() to log a warning
instead of preventing save.
2014-06-03 19:57:03 -07:00
Matt Corallo
d0fd3e94d8 sendMessage refactor, initial group stuff (breaks message storage) 2014-06-03 15:28:30 -04:00
lilia
83508abab8 Thread model and UI improvements
Adds thread model/collection for managing conversation-level state, such
as unreadCounts, group membership, thread order, etc... plus various UI
improvements enabled by thread model, including an improved compose
flow, and thread-destroy button.

Adds Whisper.notify for presenting messages to the user in an orderly
fashion. Currently using a growl-style fade in/out effect.

Also some housekeeping:
Cut up views into separate files.
Partial fix for formatTimestamp.
Tweaked buttons and other styles.
2014-05-26 15:33:45 -07:00
Matt Corallo
9aae93fc99 textsecure.protos 2014-05-26 00:45:55 +02:00
Matt Corallo
ee2f43aba4 Fix, display (image) attachments 2014-05-19 03:07:01 -04:00
lilia
3bd559bbaa DRY up PushMessageContentProtobuf construction
Messages now know how to protobuf-ify themselves.
2014-05-18 14:33:18 -07:00
lilia
2601c3cc3a Rename some things to be a little more semantic
The 'sender' field actually holds the recipient for outgoing
messages. Rename that field to 'person', indicating the 2nd
party generically.

Also decouples the thread name from thread recipients at the
view layer, in preparation for group support.
2014-05-18 13:49:11 -07:00
lilia
b852e68290 Backbone message storage and views
Adds Backbone-based Whisper.Messages model/collection with local storage
extension. Saves sent and received messages in Whisper.Messages instead
of message map. This will assign a unique id to the message and save it
to localStorage.

Adds Backbone-based view to popup.html
  Automatically updates itself when new messages are saved to
  Whisper.Messages db from the background page.

Added some shiny new styles, and started splitting up css into multiple
files for sanity's sake.
2014-05-17 20:26:50 -07:00