Commit Graph

1950 Commits

Author SHA1 Message Date
akwizgran
e979f17e45 Execute test tasks in a deterministic order. 2016-02-17 17:24:43 +00:00
akwizgran
42c00fb86e Merge branch 'client-transactions' into 'master'
Transactions for clients

This patch moves transactions out of the database component, allowing clients to perform multiple database calls in a single transaction. This should improve efficiency and reliability, at the cost of increased boilerplate for database calls.

Operations that allow hooks, such as adding and removing contacts, pass their transactions to their hooks. This ensures the whole operation is atomic and isolated, so StorageStatus is no longer needed, hooks don't need to be idempotent, and locks can be removed from clients that were using them for isolation.

This merge request is marked WIP because it will conflict with !74.

See merge request !101
2016-02-17 17:24:18 +00:00
akwizgran
00e59613c0 Call validation hooks after storing message & metadata. 2016-02-17 16:51:44 +00:00
akwizgran
f43f79eb5c Merge branch 'identicon-contrast' into 'master'
Increase contrast between identicons and background

Identicons currently have a dark or light background depending on the V component of the foreground colour. But V isn't a great measure of brightness - cyan looks much brighter than blue with the same V, for example. This leads to some identicons having low contrast between the foreground and background.

This patch scales the R, G and B components of the foreground colour to 3/4 of the full range and sets the background to white, so there's always good contrast between the foreground and background. The patch also adds a 1dp outline around identicons and adds some padding to the identity selection dropdown.

Before:
![device-2016-02-10-150200](/uploads/2456ff047d4d33b4537f3489c9018679/device-2016-02-10-150200.png)

After:
![device-2016-02-10-154634](/uploads/758c71e3c160e0f9fc50a507323daa7f/device-2016-02-10-154634.png)


See merge request !100
2016-02-16 10:36:24 +00:00
akwizgran
0a7823e7f5 Changed background colour to FAFAFA.
Psycho killer, qu'est-ce que c'est?
2016-02-16 10:31:57 +00:00
akwizgran
b50dce1c8d Removed an unused method. 2016-02-16 10:25:32 +00:00
akwizgran
9f8baab60f Code cleanup. 2016-02-11 16:26:23 +00:00
akwizgran
074892b677 StorageStatus is no longer needed. 2016-02-11 16:26:23 +00:00
akwizgran
6505db58e6 Contact and identity managers don't need to be services. 2016-02-11 16:26:22 +00:00
akwizgran
146dac056d Broadcast events after committing transactions. 2016-02-11 16:26:22 +00:00
akwizgran
de8cc50fb4 Moved transactions out of database component. 2016-02-11 16:26:19 +00:00
akwizgran
ef2b2b9710 Removed unneeded visibility methods. 2016-02-11 16:21:53 +00:00
akwizgran
3fa1bbe33e Expose transactions through DatabaseComponent interface. 2016-02-11 16:21:53 +00:00
akwizgran
2460e1feb0 Moved author classes to identity package. 2016-02-11 16:21:52 +00:00
akwizgran
675ce4bfef Removed direct calls to DB's contact/identity methods. 2016-02-11 16:21:52 +00:00
akwizgran
623707af0f Removed database locking. 2016-02-11 16:21:52 +00:00
akwizgran
0c392e8b78 Replaced PacketWriter methods with a constant. 2016-02-11 16:21:26 +00:00
akwizgran
747d9678fe Removed unused PrivateConversation class. 2016-02-11 15:05:14 +00:00
akwizgran
29b67d2e03 Merge branch 'forum-sharing-hooks' into 'master'
Use message validation hook in forum sharing client

This patch moves the forum sharing client's update handling from an event handler to a hook to ensure the update is handled even if it arrives just before shutdown.

See merge request !99
2016-02-11 12:44:23 +00:00
Torsten Grote
00beb654af Merge branch '238-delete-messages' into 'master'
Allow messages to be deleted.

Fixes #238.

See merge request !98
2016-02-10 17:59:45 +00:00
akwizgran
3f356b999a Increase contrast between identicon and background. 2016-02-10 15:48:35 +00:00
akwizgran
bb11ebd5bd Use message validation hook in forum sharing client. 2016-02-10 14:47:25 +00:00
akwizgran
43558ca089 Merge branch 'remove-subscription-updates' into 'master'
Move subscription updates to the client layer

This is part of #112.

I created a separate client for sharing lists of available forums, as that turned out to be cleaner than using the forum client to manage two kinds of group. The same will presumably be true for the blog and group messaging clients when we come to implement them.

The UX for sharing forums is due to change - instead of sharing a list of available forums with no explanation, we'll explicitly invite contacts to join forums. When that happens, the ForumSharingManager will change but the ForumManager should remain pretty much the same.

