Commit graph

690 commits

Author SHA1 Message Date
lilia
061d57c95a Fix string vs number comparison
Fix bug in device storage causing duplicate device messages after a 410.
2015-06-04 16:48:34 -07:00
lilia
a9549e2e0f Fix 410 handling
We need to close the existing session with an old registrationId.
2015-06-04 16:48:10 -07:00
lilia
7d08e1132d Fix close session 2015-06-04 14:48:59 -07:00
lilia
f4a206b266 Scale and crop avatars to 256 square thumbnails.
Fixes #213 // FREEBIE
2015-06-04 14:46:16 -07:00
lilia
cdb7fcfbad Pass windows around to let file inputs work 2015-06-04 13:39:52 -07:00
lilia
3d1df790a5 Update the window title when a group title or contact name changes 2015-06-03 17:23:55 -07:00
lilia
d26c13b155 Add openInbox link to conversation menu. Fixes #246 2015-06-02 14:57:22 -07:00
lilia
9d688cb761 List views persist sroll offset by percentage
Fixes #188
2015-05-28 11:50:58 -07:00
lilia
590deef063 Decrease auto-scaling size
For better consistency with Android, autoscale images such that the
largest dimension is 1280. Related: #242
2015-05-27 16:53:04 -07:00
lilia
a66c879426 Update inbox after destroying a conversation
Fixes #247

// FREEBIE
2015-05-27 14:49:50 -07:00
lilia
3e73282a64 Fix key verification screen 2015-05-26 17:08:14 -07:00
lilia
e2eff893d4 Fix 'Delete messages'
Replaces window.confirm with generic promise-based confirmation dialog
functionality available to all views.

// FREEBIE
2015-05-26 16:56:05 -07:00
lilia
8a17953468 Display sent_at timestamps instead of received_at 2015-05-26 13:31:17 -07:00
lilia
3e39271220 Render messages light blue until finished sending // Fixes #219 2015-05-26 13:30:51 -07:00
lilia
405e67c758 Merge inbox and panel controllers
These collections should always be operating with the same model
instances, so let the inbox reset it self from the same in-memory
cache of conversation models used by the conversation windows.
2015-05-26 13:28:43 -07:00
lilia
53a9ab4834 Fix bugs with handling large image attachments
* Avoid infinite loop scaling too-big images
* Don't crash if no file is selected
* Fix file size toast

Fixes #242

// FREEBIE
2015-05-25 10:43:35 -07:00
lilia
585c82aee8 Fix the build 2015-05-24 16:29:11 -07:00
lilia
3eafefe18e Don't display notifications for open windows.
Just update and draw attention to them.

Fixes #238

// FREEBIE
2015-05-24 16:20:55 -07:00
lilia
d8f17f9631 Fixes #240
Delete files attached via chrome.fileSystem

// FREEBIE
2015-05-24 16:03:13 -07:00
lilia
9882190bde Wake up once a minute to check for messages
If all the application windows are closed (and not merely hidden), the
background page will go inactive and there's nothing we can do to stop
it. However, we can ask chrome to trigger an alarm once per minute,
which will spin up the background page and check for new messages.

This will effectively keep us alive as long as chrome has open windows
or is running in the background, subject to chrome settings'
Advanced -> System -> Continue running background apps
2015-05-22 17:26:56 -07:00
lilia
fa3e1ee94f Window ids should be strings
A warning is issued when a non-string window id was passed to
extension.windows.focus.
2015-05-22 17:23:18 -07:00
lilia
7bf1d41184 Render conversation titles 2015-05-22 16:54:59 -07:00
lilia
bc4d31cf72 Fix for inbox sometimes not reappearing
Apparently focusing an app window does not implicitly unhide it.

// FREEBIE
2015-05-22 12:36:14 -07:00
lilia
d0a529351c Fix sending messages with no attachments 2015-05-21 19:01:37 -07:00
lilia
a5e80e8a5a Really close conversation windows
Only the inbox should hide when closed.
2015-05-21 18:20:19 -07:00
lilia
5d3a2a4cc8 Fix file inputs
As a chrome app we are obligated to use the fileSystem api, and must do
so via the window in which we want to open the dialog.
2015-05-21 18:19:10 -07:00
lilia
39d11d8eb3 Apply custom chrome to conversation windows 2015-05-21 14:35:44 -07:00
lilia
95f8e3921c Keep inbox window open, but allow it to be hidden
As a chrome packaged app, we have to keep at least one window open in
order to maintain our websocket connection in the background page.

