Skip to content

Message threads #5067

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Jul 17, 2025
Merged

Message threads #5067

merged 32 commits into from
Jul 17, 2025

Conversation

mahibi
Copy link
Collaborator

@mahibi mahibi commented Jun 18, 2025

fix #3074

This PR is not complete and contains bugs but it will be merged to master for early testing in alpha channel.
There will be followup PRs for threads support.

🖼️ Screenshots

🏚️ Before 🏡 After
B A

🚧 TODO

  • adapt chatBlocks handling for threads
  • clear DB tables when migrating
  • add option to create a thread
  • add option to open a thread
  • threads overview
  • thread title incl. count of replies
  • add logic to only show "Reply in thread" OR "Open thread" in message context menu
  • show number of replies for each thread in overview
  • open context menu also when longclick on quoted message
  • scrolling in threads overview ok?
  • reply handling? normal vs thread..
    • write a message in thread = reply to thread
  • bug when posting in thread?
  • backpress logic
  • better error handling

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@mahibi mahibi added this to the 22.0.0 milestone Jun 18, 2025
@mahibi mahibi self-assigned this Jun 18, 2025
@mahibi mahibi added the 2. developing Work in progress label Jun 18, 2025
@mahibi mahibi force-pushed the feature/noid/messageThreads branch 2 times, most recently from 28963c5 to ee8c507 Compare June 27, 2025 12:02
@mahibi mahibi force-pushed the feature/noid/messageThreads branch 4 times, most recently from 3173350 to 0c6e406 Compare July 10, 2025 10:48
@mahibi mahibi force-pushed the feature/noid/messageThreads branch 4 times, most recently from c5e589d to b9dc206 Compare July 14, 2025 10:12
@mahibi mahibi modified the milestones: 21.2.0, 22.0.0 Jul 17, 2025
mahibi added 15 commits July 17, 2025 14:01
for now only added logic in IncomingTextMessageViewHolder.kt ...

- add thread button for quoted messages if thread of message != current thread
- open a new ChatActivity when clicked the button and pass threadId
- change the title
- add todos

for now, the parentId was taken instead of topmostParentId (which is not available yet)

Signed-off-by: Marcel Hibbe <[email protected]>
(cascade delete in migration fails for now)

Signed-off-by: Marcel Hibbe <[email protected]>
Foreign key constraints are not active during migration.
At least   db.execSQL("PRAGMA foreign_keys=ON;")  etc did not help.
Because of this it is not enough to just clear the Conversations table (to have cascade deletion in
other tables), but all related tables have to be cleared with SQL statement as well.

Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
show first and last message as thread and only the date

Signed-off-by: Marcel Hibbe <[email protected]>
mahibi added 13 commits July 17, 2025 14:03
Signed-off-by: Marcel Hibbe <[email protected]>
threadId was not set for temp message...

Signed-off-by: Marcel Hibbe <[email protected]>
i'm not yet sure about it and did not have a problem with it, but i guess this change makes sense to ensure temporary messages from a thread are not shown and remain in the main chat. This could theoretically happen when directly leaving a thread after sending a message?

Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
@nickvergessen
Copy link
Member

Has some conflicts, but otherwise this can be merged to get it into the testing alpha versions

@mahibi mahibi force-pushed the feature/noid/messageThreads branch from b9dc206 to 68a33ef Compare July 17, 2025 13:09
Signed-off-by: Marcel Hibbe <[email protected]>
Copy link
Contributor

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/5067-talk.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.

Copy link
Contributor

Codacy

Lint

TypemasterPR
Warnings9797
Errors00

SpotBugs

CategoryBaseNew
Bad practice66
Correctness1616
Dodgy code6161
Internationalization33
Malicious code vulnerability33
Performance44
Security11
Total9494

@mahibi mahibi marked this pull request as ready for review July 17, 2025 14:36
@mahibi mahibi merged commit e99235a into master Jul 17, 2025
18 of 19 checks passed
@mahibi mahibi deleted the feature/noid/messageThreads branch July 17, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Message threads
2 participants