When hooks for message status changes have been implemented, the ForumSharingManager will use those instead of listening for MessageValidatedEvents.

When client layer transactions have been implemented, the ForumManager, ForumSharingManager and TransportPropertyManager will use them instead of locks to ensure atomicity and isolation.

See merge request !94
2016-02-10 14:02:15 +00:00
akwizgran
a91d500263 Added method for deleting metadata. 2016-02-10 14:01:55 +00:00
akwizgran
00275e260f Allow messages to be deleted. 2016-02-10 14:01:55 +00:00
akwizgran
525c323c1c Fixed race between loadHeaders() and loadAvailable(). 2016-02-10 10:47:30 +00:00
akwizgran
6e1ec41d21 Handle events that affect list of available forums. 2016-02-10 10:47:30 +00:00
akwizgran
18db17bf5b Moved subscription updates to the client layer. 2016-02-10 10:47:30 +00:00
akwizgran
54272c8836 MessageFactory never throws IOException. 2016-02-10 10:47:29 +00:00
akwizgran
fd99dd7573 Updated a unit test for storing settings. 2016-02-10 10:47:29 +00:00
akwizgran
225d0ebeef DB interface cleanup, removed unnecessary exceptions. 2016-02-10 10:47:29 +00:00
akwizgran
3837efca6b Updated group-related events and exceptions. 2016-02-10 10:47:26 +00:00
akwizgran
9d537dce00 Removed contact subscriptions from database. 2016-02-10 10:46:41 +00:00
akwizgran
9fdc510843 Removed SubscriptionUpdate and SubscriptionAck. 2016-02-10 10:46:41 +00:00
akwizgran
e85b2161e4 Merge branch '241-notification-privacy' into 'master'
Set category and visibility of notifications. #241

Turns out we can't fully control the visibility of notifications on the lock screen - we can mark them as sensitive, and then a couple of global options determine whether they're visible.

See merge request !96
2016-02-10 10:34:37 +00:00
akwizgran
299a541dee Set category and visibility of notifications. #241 2016-02-10 10:31:31 +00:00
Torsten Grote
d0ab16de2d Merge branch 'merge-settings' into 'master'
Fix a couple of bugs in settings

1. SettingsFragment wasn't receiving events because it extended BaseFragment rather than BaseEventFragment
2. Removed broken logic for deciding whether to broadcast a SettingsUpdatedEvent
3. Added the namespace to SettingsUpdatedEvent so listeners can decide whether to react

See merge request !97
2016-02-09 16:55:42 +00:00
Torsten Grote
5dab0c0dcb Merge branch '242-anonymous-forum-crash' into 'master'
Fix crashes, rotation issues with forum posts. #242, #243



See merge request !93
2016-02-09 16:51:45 +00:00
Torsten Grote
b1cb39e88c Merge branch 'validation-hooks' into 'master'
Run hooks when messages are validated

This patch allows clients to respond to messages reliably. Like the hooks for adding/removing contacts/identities, these hooks may be run more than once - that will be fixed when we have client-layer transactions.

See merge request !95
2016-02-09 16:48:49 +00:00
akwizgran
ead4aac56c No alpha for white icons on dark backgrounds. 2016-02-08 16:48:06 +00:00
akwizgran
3d948ed461 Don't broadcast an event unless settings have changed. 2016-02-08 11:17:45 +00:00
akwizgran
b63961727d Removed unused injection. 2016-02-05 18:48:42 +00:00
akwizgran
408776f5d3 Use settings manager. 2016-02-05 18:46:18 +00:00
akwizgran
bdc17dfc8e Fixed a couple of bugs in settings. 2016-02-05 18:22:37 +00:00
akwizgran
bb46f2983f Merge branch 'giant-indentation-patch' into 'master'
Indent everything with tabs

Probably the most exciting MR you'll ever read. Bonus points if you spot the NSA backdoor hidden among the whitespace changes.

See merge request !90
2016-02-05 14:57:29 +00:00
akwizgran
4decdbf3e6 Giant whitespace-only indentation patch. 2016-02-05 14:54:17 +00:00
akwizgran
741571bdb8 Run hooks when messages are validated. 2016-02-05 12:08:48 +00:00
akwizgran
d75c51ec74 Invitation timeout is too short for some devices. 2016-02-04 17:52:45 +00:00
akwizgran
26fecba77f Don't use ReferenceManager for forum post author. #243 2016-02-03 21:25:34 +00:00
akwizgran
78bc198b33 Don't throw exception is forum post is anonymous. #242 2016-02-03 20:56:17 +00:00