Commit Graph

2891 Commits

Author SHA1 Message Date
Torsten Grote 65b47bb5d2 Refactor Forum Controller, so it can be used by private groups 2016-10-19 10:42:59 -02:00
Torsten Grote 9ce95d6de7 Refactor Forum Activity and adapters to be re-used for private groups 2016-10-19 10:42:59 -02:00
akwizgran 5674ee2d88 Converted group list controller to constructor injection. 2016-10-12 17:28:44 +01:00
akwizgran 8637faf858 Merge branch '704-constructor-injection' into 'master'
Use constructor injection for controllers

Also made some listeners volatile.

This is part of #704 - if I don't find any other classes that need constructor injection I'll close the ticket.

See merge request !351
2016-10-12 16:02:53 +00:00
akwizgran 2b91631ba5 Use constructor injection for controllers.
Also made some listeners volatile.
2016-10-11 12:31:21 +01:00
akwizgran b327122255 Merge branch '660-implement-ux-for-the-list-of-private-groups' into 'master'
Private Group List UI

This MR implements the UI for the list of private groups.

It reacts to three types of events to refresh the displayed data:
* new group message received
* private group added
* private group removed

Missing from final implementation:
* entering groups
* adding new groups
* reacting to a future group dissolved event
* actually removing a dissolved group

![device-2016-09-29-180741](/uploads/666f04e8c9e2c81bdfe7f5648c14e71d/device-2016-09-29-180741.png)
![device-2016-10-03-141200](/uploads/5d0a54ea5a31d64404591c03ccf1e3b6/device-2016-10-03-141200.png)
![groups](/uploads/3eba757e21837739a129aab15100c06a/groups.gif)

Closes #660

See merge request !335
2016-10-11 10:22:26 +00:00
Torsten Grote 154e02723f Always show the keyboard when asked for it
and maintain keyboard state when hiding view.
2016-10-10 13:53:53 -03:00
Torsten Grote b09e30a95f Private Group List 2016-10-10 13:48:34 -03:00
akwizgran cb983f02c2 Always check whether context has been destroyed. 2016-10-10 15:54:08 +01:00
akwizgran f1730aa7d9 Merge branch '696-npe-key-agreement-task' into 'master'
Fix NPE when stopping KeyAgreementTask, improve thread safety

This branch fixes #696 and improves the thread safety of the camera code, mostly by adding @UiThread annotations and occasionally by moving stuff onto the UI thread that might have happened on other threads before.

Closes #696

See merge request !345
2016-10-10 14:46:25 +00:00
Torsten Grote 7f2db71160 Address review comments 2016-10-10 10:46:30 -03:00
Torsten Grote 784561144a Use new GroupCount to display Forum List
Fixes #531, #532
2016-10-10 08:00:17 -03:00
Torsten Grote 70d39d03bc Use group metadata from ConversationManager for showing contact lists
Fixes #373
2016-10-10 08:00:17 -03:00
Torsten Grote 457c30f3f2 Add GroupId to conversation items 2016-10-10 08:00:15 -03:00
Torsten Grote b2fa039474 Refactor existing adapters into a generic superclass
This commit also moves various blog classes into their own packages and
makes the required visibility changes.
2016-10-06 11:30:10 -03:00
akwizgran 86fbb89637 Make body cache thread-safe, reduce visibility of classes. 2016-10-06 14:41:55 +01:00
akwizgran 543304973e Fixed an NPE, improved thread safety of camera code. 2016-10-06 11:53:07 +01:00
akwizgran fc38738428 Merge branch '598-remove-unused-code' into 'master'
Remove unused UI code and layouts

If we ever need this code, it will be in the git history.

Closes #598

See merge request !342
2016-10-06 08:55:33 +00:00
akwizgran 604542c19b Remove unused UI code and layouts. 2016-10-05 17:09:16 +01:00
Torsten Grote a727a0817e Store message count, unread count and timestamp of latest message
in group metadata to be able to speed up group listings.

Closes #584, #586, #585
2016-10-05 12:34:37 -03:00
Torsten Grote 3fa84ec7a8 Merge branch '680-release-camera-surface' into 'master'
Release camera surface to work around Android bug #54285

Closes #680

