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

Feature/handle matrix to #706

Merged
merged 7 commits into from
Dec 16, 2019
Merged

Feature/handle matrix to #706

merged 7 commits into from
Dec 16, 2019

Conversation

ganfra
Copy link
Member

@ganfra ganfra commented Nov 25, 2019

This PR adds support for opening matrix.to link from outside the app (#57) and map room alias to roomId for joined room (#201 )

@ganfra ganfra requested a review from bmarty November 25, 2019 18:40
@bmarty bmarty added this to the Sprint7 milestone Nov 28, 2019
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few remarks

/**
* Resolve a room alias to a room ID.
*/
fun getRoomIdByAlias(roomAlias: String, searchOnServer: Boolean, callback: MatrixCallback<Optional<String>>): Cancelable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why using a Optional here?

internal fun RoomSummaryEntity.Companion.findByAlias(realm: Realm, roomAlias: String): RoomSummaryEntity? {
val roomSummary = realm.where<RoomSummaryEntity>()
.equalTo(RoomSummaryEntityFields.CANONICAL_ALIAS, roomAlias)
.findFirst()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not necessary because the canonical alias is also in the alias list, no?


internal class MatrixCallbackSingle<T>(private val singleEmitter: SingleEmitter<T>) : MatrixCallback<T> {
@JsonClass(generateAdapter = true)
data class RoomAliasDescription(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal?

android:parentActivityName=".features.home.HomeActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".features.home.HomeActivity" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok If we open the RoomDetailActivity from a notification? Today we already go back to the Home. We should check that.

@@ -1768,5 +1768,6 @@ Not all features in Riot are implemented in RiotX yet. Main missing (and coming
<string name="permissions_rationale_msg_keys_backup_export">Riot needs permission to save your E2E keys on disk.\n\nPlease allow access on the next pop-up to be able to export your keys manually.</string>

<string name="no_network_indicator">There is no network connection right now</string>
<string name="permalink_malformed">Your matrix.to link was malformed</string>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> strings_RiotX.xml

@bmarty
Copy link
Member

bmarty commented Dec 6, 2019

Also the case correct room but unknown event does not work, we get an infinite loading

Ex: https://matrix.to/#/!QtykxKocfZaZOUrTwp:matrix.org/$INVALIDID:matrix.org?via=matrix.org

Riot-Web display this dialog:
image

@bmarty bmarty merged commit 4a11d02 into develop Dec 16, 2019
@bmarty bmarty deleted the feature/handle_matrix_to branch December 16, 2019 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants