This allows for swiping left/right to read other posts by using
a ViewPager.
This hasn't been done as a separate activity, but with
fragments, so both can share the `BlogPersistentData` without
needing to reload it.
Closes#428
This does not yet support multiple identities. It just shows blogs
created by the first identity, but can easily be adapted for
multi-identity support.
Closes#410
Clicking the plus in the toolbar open the `CreateBlogActivity` which
allows the user to create a new blog. Only the first identity is
considered, but support for more identities can be easily added later.
The actual list of blogs in the My Blogs tab will be done in the next
commit.
Adds badges to the forum list that indicate unread posts
This MR adds badges to the forum list that indicate unread posts. It does so by extending the compound view `TextAvatarView` and provides convenient setters that take care of the required UI changes. The new badge can also be used to indicate a problem with the forum.

I decided not to check if the forum is shared from someone or with someone and indicate a problem in this case, because this requires iterating two times over all contacts and their group metadata for each forum. If someone considers it important to check for this information, we can create a ticket for doing this within the forum and not in the forum list.
See merge request !207
This replaces the custom layouts in the navigation drawer with a
`NavigationView` and adds a menu entry for Blogs.
A Main Blogs fragment is added that holds a `TabLayout` and a
`ViewPager`. Five tabs are already added, but they just have a single
placeholder fragment that is to be replaced by the actual fragments.
Closes#409
It does so by extending the compound view `TextAvatarView` and provides
convienient setters that take care of the required UI changes.
The new badge can also be used to indicate a problem with the forum.
Closes#408
The new activity shows who you are sharing a forum with and who shares a
forum with you. It is accessible from the overflow menu when in a forum.
Closes#398
Forum Sharing Client UI
This changes `ShareForumActivity` to use two fragments to facilitate
forum sharing with the new Forum Sharing Client backend.
The `ContactSelectorFragment` allows the user to select a
number of contacts. If there is an ongoing sharing session or the forum
is already shared with the contact, it is disabled in the list. If there
is at least one contact selected, a button appears in the toolbar that
brings the user to the `ShareForumMessageFragment` where the user can
write an optional message to be send along with the invitation.
After sending an invitation, the user is brought back to the forum that
she shared and there is a snackbar showing up briefly to indicate the
successful invitation.
The invitation is shown along with the message within the private
conversation of each contact. The person who shares the forum also sees
the invitation and the message as outgoing messages that also display
the current status of the messages.
A notification is shown like for other private messages as well.
Please note that this commit does not include a way for users to respond
to invitations. This is in MR !172. Both MRs are based on the new backend in !170.


See merge request !171
This changes `ShareForumActivity` to use two fragments to facilitate
forum sharing with the new Forum Sharing Client backend.
The `ContactSelectorFragment` allows the user to select a
number of contacts. If there is an ongoing sharing session or the forum
is already shared with the contact, it is disabled in the list. If there
is at least one contact selected, a button appears in the toolbar that
brings the user to the `ShareForumMessageFragment` where the user can
write an optional message to be send along with the invitation.
After sending an invitation, the user is brought back to the forum that
she shared and there is a snackbar showing up briefly to indicate the
successful invitation.
The invitation is shown along with the message within the private
conversation of each contact. The person who shares the forum also sees
the invitation and the message as outgoing messages that also display
the current status of the messages.
A notification is shown like for other private messages as well.
Please note that this commit does not include a way for users to respond
to invitations.
Turn list of available forums into a BriarRecyclerView with XML layout.
Allow to respond to forum invitations from the list of available forums.
The user can either accept or decline an invitation.
New List of Forums
The adapter of the `ForumListFragment` has been changed into a
`BriarRecyclerView` and all its code has been adapted and simplified
accordingly.
All UI of the forum list is now defined in XML layouts. This enabled me to move the snackbar into onCreate().
Before:

After:

See merge request !175
The adapter of the `ForumListFragment` has been changed into a
`BriarRecyclerView` and all its code has been adapted and simplified
accordingly.
All UI of the forum list is now defined in XML layouts.
Set ongoing notification to minimum priority
Setting the priority of the ongoing notification to PRIORITY_MIN prevents it from being shown in the status bar on Android 4.1 and later. The service still runs in the foreground.
Thanks to @str4d for finding the solution. Closes#154.
See merge request !169
Methods for creating, adding and removing forums have been moved to the
`ForumManager`. In order to still handle removing forums properly, a
`RemoveForumHook` has been introduced.
Methods for sharing forums with all current and future contacts have
been removed along with the localGroup where this information was saved.
The `ShareForumActivity` now has the proper label.
The `SessionId` and the `ProtocolEngine` have been moved to the
`clients` package.
This addresses part of #322 and part of what has been discussed in #320.
This commit is a small change that replaces the custom UI elements in
the forum list with a Snackbar and an Toolbar menu.
Addresses one part (2b) of #305
Move create forum post and share forum buttons in action bar
According to the designs in #305, the 'create forum post' and 'share forum' buttons will go into the in action bar.
In the spirit of keeping MRs small and to avoid conflicts with #306, I did this first and independently of future work.
This also introduces constants for the `GROUP_ID`, `FORUM_NAME` and `MIN_TIMESTAMP` as they were used for the two buttons.
Closes#313
See merge request !150
Show relevant introduction decline responses in the conversation
* If the user has already declined, we don't show that the other
introducee has declined as well. The backend doesn't have that information, so
this is compatible with the principle of showing what we know.
* If the user has already accepted or hasn't yet responded, we now show the
decline response in the private conversation with the introducer. If
the user hasn't yet responded, we hide the accept/decline buttons
in the introduction request message.
Please note that I do not have three devices at the moment to test this MR in its entirety in practice. I created another test which is hopefully sufficient to ensure that the modifications are correct.
Closes#295
See merge request !149
* If the user has already declined, we don't show that the other
introducee has declined as well. The backend doesn't have that information, so
this is compatible with the principle of showing what we know.
* If the user has already accepted or hasn't yet responded, we show the
decline response in the private conversation with the introducer. If
the user hasn't yet responded, we hide the accept/decline buttons
in the introduction request message.
Messages an introducee receives in a `FINISHED` state are now being
ignored and deleted.
Closes#295
* force decline when two of our own identities are introduced to each
other
* throw away introduction requests to the same identity
(impossible to trigger from UI)
Closes#284
When devices' clocks are out of sync, it is possible that a response is
shown before the request. This commit makes sure that the timestamp of
responses is always later than the last message in the conversation.
Some wording could be misunderstood to thing introductions were
successful even though they were not. That has been clarified.
A new database transaction was created when getting contacts and local
transport properties. This has been changed to re-use the existing
transaction.
Also addresses minor issues found in review.
@color/briar_text_primary is used in a lot of places other than the settings screen - if we want to use grey text in the settings screen we'll need to find another way.
Also fixed some misspelled resource names and included the colours from the Briar palette in color.xml.