See merge request !340
2016-10-05 14:41:19 +00:00
Torsten Grote e5f5511112 Merge branch 'identicon-cleanup' into 'master'
Clean up identicon code, remove unused classes

I noticed some debug-level logging coming from the identicon code, went in there to remove it, and realised half the code was unused, so I removed that too.

No functional changes except that the logging is gone and the opacity is now OPAQUE rather than UNKNOWN, which wasn't valid in this context.

See merge request !339
2016-10-05 14:38:17 +00:00
akwizgran 16ecb2ce8d Release surface to work around Android bug #54285. 2016-10-05 14:47:23 +01:00
akwizgran c49c888f9f Merge branch '644-missing-header' into 'master'
Remove loading callbacks from fragment listener

Now fragments are responsible for their own Progress bars.

Closes #642

See merge request !316
2016-10-05 13:34:09 +00:00
Ernir Erlingsson 6b3db67ef5 removed fragment progress callback and fixed missing header 2016-10-05 14:21:14 +02:00
akwizgran 293c06fd61 Merge branch '92-emoticons' into 'master'
Emoji Support for all user input

All text that can be generated by users will show emoji from the shipped sprites by using the `EmojiTextView` instead of the normal `TextView`.

For all messages and posts, the custom emoji keyboard is now available as well. For this, a new `LargeTextInputView` has been introduced that is a sub-class of `TextInputView`. In order for the emoticon keyboard to work properly the existing views had to be modified heavily, sometimes resulting in new behavior such as scroll views now being above the fixed input field. Actual testing on a device (preferably with a tiny screen) is recommended to make sure this still works as expected. Screenshots will be included at the end of this post.

This MR also disables menu actions rather than hiding them and it includes a fix for a regression that was not showing the keyboard automatically in forums.

![device-2016-09-28-104914](/uploads/8ce9c8f61b32dc5a46b89a3a2cf1e6a4/device-2016-09-28-104914.png)
![device-2016-09-28-105026](/uploads/96ef9c40547c7a44fbc4517c87637a7e/device-2016-09-28-105026.png)
![device-2016-09-28-105041](/uploads/a0d1ed23ccb66e8bf9541737407142e3/device-2016-09-28-105041.png)
![device-2016-09-28-105440](/uploads/fb76ed2adc87600cfb0fc33c3962d4a6/device-2016-09-28-105440.png)
![device-2016-09-28-105515](/uploads/51f845d697cee3df38d1b9eef3c0ddfc/device-2016-09-28-105515.png)

Closes #92

See merge request !329
2016-10-05 11:01:12 +00:00
Torsten Grote 0b0cae06ae Don't show introduction onboarding again no matter how dismissed 2016-10-04 14:51:37 -03:00
Torsten Grote f8e0441de8 Emoji Support for all user input
All text that can be generated by users will show emoji from the
shipped sprites.

For all messages and posts, the custom emoji keyboard is now available.

This also disables menu actions rather than hiding them and thus
closes #677

Included is a fix for a regression that was not showing the keyboard
automatically in forums and thus
closes #676
2016-10-04 14:12:17 -03:00
akwizgran 42056720fa Check length of text after spanning. #685 2016-09-29 15:06:50 +01:00
akwizgran a30de6309d Removed translated strings that were causing lint errors.
The app _name string is marked as non-translatable and the new_identity_item string no longer exists.
2016-09-29 12:47:29 +01:00
akwizgran d112b42d20 Fixed obsolete ID in layout. 2016-09-29 12:45:56 +01:00
akwizgran fd6719301a Merge branch '556-thread-safety-blocking-issues' into 'master'
Forum controller thread safety and tree safety

This branch solves the concurrent forum issues by code restructure and refactoring.

Closes #556 
Closes #552 

See merge request !262
2016-09-29 09:30:51 +00:00
Ernir Erlingsson 92f2e7b0fc merge with master and fixes after comments 2016-09-29 01:30:13 +02:00
akwizgran ee98900613 Merge branch '644-missing-header-only' into 'master'
Remove toolbar animation to fix the missing toolbar on first start

Closes #644

