Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Briar Desktop Briar Desktop
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 220
    • Issues 220
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • briarbriar
  • Briar DesktopBriar Desktop
  • Merge requests
  • !273

Share forums with contacts

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Mikolai Gütschow requested to merge 431-share-forum into main Dec 30, 2022
  • Overview 50
  • Commits 1
  • Pipelines 11
  • Changes 17

Looks like this:

image

It makes probably most sense to review the two commits individually: the first one contains major refactoring to separate PendingContactItem from (real) ContactItem so that we don't load pending contacts for forum sharing status and for the introduction drawer. The second one then adds the UI and logic for sharing forums.

There are still two bugs remaining:

  • There are different reasons a forum cannot be shared with a contact: 1. the contact's client does not support forums, 2. the forum is already shared with that contact or 3. an invitation to the forum was already sent to the contact (there cannot be more than one at a time, apparently). canBeShared() only returns a boolean, so it is difficult to tell (and inform the user) why the forum cannot be shared with a certain contact. I've covered cases 1 and 2, but not 3. Briar Android always shows "Already shared" if sharing is not possible and thus does not properly cover case 1. @akwizgran Is there currently any way of distinguishing between case 1 and 3, or should I consider adding a more informative canBeShared() method that returns an enum instead of a boolean? Also, are the mentioned three cases all of them, or did I miss some more?
  • For some reason, canBeShared() does not return true for contacts right from the beginning/start of the app, and it is most of the times necessary to switch to a different forum and back to be able to share a forum with a contact. I suspected this might have to do with the forum client not properly instantiated on the app start, so I added an eventlistener that should react on clientversionupdate-events, but that didn't help. This will probably need some more investigation.

Also, draft since based on !276 (merged)

Closes #431 (closed)

Edited Jan 12, 2023 by Mikolai Gütschow
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 431-share-forum