-
Notifications
You must be signed in to change notification settings - Fork 754
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5298 from vector-im/feature/aris/thread_live_thre…
…ad_list Live Threads
- Loading branch information
Showing
88 changed files
with
2,048 additions
and
321 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Thread timeline is now live and much faster especially for large or old threads |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
View all threads per room screen is now live when the home server supports threads |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Adds support for MSC3440, additional threads homeserver capabilities |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...main/java/org/matrix/android/sdk/api/session/events/model/LatestThreadUnsignedRelation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright 2022 The Matrix.org Foundation C.I.C. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.matrix.android.sdk.api.session.events.model | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class LatestThreadUnsignedRelation( | ||
override val limited: Boolean? = false, | ||
override val count: Int? = 0, | ||
@Json(name = "latest_event") | ||
val event: Event? = null, | ||
@Json(name = "current_user_participated") | ||
val isUserParticipating: Boolean? = false | ||
|
||
) : UnsignedRelationInfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
...rc/main/java/org/matrix/android/sdk/api/session/room/threads/local/ThreadsLocalService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Copyright 2022 The Matrix.org Foundation C.I.C. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.matrix.android.sdk.api.session.room.threads.local | ||
|
||
import androidx.lifecycle.LiveData | ||
import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent | ||
|
||
/** | ||
* This interface defines methods to interact with thread related features. | ||
* It's the local threads implementation and assumes that the homeserver | ||
* do not support threads | ||
*/ | ||
interface ThreadsLocalService { | ||
|
||
/** | ||
* Returns a [LiveData] list of all the thread root TimelineEvents that exists at the room level | ||
*/ | ||
fun getAllThreadsLive(): LiveData<List<TimelineEvent>> | ||
|
||
/** | ||
* Returns a list of all the thread root TimelineEvents that exists at the room level | ||
*/ | ||
fun getAllThreads(): List<TimelineEvent> | ||
|
||
/** | ||
* Returns a [LiveData] list of all the marked unread threads that exists at the room level | ||
*/ | ||
fun getMarkedThreadNotificationsLive(): LiveData<List<TimelineEvent>> | ||
|
||
/** | ||
* Returns a list of all the marked unread threads that exists at the room level | ||
*/ | ||
fun getMarkedThreadNotifications(): List<TimelineEvent> | ||
|
||
/** | ||
* Returns whether or not the current user is participating in the thread | ||
* @param rootThreadEventId the eventId of the current thread | ||
*/ | ||
fun isUserParticipatingInThread(rootThreadEventId: String): Boolean | ||
|
||
/** | ||
* Enhance the provided root thread TimelineEvent [List] by adding the latest | ||
* message edition for that thread | ||
* @return the enhanced [List] with edited updates | ||
*/ | ||
fun mapEventsWithEdition(threads: List<TimelineEvent>): List<TimelineEvent> | ||
|
||
/** | ||
* Marks the current thread as read in local DB. | ||
* note: read receipts within threads are not yet supported with the API | ||
* @param rootThreadEventId the root eventId of the current thread | ||
*/ | ||
suspend fun markThreadAsRead(rootThreadEventId: String) | ||
} |
Oops, something went wrong.