This change replaces the system window frame with custom buttons in the
inbox header, such that the 'close' button merely hides the window
rather than unloading it.

Fixes #237
FREEBIE
2015-05-21 13:08:43 -07:00
lilia
b83ce7a015 Delay conversation creation til post-decrypt 2015-05-20 17:22:03 -07:00
lilia
12eb553a3f Draw attention to windows on new messages 2015-05-20 17:22:03 -07:00
lilia
0b31823989 Wait for storage on launch 2015-05-20 14:24:44 -07:00
lilia
08878b3dc8 Update inbox after sending a message
Also change the event name to reflect how its being used, and stop
passing the message object around since it is not being used.

// FREEBIE
2015-05-20 13:04:16 -07:00
lilia
e9d7864f75 Set conversation type when creating from sync message
When a conversation is created as the result of a sync message, and it
is not a group, we need to set its type to private.

// FREEBIE
2015-05-20 12:58:48 -07:00
lilia
7e8b1319a5 Ignore sync contexts on messages not from ourselves
But process the rest of the message normally.
2015-05-20 12:42:13 -07:00
lilia
fdd2eb0d3e Make conversation windows taller 2015-05-20 11:49:53 -07:00
lilia
1b83932a29 Update open conversations on sync messages 2015-05-19 13:34:51 -07:00
lilia
090cc84452 Do not include destination on group sync messages 2015-05-18 14:40:27 -07:00
lilia
1ed0ef5bc3 Process group updates before sync delivery receipts
Because we need to know the group members to find early-arrival
receipts.
2015-05-18 14:23:09 -07:00
lilia
654373d743 Fix null conversationId on group sync messages 2015-05-18 14:08:19 -07:00
lilia
65a6068003 Fix for out-of-order message/receipt arrival
In a multi device world, it's possible to receive a receipt for a sync
message before the sync message actually arrives. In this case we need
to keep the receipt around and the process it when the message shows up.
2015-05-18 13:48:48 -07:00
lilia
c4fa2cb935 Fix sync message timestamps 2015-05-18 12:48:52 -07:00
lilia
d1bcafad65 Update libaxolotl 2015-05-15 16:30:22 -07:00
lilia
16e9f03d8f Check for registration when launched 2015-05-15 14:02:26 -07:00
lilia
f6a326577d Crash fixes for chromium
My current version of chromium inexplicably exposes a crippled version
of chrome.browserAction even though we are now a packaged app and should
not have that functionality exposed to us anymore. This results in some
errors to the tune of "property 'foo' of undefined".

It also doesn't support the innerBounds property for window creation,
only the older (deprecated) bounds property.
2015-05-15 12:54:31 -07:00
lilia
029c9754f0 Fix tests 2015-05-15 11:39:23 -07:00
lilia
5a7ab54ee6 Fix registration page
Also make it accessible by providing a mode argument to the install
function. Previously developers could just edit the url but we no longer
have the address bar as an app window, so now they must close the
default installer and run the following from the background page
console: `extension.install('standalone')`.

In the production build, this should result in an error since it is not
supported / the register page is not included there.
2015-05-15 11:39:23 -07:00
lilia
7afd0a02e8 Convert beforeunload listeners 2015-05-15 11:39:23 -07:00
lilia
002ff45312 Adapt window management to chrome app window api
Appify tabs, windows, browserAction

Port the extension.windows.focus function to new window api and
generalize its error handling in the case where the requested window
does not exist. An error will be passed to the callback.

Port extension.browserAction and rename it to the more generic
extension.onLaunched.

Use of the id option when opening a window ensures that attempting to
open a duplicate window merely focuses the existing window.

Finally, after registration, close the options window and open the
inbox.

Port extension.remove
2015-05-15 11:39:22 -07:00
lilia
ddbaf87741 Load notifications script from background page 2015-05-15 11:39:22 -07:00
lilia
f90f6328dd Don't resolve the background page til storage is ready 2015-05-15 11:39:22 -07:00