Skip to content
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

Threads P0 Release #4746

Merged
merged 144 commits into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
ab87937
Threads init commit
ariskotsomitopoulos Oct 20, 2021
cb63766
Add room avatar to threads activities
ariskotsomitopoulos Oct 21, 2021
a2a2315
Make room thread detail text composer visible
ariskotsomitopoulos Oct 21, 2021
cb0fefa
Add changelog file
ariskotsomitopoulos Nov 4, 2021
ecc9b59
Reply In Thread, create a new thread timeline
ariskotsomitopoulos Nov 8, 2021
8c53942
- Thread Summary along with optimization
ariskotsomitopoulos Nov 15, 2021
4160688
Supporting command in threads
ariskotsomitopoulos Nov 16, 2021
3d93500
Add Replies support from within a thread
ariskotsomitopoulos Nov 17, 2021
3de0f7b
Add sending file to thread support
ariskotsomitopoulos Nov 18, 2021
586b3d8
- Add specific toolbar for threads
ariskotsomitopoulos Nov 22, 2021
722f367
View all threads screen implementation & UI
ariskotsomitopoulos Nov 23, 2021
5e5ce61
Add date in view all threads
ariskotsomitopoulos Nov 23, 2021
e2bf3e7
Add navigation to thread from the thread list
ariskotsomitopoulos Nov 23, 2021
afc69c7
Add local filtering in thread list
ariskotsomitopoulos Nov 24, 2021
c4967a2
Handle chunks merging with thread summary
ariskotsomitopoulos Nov 25, 2021
2a83e93
Delete root message UI
ariskotsomitopoulos Nov 29, 2021
53ca86d
Permalink handling for thread events
ariskotsomitopoulos Nov 29, 2021
e7b8b90
Highlight the whole message along with the thread summary
ariskotsomitopoulos Nov 30, 2021
0241d66
Enhance search functionality to support threads
ariskotsomitopoulos Dec 1, 2021
d1bb96c
Threads notification badge UI
ariskotsomitopoulos Dec 3, 2021
c40a686
Implement LOCAL thread notifications that work only on real time.
ariskotsomitopoulos Dec 3, 2021
b1d4031
Add/Fix local echo to threads timeline
ariskotsomitopoulos Dec 9, 2021
57ef0b5
Disable local echo for normal messages while there is a duplication
ariskotsomitopoulos Dec 9, 2021
5c015a7
Support stickers in threads
ariskotsomitopoulos Dec 10, 2021
d56281d
- Enhance local notification to work with read receipt & the latest c…
ariskotsomitopoulos Dec 14, 2021
5ceed40
Fix threads sort order, newest first
ariskotsomitopoulos Dec 14, 2021
2aa24f0
Fix threads sort order, newest first
ariskotsomitopoulos Dec 14, 2021
6a33c41
Fix stickers in unencrypted rooms
ariskotsomitopoulos Dec 14, 2021
cd95fc4
Merge branch 'develop' into feature/aris/threads
ariskotsomitopoulos Dec 14, 2021
20357ce
- Fix remaining conflicts with develop
ariskotsomitopoulos Dec 15, 2021
3acdccb
Disable polls from within threads but allow users to vote if the poll…
ariskotsomitopoulos Dec 15, 2021
bc6e89b
Disable user typing from thread timeline
ariskotsomitopoulos Dec 15, 2021
638d56c
Fix update from develop/prod to threads
ariskotsomitopoulos Dec 16, 2021
f769d84
Merge branch 'develop' into feature/aris/threads
ariskotsomitopoulos Dec 16, 2021
dca5bea
Merge branch 'feature/aris/fix_immutable_model_crash' into feature/ar…
ariskotsomitopoulos Dec 16, 2021
a187e0e
Enhance thread awareness to recognise the type of messages that are n…
ariskotsomitopoulos Dec 16, 2021
a60f6e9
Enhance thread awareness to support stickers
ariskotsomitopoulos Dec 16, 2021
5723465
Fix local notification badge number
ariskotsomitopoulos Dec 16, 2021
cc7e3ea
Improve init thread query
ariskotsomitopoulos Dec 16, 2021
ed48eb3
Apply ktlinFormat
ariskotsomitopoulos Dec 21, 2021
7048080
Merge branch 'develop' into feature/aris/threads
ariskotsomitopoulos Dec 21, 2021
5a7d12a
Enhance RoomEventFilter with MSC3440
ariskotsomitopoulos Dec 21, 2021
d7546db
Fix code quality issues
ariskotsomitopoulos Dec 21, 2021
dcabaa0
Merge branch 'feature/aris/threads' into feature/aris/threads_api_sup…
ariskotsomitopoulos Dec 21, 2021
f063970
Add support when there no threads messages to init timeline. Init as …
ariskotsomitopoulos Dec 23, 2021
581f71e
Remove unused code
ariskotsomitopoulos Dec 23, 2021
d3e9e19
Fix code quality issues
ariskotsomitopoulos Dec 25, 2021
9ef4e1e
Fix code quality issues
ariskotsomitopoulos Dec 25, 2021
0e30f4e
Fix code quality issues
ariskotsomitopoulos Dec 25, 2021
0d9bc18
Fix code quality issues
ariskotsomitopoulos Dec 25, 2021
694b8de
Merge branch 'develop' into feature/aris/threads
ariskotsomitopoulos Jan 3, 2022
f9e03aa
Remove unused code
ariskotsomitopoulos Jan 3, 2022
c218380
Github actions improvement test
ariskotsomitopoulos Jan 3, 2022
5edc050
Github actions improvement test
ariskotsomitopoulos Jan 3, 2022
683fcc7
Github actions improvement test
ariskotsomitopoulos Jan 3, 2022
4ef9d08
Github actions improvement test
ariskotsomitopoulos Jan 3, 2022
b4d5d13
Github actions improvement test
ariskotsomitopoulos Jan 3, 2022
f7a2088
Github actions improvement test
ariskotsomitopoulos Jan 3, 2022
ae2dbb8
Github actions improvement test
ariskotsomitopoulos Jan 3, 2022
7e3a074
Github actions improvement test
ariskotsomitopoulos Jan 3, 2022
4d6d918
Github actions improvement test
ariskotsomitopoulos Jan 3, 2022
540687c
Github actions improvement test
ariskotsomitopoulos Jan 3, 2022
c8e4fad
Github actions improvement test
ariskotsomitopoulos Jan 3, 2022
bb85e9c
Github actions improvement test
ariskotsomitopoulos Jan 3, 2022
1127a26
Github actions improvement test
ariskotsomitopoulos Jan 3, 2022
5e28253
Github actions improvement test
ariskotsomitopoulos Jan 3, 2022
c144203
Github actions improvement test
ariskotsomitopoulos Jan 3, 2022
aadbf69
Github actions improvement test
ariskotsomitopoulos Jan 3, 2022
e482ef4
First local thread integration test
ariskotsomitopoulos Jan 3, 2022
b67199e
Github actions test
ariskotsomitopoulos Jan 3, 2022
e7dfdce
Github actions test
ariskotsomitopoulos Jan 3, 2022
70d1c15
Github actions test
ariskotsomitopoulos Jan 3, 2022
1b2ce33
Github actions test
ariskotsomitopoulos Jan 3, 2022
929cc29
Update copyright
ariskotsomitopoulos Jan 3, 2022
3ef960c
Update copyright
ariskotsomitopoulos Jan 3, 2022
925c167
Add more integrations tests for threads
ariskotsomitopoulos Jan 3, 2022
42002b8
Github actions test
ariskotsomitopoulos Jan 3, 2022
da8ec4d
Github actions test
ariskotsomitopoulos Jan 3, 2022
948f75b
Github actions test
ariskotsomitopoulos Jan 3, 2022
ef2c32e
Github actions test
ariskotsomitopoulos Jan 3, 2022
84c5373
Github actions test
ariskotsomitopoulos Jan 3, 2022
ddfdf18
Github actions test
ariskotsomitopoulos Jan 3, 2022
91bda14
Github actions test
ariskotsomitopoulos Jan 3, 2022
f1f1d59
Github actions test
ariskotsomitopoulos Jan 3, 2022
ac5cacc
Merge branch 'develop' into feature/aris/threads
ariskotsomitopoulos Jan 7, 2022
ae81f61
fix integration test
ariskotsomitopoulos Jan 7, 2022
50e51cb
Merge branch 'develop' into feature/aris/threads
ariskotsomitopoulos Jan 7, 2022
e541636
Make TimelineSettings aware of rootThreadEventId and welcome a new Th…
ariskotsomitopoulos Jan 10, 2022
6503412
Merge branch 'develop' into feature/aris/threads
ariskotsomitopoulos Jan 10, 2022
1b41a72
Fix Quote from within a thread
ariskotsomitopoulos Jan 10, 2022
37ec3fd
Refactor threads to support the new timeline implementation
ariskotsomitopoulos Jan 11, 2022
3bd21d0
Merge branch 'develop' into feature/aris/threads
ariskotsomitopoulos Jan 11, 2022
753e3e7
- fix ktlint format
ariskotsomitopoulos Jan 11, 2022
1e2fb88
- fix lint error
ariskotsomitopoulos Jan 11, 2022
4560d74
Display encrypted messages in thread summary and in thread list
ariskotsomitopoulos Jan 11, 2022
9d48ece
Merge branch 'develop' into feature/aris/threads
ariskotsomitopoulos Jan 12, 2022
c049351
Fix kltint errors
ariskotsomitopoulos Jan 12, 2022
b890546
Fix migration from 21 to 22
ariskotsomitopoulos Jan 12, 2022
53fecef
Fix compilation error on TimelineFragment
ariskotsomitopoulos Jan 12, 2022
53b82df
Fix permalink handling for threads regarding timeline changes
ariskotsomitopoulos Jan 14, 2022
ff87f07
Add empty screen UI on empty thread list
ariskotsomitopoulos Jan 14, 2022
3a3cce8
Add encryption shield
ariskotsomitopoulos Jan 14, 2022
5b786e5
Remove duplicate RetryTestRule
ariskotsomitopoulos Jan 17, 2022
b343739
Enhance decrypted thread summary to return poll questions
ariskotsomitopoulos Jan 17, 2022
f606797
Refactor ThreadMessagingTest
ariskotsomitopoulos Jan 17, 2022
81a1dfd
PR Remarks
ariskotsomitopoulos Jan 17, 2022
5e23947
Enhance filtering to support threads
ariskotsomitopoulos Jan 17, 2022
636474b
Merge branch 'develop' into feature/aris/threads
ariskotsomitopoulos Jan 18, 2022
10599aa
ktlint format
ariskotsomitopoulos Jan 18, 2022
707397c
cleanup
ariskotsomitopoulos Jan 18, 2022
4cff393
- Hide read receipts from thread timeline
ariskotsomitopoulos Jan 18, 2022
8cc96e2
- Add threads to lab settings
ariskotsomitopoulos Jan 19, 2022
38f193f
Add LightweightSettingsStorage in sdk
ariskotsomitopoulos Jan 19, 2022
35ee72a
Add typealias for TimelineEvent
ariskotsomitopoulos Jan 19, 2022
e0630ce
Fix mentions UI within threads
ariskotsomitopoulos Jan 20, 2022
fe88e81
- Refactor thread awareness (handle decrypted rooms, images, stickers…
ariskotsomitopoulos Jan 24, 2022
b1b27bd
Enhance edit to support new threads fallback
ariskotsomitopoulos Jan 25, 2022
c19b52c
Enhance thread summary
ariskotsomitopoulos Jan 25, 2022
92d082c
Improve thread message deletion
ariskotsomitopoulos Jan 26, 2022
358a7d0
Handle latest thread message & root thread edition to update thread s…
ariskotsomitopoulos Jan 27, 2022
f53b711
When thread disabled add thread replies within threads ( to the users…
ariskotsomitopoulos Jan 27, 2022
554ece7
- Remove counter from thread notifications
ariskotsomitopoulos Jan 27, 2022
b83872d
When show all threads developer mode option is enabled, prevent reply…
ariskotsomitopoulos Jan 27, 2022
b2a2fe2
Merge branch 'develop' into feature/aris/threads
ariskotsomitopoulos Jan 27, 2022
bac6d27
Merge develop into this branch
ariskotsomitopoulos Jan 27, 2022
78dfac5
ktlint format
ariskotsomitopoulos Jan 27, 2022
1d6d810
Further improve thread summary after forward scrolling
ariskotsomitopoulos Jan 28, 2022
b1067e9
- ktlint format
ariskotsomitopoulos Jan 28, 2022
cdd36ce
Fix IndexOutOfBound crashes while clicking permalinks
ariskotsomitopoulos Jan 31, 2022
32a982c
Improve coerceIn format
ariskotsomitopoulos Jan 31, 2022
5ff5f76
Revert the use of coerceIn
ariskotsomitopoulos Jan 31, 2022
3253a25
Introduce ThreadsService by splitting TimelineService
ariskotsomitopoulos Jan 31, 2022
cb3501e
Lazy load notSupportedThreadsCommands to improve performance
ariskotsomitopoulos Jan 31, 2022
d91f3d2
Enhance SlashCommandNotSupportedInThreads
ariskotsomitopoulos Jan 31, 2022
14e56b8
MessageComposerViewModel format
ariskotsomitopoulos Jan 31, 2022
26eaa84
ktlint format
ariskotsomitopoulos Jan 31, 2022
ec9b6aa
Fix error in unit test
ariskotsomitopoulos Jan 31, 2022
f07c23f
Formating & remove unused comments
ariskotsomitopoulos Jan 31, 2022
d509b33
Merge branch 'develop' into feature/aris/threads
ariskotsomitopoulos Jan 31, 2022
15fe9ed
Fix conflicts
ariskotsomitopoulos Jan 31, 2022
fcc095a
PR remarks
ariskotsomitopoulos Feb 1, 2022
cfa52d8
ktlint format
ariskotsomitopoulos Feb 1, 2022
877c9be
Improve hidden events for threads
ariskotsomitopoulos Feb 1, 2022
ed992dd
Formatting
ariskotsomitopoulos Feb 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ project(":diff-match-patch") {
}
}

// Global configurations across all modules
ext {
isThreadingEnabled = true
}

//project(":matrix-sdk-android") {
// sonarqube {
// properties {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:fromXDelta="-100%p" android:toXDelta="0"
android:duration="@android:integer/config_mediumAnimTime"/>
</set>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:startOffset="250"
android:fromXDelta="100%p" android:toXDelta="0"
android:duration="@android:integer/config_mediumAnimTime"/>
</set>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:startOffset="250"
android:fromXDelta="0" android:toXDelta="-100%p"
android:duration="@android:integer/config_mediumAnimTime"/>
</set>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:fromXDelta="0" android:toXDelta="100%p"
android:duration="@android:integer/config_mediumAnimTime"/>
</set>
4 changes: 4 additions & 0 deletions library/ui-styles/src/main/res/values-v23/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="menu_item_ripple_size">28dp</dimen>
</resources>
4 changes: 4 additions & 0 deletions library/ui-styles/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
<!-- Preview Url -->
<dimen name="preview_url_view_corner_radius">8dp</dimen>

<dimen name="menu_item_icon_size">24dp</dimen>
<dimen name="menu_item_size">48dp</dimen>
<dimen name="menu_item_ripple_size">48dp</dimen>

<!-- Composer -->
<dimen name="composer_min_height">56dp</dimen>
<dimen name="composer_attachment_size">52dp</dimen>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent
import org.matrix.android.sdk.api.util.Optional
import org.matrix.android.sdk.api.util.toOptional

typealias ThreadRootEvent = TimelineEvent

class FlowRoom(private val room: Room) {

fun liveRoomSummary(): Flow<Optional<RoomSummary>> {
Expand Down Expand Up @@ -98,6 +100,20 @@ class FlowRoom(private val room: Room) {
fun liveNotificationState(): Flow<RoomNotificationState> {
return room.getLiveRoomNotificationState().asFlow()
}

fun liveThreadList(): Flow<List<ThreadRootEvent>> {
return room.getAllThreadsLive().asFlow()
.startWith(room.coroutineDispatchers.io) {
room.getAllThreads()
}
}

fun liveLocalUnreadThreadList(): Flow<List<ThreadRootEvent>> {
return room.getMarkedThreadNotificationsLive().asFlow()
.startWith(room.coroutineDispatchers.io) {
room.getMarkedThreadNotifications()
}
}
}

fun Room.flow(): FlowRoom {
Expand Down
5 changes: 5 additions & 0 deletions matrix-sdk-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ android {
resValue "string", "git_sdk_revision_unix_date", "\"${gitRevisionUnixDate()}\""
resValue "string", "git_sdk_revision_date", "\"${gitRevisionDate()}\""

// Indicates whether or not threading support is enabled
buildConfigField "Boolean", "THREADING_ENABLED", "${isThreadingEnabled}"
defaultConfig {
consumerProguardFiles 'proguard-rules.pro'
}
Expand Down Expand Up @@ -139,6 +141,9 @@ dependencies {

kapt 'dk.ilios:realmfieldnameshelper:2.0.0'

// Shared Preferences
implementation libs.androidx.preferenceKtx

// Work
implementation libs.androidx.work

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,20 @@ class CommonTestHelper(context: Context) {
/**
* Will send nb of messages provided by count parameter but waits every 10 messages to avoid gap in sync
*/
private fun sendTextMessagesBatched(timeline: Timeline, room: Room, message: String, count: Int, timeout: Long): List<TimelineEvent> {
private fun sendTextMessagesBatched(timeline: Timeline, room: Room, message: String, count: Int, timeout: Long, rootThreadEventId: String? = null): List<TimelineEvent> {
val sentEvents = ArrayList<TimelineEvent>(count)
(1 until count + 1)
.map { "$message #$it" }
.chunked(10)
.forEach { batchedMessages ->
batchedMessages.forEach { formattedMessage ->
room.sendTextMessage(formattedMessage)
if (rootThreadEventId != null) {
room.replyInThread(
rootThreadEventId = rootThreadEventId,
replyInThreadText = formattedMessage)
} else {
room.sendTextMessage(formattedMessage)
}
}
waitWithLatch(timeout) { latch ->
val timelineListener = object : Timeline.Listener {
Expand Down Expand Up @@ -196,6 +202,27 @@ class CommonTestHelper(context: Context) {
return sentEvents
}

/**
* Reply in a thread
* @param room the room where to send the messages
* @param message the message to send
* @param numberOfMessages the number of time the message will be sent
*/
fun replyInThreadMessage(
room: Room,
message: String,
numberOfMessages: Int,
rootThreadEventId: String,
timeout: Long = TestConstants.timeOutMillis): List<TimelineEvent> {
val timeline = room.createTimeline(null, TimelineSettings(10))
timeline.start()
val sentEvents = sendTextMessagesBatched(timeline, room, message, numberOfMessages, timeout, rootThreadEventId)
timeline.dispose()
// Check that all events has been created
assertEquals("Message number do not match $sentEvents", numberOfMessages.toLong(), sentEvents.size.toLong())
return sentEvents
}

// PRIVATE METHODS *****************************************************************************

/**
Expand Down
Loading