See merge request !331
2016-09-28 17:03:55 +00:00
akwizgran 747553f577 Cleaned up identicon code, removed unused classes. 2016-09-28 17:34:12 +01:00
Torsten Grote 8a4c162bba Remove toolbar animation to fix the missing toolbar on first start 2016-09-28 13:33:09 -03:00
Torsten Grote 7a0db798d1 bump expiry date and update translations 2016-09-28 11:56:55 -03:00
Torsten Grote 7e6a522eee Merge branch '346-camera-parameters' into 'master'
Try harder to find suitable camera parameters

This branch fixes QR code scanning on the Galaxy Nexus running Cyanogen Mod 12.1 (Android 5.1.1), without breaking QR code scanning on any of the other test devices.

The problem on the Galaxy Nexus was that the selected scene mode was overriding the selected focus mode, so we asked for continuous picture mode but got macro mode. Macro mode requires startAutoFocus() to be called, but we weren't calling it because we'd asked for continuous picture mode.

The fix for that problem is to query the focus mode after applying the parameters and call startAutoFocus() based on the actual mode rather than the requested mode.

But then I discovered another problem: barcode scene mode was setting the flash to auto, so in low light the flash was turning on and off while trying to scan QR codes. That might work well for printed QR codes, but it's terrible when scanning from a screen.

The fix for the new problem is to select barcode scene mode, then try to disable the flash, and if that fails, reset the scene mode. Then we pick the best available video stabilisation, focus mode and preview size.

On the Galaxy Nexus with CM 12.1, that means we use continuous picture mode instead of barcode scene mode, which works fine. All the other test devices pick the same settings as before.

See merge request !321
2016-09-28 14:40:56 +00:00
akwizgran 33795e7046 Use compareAndSet() instead of locking. 2016-09-27 23:02:54 +02:00
Ernir Erlingsson 2d59b9095c Fixing concurrency issues and refactoring code 2016-09-27 23:02:44 +02:00
Torsten Grote 8fb820c967 Merge branch 'check-if-listfiles-returns-null' into 'master'
Check whether File#listFiles() returns null

The docs say this can happen if there's an I/O error. Also fixed a throw-in-finally-block warning and renamed an IoUtils method to make its contract clearer.

See merge request !328
2016-09-27 16:17:09 +00:00
akwizgran 53d0b8b21e Check whether File#listFiles() returns null.
The docs say this can happen for a directory if there's an I/O error.
2016-09-27 15:52:57 +01:00
akwizgran d389f79a48 Merge branch '346-remove-base32-todos' into 'master'
Remove base32 TODOs, fix a potential NPE

I thought we'd be able to get higher data density in QR codes by using base32 instead of base64, allowing the QR code to use alphanumeric mode instead of byte mode. But I tried it, and although the QR code does use alphanumeric mode, it comes out at exactly the same size (see the 346-use-base32-for-qr-codes branch). So this MR removes the TODOs and fixes a potential NPE I spotted while working on the other branch.

See merge request !327
2016-09-27 14:19:45 +00:00
akwizgran b278c7d9cb Remove base32 TODOs - base64 is just as good. 2016-09-27 13:31:07 +01:00
Torsten Grote a85043efb5 Merge branch 'recreate-cache-dir' into 'master'
Recreate cache directory after deleting app data

This fixes a warning on the Moto G:
```
E/libEGL: error creating cache file /data/data/org.briarproject/cache/com.android.opengl.shaders_cache: No such file or directory (2)
```

@grote might possibly be related to hardware rendering issues.

See merge request !326
2016-09-27 12:07:43 +00:00
akwizgran 133722dd2c Code cleanup. 2016-09-27 11:51:24 +01:00
akwizgran 9e3db12ea2 Recreate the cache dir after deleting app data. 2016-09-27 11:44:14 +01:00
Torsten Grote 401abf2c0c Add first onboarding screen
When the user enters a private conversation after adding her second
contact, an onboarding screen will be shown highlighting the possibility
of introducing the contacts to each other.
2016-09-26 10:42:20 -03:00
akwizgran a4d08f4cf1 Try harder to find suitable camera parameters. #346 2016-09-26 12:14:23 +01:00
akwizgran c917110e6a Emoji: minor bug fixes, code cleanup, logging, visibility, 2016-09-23 17:18:21 +01:00