WIP review
This commit is contained in:
parent
2626a761ea
commit
264bc52bcc
|
@ -17,6 +17,9 @@
|
|||
package org.matrix.android.sdk.internal.session.room.alias
|
||||
|
||||
import com.zhuinden.monarchy.Monarchy
|
||||
import io.realm.Realm
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.matrix.android.sdk.api.extensions.tryOrNull
|
||||
import org.matrix.android.sdk.api.util.Optional
|
||||
import org.matrix.android.sdk.internal.database.model.RoomSummaryEntity
|
||||
import org.matrix.android.sdk.internal.database.query.findByAlias
|
||||
|
@ -24,9 +27,6 @@ import org.matrix.android.sdk.internal.di.SessionDatabase
|
|||
import org.matrix.android.sdk.internal.network.executeRequest
|
||||
import org.matrix.android.sdk.internal.session.room.RoomAPI
|
||||
import org.matrix.android.sdk.internal.task.Task
|
||||
import io.realm.Realm
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
internal interface GetRoomIdByAliasTask : Task<GetRoomIdByAliasTask.Params, Optional<String>> {
|
||||
|
@ -51,14 +51,11 @@ internal class DefaultGetRoomIdByAliasTask @Inject constructor(
|
|||
} else if (!params.searchOnServer) {
|
||||
Optional.from<String>(null)
|
||||
} else {
|
||||
roomId = try {
|
||||
roomId = tryOrNull("## Failed to get roomId from alias") {
|
||||
executeRequest<RoomAliasDescription>(eventBus) {
|
||||
apiCall = roomAPI.getRoomIdByAlias(params.roomAlias)
|
||||
}.roomId
|
||||
} catch (throwable: Throwable) {
|
||||
Timber.d(throwable, "## Failed to get roomId from alias")
|
||||
null
|
||||
}
|
||||
}
|
||||
}?.roomId
|
||||
Optional.from(roomId)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -155,12 +155,13 @@ abstract class MergedRoomCreationItem : BasedMergedItem<MergedRoomCreationItem.H
|
|||
}))
|
||||
}
|
||||
} else {
|
||||
holder.roomTopicText.setTextOrHide(span {
|
||||
span(holder.view.resources.getString(R.string.topic_prefix)) {
|
||||
textStyle = "bold"
|
||||
}
|
||||
+topic.linkify(attributes.callback)
|
||||
}
|
||||
holder.roomTopicText.setTextOrHide(
|
||||
span {
|
||||
span(holder.view.resources.getString(R.string.topic_prefix)) {
|
||||
textStyle = "bold"
|
||||
}
|
||||
+topic.linkify(attributes.callback)
|
||||
}
|
||||
)
|
||||
}
|
||||
holder.roomTopicText.movementMethod = movementMethod
|
||||
|
|
|
@ -161,7 +161,7 @@ class RoomMemberProfileController @Inject constructor(
|
|||
} else {
|
||||
genericFooterItem {
|
||||
id("verify_footer_not_encrypted")
|
||||
text(stringProvider.getString(R.string.room_profile_not_encrypted_subtitle))
|
||||
text(RRstringProvider.getString(R.string.room_profile_not_encrypted_subtitle))
|
||||
centered(false)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/roomNameDescriptionText"
|
||||
tools:text="Add a topic to let people know what this room is about. " />
|
||||
tools:text="@string/room_created_summary_no_topic_creation_text" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
|
@ -2407,7 +2407,7 @@
|
|||
<string name="this_is_the_beginning_of_room_no_name">This is the beginning of this conversation.</string>
|
||||
<string name="this_is_the_beginning_of_dm">This is the beginning of your direct message history with %s.</string>
|
||||
<!-- First param will be replaced by the value of add_a_topic_link_text, that will be clickable-->
|
||||
<string name="room_created_summary_no_topic_creation_text">%s to let people know what this room is about. </string>
|
||||
<string name="room_created_summary_no_topic_creation_text">%s to let people know what this room is about.</string>
|
||||
<string name="add_a_topic_link_text">Add a topic</string>
|
||||
<string name="topic_prefix">"Topic: "</string>
|
||||
|
||||
|
|
Loading…
Reference in New Issue