- Nov 09, 2016
-
-
Torsten Grote authored
This also adds two integration tests and improves some small details
-
Torsten Grote authored
Make the feed pager respond to events, block notifications This branch fixes a bug I found while working on #705: FeedPostPagerFragment doesn't start or stop the controller, so it doesn't load newly received posts or block notifications, unlike FeedFragment. See merge request !398
-
akwizgran authored
-
- Nov 08, 2016
-
-
akwizgran authored
Encode transport properties more compactly in QR codes The [original BQP spec](https://code.briarproject.org/akwizgran/briar/wikis/BQP) described a compact encoding for transport properties, with the goal of making the QR code as small as possible. At some point during the implementation, I asked @str4d to use TransportIds and TransportProperties instead, as described in the [current spec](https://code.briarproject.org/akwizgran/briar-spec/blob/master/protocols/BQP.md). That was a mistake. Using the original format reduces the payload from 60 to 34 bytes (43% smaller) for Bluetooth only, and from 96 to 49 bytes (49% smaller) for Bluetooth and LAN. This makes it easier to scan codes from low-resolution screens using fixed-focus and/or low-resolution cameras. Using this branch I can exchange codes between the Sony Xperia Tipo (320x480 screen, fixed focus, 640x480 preview size) and the Huawei Ascend Y300 (480x800 screen, infinity focus, 1280x720 preview size). This also removes an obstacle to implementing #558, as TransportIds are no longer included in QR codes. Closes #346. See merge request !394
-
akwizgran authored
Private group invitation protocol This branch implements the private group invitation protocol. The implementation is something of an experiment with a new way of writing client protocols. We start with a role enum that lists the roles in the protocol, and a state enum for each role, which lists the states in the role's state machine. Then there's a session class, parameterised by the state class and therefore by the role, which represents the session information held by that role. Then there's an engine interface, parameterised by the session class and therefore by the role, which encapsulates the protocol logic for the role. Most of this stuff can be created pretty mechanically from the state machine diagrams. The engine interface has a method for each type of message and each local action. I started out with one method for all messages and another for all local actions, but that turned out to be a bad design - the information about what kind of message was being handled was lost when the message was passed to the engine, and had to be recovered using an instanceof ladder. Each engine method takes a message or an action and a session, and returns an updated session. A transaction is passed in so the engine can send messages, attach events, and do any other work it needs to do (such as changing the visibility of groups, in the case of this protocol). This removes the need to run tasks outside the engine, so the protocol logic is better encapsulated inside the engine. Parsing and encoding of messages and sessions is separated from protocol logic. MessageParser, MessageEncoder and the validator are the only classes that know how messages and their metadata are formatted, and likewise SessionParser and SessionEncoder are the only classes that know how sessions are formatted. The metadata keys are declared in a package-private interface. It's common knowledge that I never make mistakes, so to keep things interesting I've hidden 114 deliberate mistakes in this code. See how many you can spot! Needs tests before #709 is closed. See merge request !382
-
Torsten Grote authored
Preliminaries for private group invitation protocol As promised, here's the preliminary stuff for #709 as a separate MR. See merge request !395
-
akwizgran authored
-
akwizgran authored
-
akwizgran authored
-
akwizgran authored
-
akwizgran authored
-
akwizgran authored
-
akwizgran authored
Use namespaced strings for client IDs Closes #557 See merge request !393
-
akwizgran authored
Mark private messages read properly Depends on !386. This branch uses the same approach as forums to mark messages read, i.e. each message is marked read when it becomes visible, rather than marking all messages read in a batch when the activity finishes. This fixes two problems: messages not being marked read when isFinishing() is false, for example when leaving the activity via the home button, and a race condition between updating and loading the group count when leaving the activity, resulting in a stale unread message count in the contact list. Closes #196. See merge request !388
-
Torsten Grote authored
Broadcast GroupMessageAddedEvent for the UI to update when received Closes #733 See merge request !390
-
Torsten Grote authored
-
akwizgran authored
Create GroupDissolvedEvent and react to it This MR also makes the private group list react to incoming group invitations (once they are implemented).   Closes #736, #737 See merge request !392
-
Torsten Grote authored
-
Torsten Grote authored
Also react to incoming group invitations
-
akwizgran authored
Show Notifications for Group Messages Closes #734 See merge request !391
-
akwizgran authored
Return to group after not inviting new members This MR also closes the keyboard when returning from the message fragment. Closes #735 See merge request !389
-
akwizgran authored
Fixed asynchronous Activity leaks in Fragments If a Fragment has been detached its `getActivity()` method will return null, providing numerous crash possibilities within the app. My approach to fixing this is to make Fragments use their own `runOnUiThreadUnlessDestroyed` method, which also checks if the Fragment has been detached before running the Runnable Closes #714 See merge request !387
-
akwizgran authored
-
- Nov 07, 2016
-
-
Ernir Erlingsson authored
-
akwizgran authored
-
Torsten Grote authored
-
Torsten Grote authored
Also close keyboard when returning from message fragment
-
Torsten Grote authored
Use contact ID rather than messaging group ID to identify conversation We originally used the private messaging group ID to identify the private conversation, but now that the conversation includes messages from multiple clients it's more appropriate to use the contact ID. This refactoring isn't urgent - I've had the branch lying around for a while, but I'm putting it up for review because #734 will touch some of the same code. See merge request !386
-
akwizgran authored
-
- Nov 04, 2016
-
-
akwizgran authored
Allow messages to be deleted in delivery hook Closes #643 See merge request !385
-
akwizgran authored
-
Torsten Grote authored
-
Torsten Grote authored
-
akwizgran authored
Add unit tests for KeyManagerImpl This also creates a `TransportKeyManager` interface and a factory for that to be able to test things separately. Closes #205 See merge request !380
-
Torsten Grote authored
-
Torsten Grote authored
interface and a factory for that.
-
akwizgran authored
Let only the creator invite new members to private groups A little bug I noticed when reviewing the implementation of the invitation protocol. See merge request !383
-
akwizgran authored
Remove new member announcement and add signature to join message See merge request !384
-
akwizgran authored
-
- Nov 03, 2016
-
-
Torsten Grote authored
-