Merge develop into this branch
This commit is contained in:
parent
b2a2fe2710
commit
bac6d271ca
@ -49,10 +49,6 @@ class UserPreferencesProvider @Inject constructor(private val vectorPreferences:
|
|||||||
return vectorPreferences.showAvatarDisplayNameChangeMessages()
|
return vectorPreferences.showAvatarDisplayNameChangeMessages()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun shouldShowPolls(): Boolean {
|
|
||||||
return vectorPreferences.labsEnablePolls()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun areThreadMessagesEnabled(): Boolean {
|
fun areThreadMessagesEnabled(): Boolean {
|
||||||
return vectorPreferences.areThreadMessagesEnabled()
|
return vectorPreferences.areThreadMessagesEnabled()
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ sealed interface ParsedCommand {
|
|||||||
|
|
||||||
object ErrorEmptySlashCommand : ParsedCommand
|
object ErrorEmptySlashCommand : ParsedCommand
|
||||||
|
|
||||||
class ErrorCommandNotSupportedInThreads(val slashCommand: String) : ParsedCommand()
|
class ErrorCommandNotSupportedInThreads(val slashCommand: String) : ParsedCommand
|
||||||
|
|
||||||
// Unknown/Unsupported slash command
|
// Unknown/Unsupported slash command
|
||||||
data class ErrorUnknownSlashCommand(val slashCommand: String) : ParsedCommand
|
data class ErrorUnknownSlashCommand(val slashCommand: String) : ParsedCommand
|
||||||
|
@ -614,7 +614,7 @@ class TimelineFragment @Inject constructor(
|
|||||||
navigator
|
navigator
|
||||||
.openLocationSharing(
|
.openLocationSharing(
|
||||||
context = requireContext(),
|
context = requireContext(),
|
||||||
roomId = roomDetailArgs.roomId,
|
roomId = timelineArgs.roomId,
|
||||||
mode = LocationSharingMode.PREVIEW,
|
mode = LocationSharingMode.PREVIEW,
|
||||||
initialLocationData = viewEvent.locationData,
|
initialLocationData = viewEvent.locationData,
|
||||||
locationOwnerId = viewEvent.userId
|
locationOwnerId = viewEvent.userId
|
||||||
@ -1470,7 +1470,9 @@ class TimelineFragment @Inject constructor(
|
|||||||
attachmentTypeSelector = AttachmentTypeSelectorView(vectorBaseActivity, vectorBaseActivity.layoutInflater, this@TimelineFragment)
|
attachmentTypeSelector = AttachmentTypeSelectorView(vectorBaseActivity, vectorBaseActivity.layoutInflater, this@TimelineFragment)
|
||||||
attachmentTypeSelector.setAttachmentVisibility(
|
attachmentTypeSelector.setAttachmentVisibility(
|
||||||
AttachmentTypeSelectorView.Type.LOCATION,
|
AttachmentTypeSelectorView.Type.LOCATION,
|
||||||
vectorPreferences.isLocationSharingEnabled() && !isThreadTimeLine())
|
vectorPreferences.isLocationSharingEnabled())
|
||||||
|
attachmentTypeSelector.setAttachmentVisibility(
|
||||||
|
AttachmentTypeSelectorView.Type.POLL, !isThreadTimeLine())
|
||||||
}
|
}
|
||||||
attachmentTypeSelector.show(views.composerLayout.views.attachmentButton)
|
attachmentTypeSelector.show(views.composerLayout.views.attachmentButton)
|
||||||
}
|
}
|
||||||
@ -2172,7 +2174,7 @@ class TimelineFragment @Inject constructor(
|
|||||||
}
|
}
|
||||||
is EventSharedAction.Edit -> {
|
is EventSharedAction.Edit -> {
|
||||||
if (action.eventType == EventType.POLL_START) {
|
if (action.eventType == EventType.POLL_START) {
|
||||||
navigator.openCreatePoll(requireContext(), roomDetailArgs.roomId, action.eventId, PollMode.EDIT)
|
navigator.openCreatePoll(requireContext(), timelineArgs.roomId, action.eventId, PollMode.EDIT)
|
||||||
} else if (withState(messageComposerViewModel) { it.isVoiceMessageIdle }) {
|
} else if (withState(messageComposerViewModel) { it.isVoiceMessageIdle }) {
|
||||||
messageComposerViewModel.handle(MessageComposerAction.EnterEditMode(action.eventId, views.composerLayout.text.toString()))
|
messageComposerViewModel.handle(MessageComposerAction.EnterEditMode(action.eventId, views.composerLayout.text.toString()))
|
||||||
} else {
|
} else {
|
||||||
@ -2437,7 +2439,7 @@ class TimelineFragment @Inject constructor(
|
|||||||
navigator
|
navigator
|
||||||
.openLocationSharing(
|
.openLocationSharing(
|
||||||
context = requireContext(),
|
context = requireContext(),
|
||||||
roomId = roomDetailArgs.roomId,
|
roomId = timelineArgs.roomId,
|
||||||
mode = LocationSharingMode.STATIC_SHARING,
|
mode = LocationSharingMode.STATIC_SHARING,
|
||||||
initialLocationData = null,
|
initialLocationData = null,
|
||||||
locationOwnerId = session.myUserId
|
locationOwnerId = session.myUserId
|
||||||
|
@ -27,5 +27,6 @@ data class TimelineArgs(
|
|||||||
val eventId: String? = null,
|
val eventId: String? = null,
|
||||||
val sharedData: SharedData? = null,
|
val sharedData: SharedData? = null,
|
||||||
val openShareSpaceForId: String? = null,
|
val openShareSpaceForId: String? = null,
|
||||||
val threadTimelineArgs: ThreadTimelineArgs? = null
|
val threadTimelineArgs: ThreadTimelineArgs? = null,
|
||||||
|
val switchToParentSpace: Boolean = false
|
||||||
) : Parcelable
|
) : Parcelable
|
||||||
|
@ -25,7 +25,6 @@ import dagger.hilt.android.AndroidEntryPoint
|
|||||||
import im.vector.app.R
|
import im.vector.app.R
|
||||||
import im.vector.app.core.extensions.addFragmentToBackstack
|
import im.vector.app.core.extensions.addFragmentToBackstack
|
||||||
import im.vector.app.core.extensions.replaceFragment
|
import im.vector.app.core.extensions.replaceFragment
|
||||||
import im.vector.app.core.platform.ToolbarConfigurable
|
|
||||||
import im.vector.app.core.platform.VectorBaseActivity
|
import im.vector.app.core.platform.VectorBaseActivity
|
||||||
import im.vector.app.databinding.ActivityThreadsBinding
|
import im.vector.app.databinding.ActivityThreadsBinding
|
||||||
import im.vector.app.features.home.AvatarRenderer
|
import im.vector.app.features.home.AvatarRenderer
|
||||||
@ -38,7 +37,7 @@ import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent
|
|||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class ThreadsActivity : VectorBaseActivity<ActivityThreadsBinding>(), ToolbarConfigurable {
|
class ThreadsActivity : VectorBaseActivity<ActivityThreadsBinding>() {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
lateinit var avatarRenderer: AvatarRenderer
|
lateinit var avatarRenderer: AvatarRenderer
|
||||||
@ -120,10 +119,6 @@ class ThreadsActivity : VectorBaseActivity<ActivityThreadsBinding>(), ToolbarCon
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun configure(toolbar: MaterialToolbar) {
|
|
||||||
configureToolbar(toolbar)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine in witch fragment we should navigate
|
* Determine in witch fragment we should navigate
|
||||||
*/
|
*/
|
||||||
|
@ -87,7 +87,7 @@ class ThreadListFragment @Inject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun initToolbar() {
|
private fun initToolbar() {
|
||||||
setupToolbar(views.threadListToolbar)
|
setupToolbar(views.threadListToolbar).allowBack()
|
||||||
renderToolbar()
|
renderToolbar()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/roomToolbarContentView"
|
android:id="@+id/roomToolbarContentView"
|
||||||
tools:visibility="visible"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/roomToolbarAvatarImageView"
|
android:id="@+id/roomToolbarAvatarImageView"
|
||||||
@ -61,14 +61,13 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/roomToolbarTitleView"
|
android:id="@+id/roomToolbarTitleView"
|
||||||
style="@style/Widget.Vector.TextView.HeadlineMedium"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:textColor="?vctr_content_primary"
|
android:textAppearance="@style/TextAppearance.Vector.Widget.ActionBarTitle"
|
||||||
app:layout_constraintBottom_toTopOf="@id/roomToolbarSubtitleView"
|
app:layout_constraintBottom_toTopOf="@id/roomToolbarSubtitleView"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
@ -80,14 +79,13 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/roomToolbarSubtitleView"
|
android:id="@+id/roomToolbarSubtitleView"
|
||||||
style="@style/Widget.Vector.TextView.Body"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="7dp"
|
android:layout_marginStart="7dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:textColor="?vctr_content_primary"
|
android:textAppearance="@style/TextAppearance.Vector.Widget.ActionBarSubTitle"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user