Merge branch 'develop' into feature/ons/poll_timeline
* develop: (21 commits) Remove automation for new Delight board Remove automation for old Delight board Bump gradle from 7.0.3 to 7.0.4 Bump realm-gradle-plugin from 10.8.1 to 10.9.0 Bump libphonenumber from 8.12.38 to 8.12.39 Bump mavericks from 2.4.0 to 2.5.0 removing no longer possible branches adding a consistent padding to allow message types to avoid touching the side gutter Upgrade OLM to v3.2.7 and get it from our maven repository. removing manual send status spacing - it's no longer needed as the send status is always present (but invisible) removing manual end alignment for voice messages as send status gutter is now always present forcing the send spacing to always be taking into account - ensures all message lengths are consistent capping the preview image url based on the height - stops large screens eg tablets from attempting to fill the screen matching iOS max line rules for the preview description using themed colours for the close button limiting title to avoid overlapping with close icon flattening preview url view layout with custom view to reduce view hierarchy adding changelog entry updating url preview to match new designs removing now longer needed Mode argument ... # Conflicts: # vector/src/main/res/layout/item_timeline_event_base.xml
This commit is contained in:
commit
b2e599ea2b
63
.github/workflows/triage-move-labelled.yml
vendored
63
.github/workflows/triage-move-labelled.yml
vendored
@ -47,45 +47,30 @@ jobs:
|
|||||||
PROJECT_ID: "PN_kwDOAM0swc0sUA"
|
PROJECT_ID: "PN_kwDOAM0swc0sUA"
|
||||||
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
||||||
|
|
||||||
spaces_issues_to_old_board:
|
# delight_issues_to_board:
|
||||||
name: Spaces issues to old Delight project board
|
# name: Spaces issues to new Delight project board
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
if: >
|
# if: >
|
||||||
contains(github.event.issue.labels.*.name, 'A-Spaces') ||
|
# contains(github.event.issue.labels.*.name, 'A-Spaces') ||
|
||||||
contains(github.event.issue.labels.*.name, 'A-Space-Settings') ||
|
# contains(github.event.issue.labels.*.name, 'A-Space-Settings') ||
|
||||||
contains(github.event.issue.labels.*.name, 'A-Subspaces')
|
# contains(github.event.issue.labels.*.name, 'A-Subspaces')
|
||||||
steps:
|
# steps:
|
||||||
- uses: konradpabjan/move-labeled-or-milestoned-issue@219d384e03fa4b6460cd24f9f37d19eb033a4338
|
# - uses: octokit/graphql-action@v2.x
|
||||||
with:
|
# with:
|
||||||
action-token: "${{ secrets.ELEMENT_BOT_TOKEN }}"
|
# headers: '{"GraphQL-Features": "projects_next_graphql"}'
|
||||||
project-url: "https://github.com/orgs/vector-im/projects/6"
|
# query: |
|
||||||
column-name: "📥 Inbox"
|
# mutation add_to_project($projectid:String!,$contentid:String!) {
|
||||||
label-name: "A-Spaces"
|
# addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) {
|
||||||
|
# projectNextItem {
|
||||||
spaces_issues_to_new_board:
|
# id
|
||||||
name: Spaces issues to new Delight project board
|
# }
|
||||||
runs-on: ubuntu-latest
|
# }
|
||||||
if: >
|
# }
|
||||||
contains(github.event.issue.labels.*.name, 'A-Spaces') ||
|
# projectid: ${{ env.PROJECT_ID }}
|
||||||
contains(github.event.issue.labels.*.name, 'A-Space-Settings') ||
|
# contentid: ${{ github.event.issue.node_id }}
|
||||||
contains(github.event.issue.labels.*.name, 'A-Subspaces')
|
# env:
|
||||||
steps:
|
# PROJECT_ID: "PN_kwDOAM0swc1HvQ"
|
||||||
- uses: octokit/graphql-action@v2.x
|
# GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
||||||
with:
|
|
||||||
headers: '{"GraphQL-Features": "projects_next_graphql"}'
|
|
||||||
query: |
|
|
||||||
mutation add_to_project($projectid:String!,$contentid:String!) {
|
|
||||||
addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) {
|
|
||||||
projectNextItem {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
projectid: ${{ env.PROJECT_ID }}
|
|
||||||
contentid: ${{ github.event.issue.node_id }}
|
|
||||||
env:
|
|
||||||
PROJECT_ID: "PN_kwDOAM0swc1HvQ"
|
|
||||||
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
|
||||||
|
|
||||||
move_voice-message_issues:
|
move_voice-message_issues:
|
||||||
name: A-Voice Messages to voice message board
|
name: A-Voice Messages to voice message board
|
||||||
|
@ -38,12 +38,12 @@ allprojects {
|
|||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
// For olm library. This has to be declared first, to ensure that Olm library is not downloaded from another repo
|
// For olm library. This has to be declared first, to ensure that Olm library is not downloaded from another repo
|
||||||
|
maven { url 'https://gitlab.matrix.org/api/v4/projects/27/packages/maven' }
|
||||||
|
|
||||||
maven {
|
maven {
|
||||||
url 'https://jitpack.io'
|
url 'https://jitpack.io'
|
||||||
content {
|
content {
|
||||||
// Use this repo only for olm library
|
// Use this repo only for FilePicker
|
||||||
includeGroupByRegex "org\\.matrix\\.gitlab\\.matrix-org"
|
|
||||||
// And also for FilePicker
|
|
||||||
includeGroupByRegex "com\\.github\\.jaiselrahman"
|
includeGroupByRegex "com\\.github\\.jaiselrahman"
|
||||||
// And monarchy
|
// And monarchy
|
||||||
includeGroupByRegex "com\\.github\\.Zhuinden"
|
includeGroupByRegex "com\\.github\\.Zhuinden"
|
||||||
|
1
changelog.d/4278.feature
Normal file
1
changelog.d/4278.feature
Normal file
@ -0,0 +1 @@
|
|||||||
|
Updates URL previews to match latest designs
|
1
changelog.d/4647.misc
Normal file
1
changelog.d/4647.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Upgrade OLM to v3.2.7 and get it from our maven repository.
|
@ -7,7 +7,7 @@ ext.versions = [
|
|||||||
'targetCompat' : JavaVersion.VERSION_11,
|
'targetCompat' : JavaVersion.VERSION_11,
|
||||||
]
|
]
|
||||||
|
|
||||||
def gradle = "7.0.3"
|
def gradle = "7.0.4"
|
||||||
// Ref: https://kotlinlang.org/releases.html
|
// Ref: https://kotlinlang.org/releases.html
|
||||||
def kotlin = "1.5.31"
|
def kotlin = "1.5.31"
|
||||||
def kotlinCoroutines = "1.5.2"
|
def kotlinCoroutines = "1.5.2"
|
||||||
@ -19,7 +19,7 @@ def moshi = "1.12.0"
|
|||||||
def lifecycle = "2.4.0"
|
def lifecycle = "2.4.0"
|
||||||
def flowBinding = "1.2.0"
|
def flowBinding = "1.2.0"
|
||||||
def epoxy = "4.6.2"
|
def epoxy = "4.6.2"
|
||||||
def mavericks = "2.4.0"
|
def mavericks = "2.5.0"
|
||||||
def glide = "4.12.0"
|
def glide = "4.12.0"
|
||||||
def bigImageViewer = "1.8.1"
|
def bigImageViewer = "1.8.1"
|
||||||
def jjwt = "0.11.2"
|
def jjwt = "0.11.2"
|
||||||
|
@ -39,4 +39,7 @@
|
|||||||
|
|
||||||
<!-- Navigation Drawer -->
|
<!-- Navigation Drawer -->
|
||||||
<dimen name="navigation_drawer_max_width">320dp</dimen>
|
<dimen name="navigation_drawer_max_width">320dp</dimen>
|
||||||
|
|
||||||
|
<!-- Preview Url -->
|
||||||
|
<dimen name="preview_url_view_corner_radius">8dp</dimen>
|
||||||
</resources>
|
</resources>
|
@ -9,7 +9,7 @@ buildscript {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "io.realm:realm-gradle-plugin:10.8.1"
|
classpath "io.realm:realm-gradle-plugin:10.9.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,8 +140,8 @@ dependencies {
|
|||||||
implementation libs.arrow.core
|
implementation libs.arrow.core
|
||||||
implementation libs.arrow.instances
|
implementation libs.arrow.instances
|
||||||
|
|
||||||
// olm lib is now hosted by jitpack: https://jitpack.io/#org.matrix.gitlab.matrix-org/olm
|
// olm lib is now hosted by maven at https://gitlab.matrix.org/api/v4/projects/27/packages/maven
|
||||||
implementation 'org.matrix.gitlab.matrix-org:olm:3.2.4'
|
implementation 'org.matrix.android:olm:3.2.7'
|
||||||
|
|
||||||
// DI
|
// DI
|
||||||
implementation libs.dagger.dagger
|
implementation libs.dagger.dagger
|
||||||
@ -158,7 +158,7 @@ dependencies {
|
|||||||
implementation libs.apache.commonsImaging
|
implementation libs.apache.commonsImaging
|
||||||
|
|
||||||
// Phone number https://github.com/google/libphonenumber
|
// Phone number https://github.com/google/libphonenumber
|
||||||
implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.38'
|
implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.39'
|
||||||
|
|
||||||
testImplementation libs.tests.junit
|
testImplementation libs.tests.junit
|
||||||
testImplementation 'org.robolectric:robolectric:4.7.3'
|
testImplementation 'org.robolectric:robolectric:4.7.3'
|
||||||
|
@ -141,7 +141,6 @@ android {
|
|||||||
resValue "string", "build_number", "\"${buildNumber}\""
|
resValue "string", "build_number", "\"${buildNumber}\""
|
||||||
|
|
||||||
buildConfigField "im.vector.app.features.VectorFeatures.LoginVersion", "LOGIN_VERSION", "im.vector.app.features.VectorFeatures.LoginVersion.V1"
|
buildConfigField "im.vector.app.features.VectorFeatures.LoginVersion", "LOGIN_VERSION", "im.vector.app.features.VectorFeatures.LoginVersion.V1"
|
||||||
buildConfigField "im.vector.app.features.VectorFeatures.NotificationSettingsVersion", "NOTIFICATION_SETTINGS_VERSION", "im.vector.app.features.VectorFeatures.NotificationSettingsVersion.V2"
|
|
||||||
|
|
||||||
buildConfigField "im.vector.app.features.crypto.keysrequest.OutboundSessionKeySharingStrategy", "outboundSessionKeySharingStrategy", "im.vector.app.features.crypto.keysrequest.OutboundSessionKeySharingStrategy.WhenTyping"
|
buildConfigField "im.vector.app.features.crypto.keysrequest.OutboundSessionKeySharingStrategy", "outboundSessionKeySharingStrategy", "im.vector.app.features.crypto.keysrequest.OutboundSessionKeySharingStrategy.WhenTyping"
|
||||||
|
|
||||||
@ -365,7 +364,7 @@ dependencies {
|
|||||||
implementation 'com.facebook.stetho:stetho:1.6.0'
|
implementation 'com.facebook.stetho:stetho:1.6.0'
|
||||||
|
|
||||||
// Phone number https://github.com/google/libphonenumber
|
// Phone number https://github.com/google/libphonenumber
|
||||||
implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.38'
|
implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.39'
|
||||||
|
|
||||||
// FlowBinding
|
// FlowBinding
|
||||||
implementation libs.github.flowBinding
|
implementation libs.github.flowBinding
|
||||||
|
@ -18,29 +18,19 @@ package im.vector.app.ui.robot.settings
|
|||||||
|
|
||||||
import androidx.test.espresso.Espresso.pressBack
|
import androidx.test.espresso.Espresso.pressBack
|
||||||
import com.adevinta.android.barista.interaction.BaristaClickInteractions.clickOn
|
import com.adevinta.android.barista.interaction.BaristaClickInteractions.clickOn
|
||||||
import im.vector.app.BuildConfig
|
|
||||||
import im.vector.app.R
|
import im.vector.app.R
|
||||||
import im.vector.app.espresso.tools.clickOnPreference
|
import im.vector.app.espresso.tools.clickOnPreference
|
||||||
import im.vector.app.features.VectorFeatures
|
|
||||||
|
|
||||||
class SettingsNotificationsRobot {
|
class SettingsNotificationsRobot {
|
||||||
|
|
||||||
fun crawl() {
|
fun crawl() {
|
||||||
when (BuildConfig.NOTIFICATION_SETTINGS_VERSION!!) {
|
clickOn(R.string.settings_notification_default)
|
||||||
VectorFeatures.NotificationSettingsVersion.V1 -> {
|
pressBack()
|
||||||
clickOn(R.string.settings_notification_advanced)
|
clickOn(R.string.settings_notification_mentions_and_keywords)
|
||||||
pressBack()
|
// TODO Test adding a keyword?
|
||||||
}
|
pressBack()
|
||||||
VectorFeatures.NotificationSettingsVersion.V2 -> {
|
clickOn(R.string.settings_notification_other)
|
||||||
clickOn(R.string.settings_notification_default)
|
pressBack()
|
||||||
pressBack()
|
|
||||||
clickOn(R.string.settings_notification_mentions_and_keywords)
|
|
||||||
// TODO Test adding a keyword?
|
|
||||||
pressBack()
|
|
||||||
clickOn(R.string.settings_notification_other)
|
|
||||||
pressBack()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
clickOn(R.string.settings_noisy_notifications_preferences)
|
clickOn(R.string.settings_noisy_notifications_preferences)
|
||||||
|
@ -20,7 +20,7 @@ import android.content.Context
|
|||||||
import android.content.res.ColorStateList
|
import android.content.res.ColorStateList
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import androidx.appcompat.widget.AppCompatImageView
|
import androidx.appcompat.widget.AppCompatImageView
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isInvisible
|
||||||
import im.vector.app.R
|
import im.vector.app.R
|
||||||
import im.vector.app.features.home.room.detail.timeline.item.SendStateDecoration
|
import im.vector.app.features.home.room.detail.timeline.item.SendStateDecoration
|
||||||
import im.vector.app.features.themes.ThemeUtils
|
import im.vector.app.features.themes.ThemeUtils
|
||||||
@ -38,28 +38,28 @@ class SendStateImageView @JvmOverloads constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun render(sendState: SendStateDecoration) {
|
fun render(sendState: SendStateDecoration) {
|
||||||
isVisible = when (sendState) {
|
isInvisible = when (sendState) {
|
||||||
SendStateDecoration.SENDING_NON_MEDIA -> {
|
SendStateDecoration.SENDING_NON_MEDIA -> {
|
||||||
setImageResource(R.drawable.ic_sending_message)
|
setImageResource(R.drawable.ic_sending_message)
|
||||||
imageTintList = ColorStateList.valueOf(ThemeUtils.getColor(context, R.attr.vctr_content_tertiary))
|
imageTintList = ColorStateList.valueOf(ThemeUtils.getColor(context, R.attr.vctr_content_tertiary))
|
||||||
contentDescription = context.getString(R.string.event_status_a11y_sending)
|
contentDescription = context.getString(R.string.event_status_a11y_sending)
|
||||||
true
|
false
|
||||||
}
|
}
|
||||||
SendStateDecoration.SENT -> {
|
SendStateDecoration.SENT -> {
|
||||||
setImageResource(R.drawable.ic_message_sent)
|
setImageResource(R.drawable.ic_message_sent)
|
||||||
imageTintList = ColorStateList.valueOf(ThemeUtils.getColor(context, R.attr.vctr_content_tertiary))
|
imageTintList = ColorStateList.valueOf(ThemeUtils.getColor(context, R.attr.vctr_content_tertiary))
|
||||||
contentDescription = context.getString(R.string.event_status_a11y_sent)
|
contentDescription = context.getString(R.string.event_status_a11y_sent)
|
||||||
true
|
false
|
||||||
}
|
}
|
||||||
SendStateDecoration.FAILED -> {
|
SendStateDecoration.FAILED -> {
|
||||||
setImageResource(R.drawable.ic_sending_message_failed)
|
setImageResource(R.drawable.ic_sending_message_failed)
|
||||||
imageTintList = null
|
imageTintList = null
|
||||||
contentDescription = context.getString(R.string.event_status_a11y_failed)
|
contentDescription = context.getString(R.string.event_status_a11y_failed)
|
||||||
true
|
false
|
||||||
}
|
}
|
||||||
SendStateDecoration.SENDING_MEDIA,
|
SendStateDecoration.SENDING_MEDIA,
|
||||||
SendStateDecoration.NONE -> {
|
SendStateDecoration.NONE -> {
|
||||||
false
|
true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,6 @@ import im.vector.app.BuildConfig
|
|||||||
interface VectorFeatures {
|
interface VectorFeatures {
|
||||||
|
|
||||||
fun loginVersion(): LoginVersion
|
fun loginVersion(): LoginVersion
|
||||||
fun notificationSettingsVersion(): NotificationSettingsVersion
|
|
||||||
|
|
||||||
enum class LoginVersion {
|
enum class LoginVersion {
|
||||||
V1,
|
V1,
|
||||||
@ -36,5 +35,4 @@ interface VectorFeatures {
|
|||||||
|
|
||||||
class DefaultVectorFeatures : VectorFeatures {
|
class DefaultVectorFeatures : VectorFeatures {
|
||||||
override fun loginVersion(): VectorFeatures.LoginVersion = BuildConfig.LOGIN_VERSION
|
override fun loginVersion(): VectorFeatures.LoginVersion = BuildConfig.LOGIN_VERSION
|
||||||
override fun notificationSettingsVersion(): VectorFeatures.NotificationSettingsVersion = BuildConfig.NOTIFICATION_SETTINGS_VERSION
|
|
||||||
}
|
}
|
||||||
|
@ -43,22 +43,12 @@ abstract class BaseEventItem<H : BaseEventItem.BaseHolder> : VectorEpoxyModel<H>
|
|||||||
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
|
@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
|
||||||
lateinit var dimensionConverter: DimensionConverter
|
lateinit var dimensionConverter: DimensionConverter
|
||||||
|
|
||||||
protected var ignoreSendStatusVisibility = false
|
|
||||||
|
|
||||||
@CallSuper
|
@CallSuper
|
||||||
override fun bind(holder: H) {
|
override fun bind(holder: H) {
|
||||||
super.bind(holder)
|
super.bind(holder)
|
||||||
holder.leftGuideline.updateLayoutParams<RelativeLayout.LayoutParams> {
|
holder.leftGuideline.updateLayoutParams<RelativeLayout.LayoutParams> {
|
||||||
this.marginStart = leftGuideline
|
this.marginStart = leftGuideline
|
||||||
}
|
}
|
||||||
// Ignore visibility of the send status icon?
|
|
||||||
holder.contentContainer.updateLayoutParams<RelativeLayout.LayoutParams> {
|
|
||||||
if (ignoreSendStatusVisibility) {
|
|
||||||
addRule(RelativeLayout.ALIGN_PARENT_END)
|
|
||||||
} else {
|
|
||||||
removeRule(RelativeLayout.ALIGN_PARENT_END)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
holder.checkableBackground.isChecked = highlighted
|
holder.checkableBackground.isChecked = highlighted
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,10 +33,6 @@ import im.vector.app.features.home.room.detail.timeline.helper.VoiceMessagePlayb
|
|||||||
@EpoxyModelClass(layout = R.layout.item_timeline_event_base)
|
@EpoxyModelClass(layout = R.layout.item_timeline_event_base)
|
||||||
abstract class MessageVoiceItem : AbsMessageItem<MessageVoiceItem.Holder>() {
|
abstract class MessageVoiceItem : AbsMessageItem<MessageVoiceItem.Holder>() {
|
||||||
|
|
||||||
init {
|
|
||||||
ignoreSendStatusVisibility = true
|
|
||||||
}
|
|
||||||
|
|
||||||
@EpoxyAttribute
|
@EpoxyAttribute
|
||||||
var mxcUrl: String = ""
|
var mxcUrl: String = ""
|
||||||
|
|
||||||
|
@ -19,13 +19,14 @@ package im.vector.app.features.home.room.detail.timeline.url
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
|
import com.google.android.material.card.MaterialCardView
|
||||||
import im.vector.app.R
|
import im.vector.app.R
|
||||||
import im.vector.app.core.extensions.setTextOrHide
|
import im.vector.app.core.extensions.setTextOrHide
|
||||||
import im.vector.app.databinding.ViewUrlPreviewBinding
|
import im.vector.app.databinding.ViewUrlPreviewBinding
|
||||||
import im.vector.app.features.home.room.detail.timeline.TimelineEventController
|
import im.vector.app.features.home.room.detail.timeline.TimelineEventController
|
||||||
import im.vector.app.features.media.ImageContentRenderer
|
import im.vector.app.features.media.ImageContentRenderer
|
||||||
|
import im.vector.app.features.themes.ThemeUtils
|
||||||
import org.matrix.android.sdk.api.extensions.orFalse
|
import org.matrix.android.sdk.api.extensions.orFalse
|
||||||
import org.matrix.android.sdk.api.session.media.PreviewUrlData
|
import org.matrix.android.sdk.api.session.media.PreviewUrlData
|
||||||
|
|
||||||
@ -36,7 +37,7 @@ class PreviewUrlView @JvmOverloads constructor(
|
|||||||
context: Context,
|
context: Context,
|
||||||
attrs: AttributeSet? = null,
|
attrs: AttributeSet? = null,
|
||||||
defStyleAttr: Int = 0
|
defStyleAttr: Int = 0
|
||||||
) : ConstraintLayout(context, attrs, defStyleAttr), View.OnClickListener {
|
) : MaterialCardView(context, attrs, defStyleAttr), View.OnClickListener {
|
||||||
|
|
||||||
private lateinit var views: ViewUrlPreviewBinding
|
private lateinit var views: ViewUrlPreviewBinding
|
||||||
|
|
||||||
@ -44,6 +45,9 @@ class PreviewUrlView @JvmOverloads constructor(
|
|||||||
|
|
||||||
init {
|
init {
|
||||||
setupView()
|
setupView()
|
||||||
|
radius = resources.getDimensionPixelSize(R.dimen.preview_url_view_corner_radius).toFloat()
|
||||||
|
cardElevation = 0f
|
||||||
|
setCardBackgroundColor(ThemeUtils.getColor(context, R.attr.vctr_system))
|
||||||
}
|
}
|
||||||
|
|
||||||
private var state: PreviewUrlUiState = PreviewUrlUiState.Unknown
|
private var state: PreviewUrlUiState = PreviewUrlUiState.Unknown
|
||||||
@ -121,9 +125,15 @@ class PreviewUrlView @JvmOverloads constructor(
|
|||||||
|
|
||||||
private fun renderData(previewUrlData: PreviewUrlData, imageContentRenderer: ImageContentRenderer) {
|
private fun renderData(previewUrlData: PreviewUrlData, imageContentRenderer: ImageContentRenderer) {
|
||||||
isVisible = true
|
isVisible = true
|
||||||
|
|
||||||
views.urlPreviewTitle.setTextOrHide(previewUrlData.title)
|
views.urlPreviewTitle.setTextOrHide(previewUrlData.title)
|
||||||
views.urlPreviewImage.isVisible = previewUrlData.mxcUrl?.let { imageContentRenderer.render(it, views.urlPreviewImage) }.orFalse()
|
views.urlPreviewImage.isVisible = previewUrlData.mxcUrl?.let { imageContentRenderer.render(it, views.urlPreviewImage) }.orFalse()
|
||||||
views.urlPreviewDescription.setTextOrHide(previewUrlData.description)
|
views.urlPreviewDescription.setTextOrHide(previewUrlData.description)
|
||||||
|
views.urlPreviewDescription.maxLines = when {
|
||||||
|
previewUrlData.mxcUrl != null -> 2
|
||||||
|
previewUrlData.title != null -> 3
|
||||||
|
else -> 5
|
||||||
|
}
|
||||||
views.urlPreviewSite.setTextOrHide(previewUrlData.siteName.takeIf { it != previewUrlData.title })
|
views.urlPreviewSite.setTextOrHide(previewUrlData.siteName.takeIf { it != previewUrlData.title })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,6 @@ import im.vector.app.core.resources.UserPreferencesProvider
|
|||||||
import im.vector.app.databinding.FragmentRoomListBinding
|
import im.vector.app.databinding.FragmentRoomListBinding
|
||||||
import im.vector.app.features.home.RoomListDisplayMode
|
import im.vector.app.features.home.RoomListDisplayMode
|
||||||
import im.vector.app.features.home.room.filtered.FilteredRoomFooterItem
|
import im.vector.app.features.home.room.filtered.FilteredRoomFooterItem
|
||||||
import im.vector.app.features.home.room.list.actions.RoomListActionsArgs
|
|
||||||
import im.vector.app.features.home.room.list.actions.RoomListQuickActionsBottomSheet
|
import im.vector.app.features.home.room.list.actions.RoomListQuickActionsBottomSheet
|
||||||
import im.vector.app.features.home.room.list.actions.RoomListQuickActionsSharedAction
|
import im.vector.app.features.home.room.list.actions.RoomListQuickActionsSharedAction
|
||||||
import im.vector.app.features.home.room.list.actions.RoomListQuickActionsSharedActionViewModel
|
import im.vector.app.features.home.room.list.actions.RoomListQuickActionsSharedActionViewModel
|
||||||
@ -476,7 +475,7 @@ class RoomListFragment @Inject constructor(
|
|||||||
footerController.setData(it)
|
footerController.setData(it)
|
||||||
}
|
}
|
||||||
RoomListQuickActionsBottomSheet
|
RoomListQuickActionsBottomSheet
|
||||||
.newInstance(room.roomId, RoomListActionsArgs.Mode.FULL)
|
.newInstance(room.roomId)
|
||||||
.show(childFragmentManager, "ROOM_LIST_QUICK_ACTIONS")
|
.show(childFragmentManager, "ROOM_LIST_QUICK_ACTIONS")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -43,15 +43,8 @@ import javax.inject.Inject
|
|||||||
|
|
||||||
@Parcelize
|
@Parcelize
|
||||||
data class RoomListActionsArgs(
|
data class RoomListActionsArgs(
|
||||||
val roomId: String,
|
val roomId: String
|
||||||
val mode: Mode
|
) : Parcelable
|
||||||
) : Parcelable {
|
|
||||||
|
|
||||||
enum class Mode {
|
|
||||||
FULL,
|
|
||||||
NOTIFICATIONS
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bottom sheet fragment that shows room information with list of contextual actions
|
* Bottom sheet fragment that shows room information with list of contextual actions
|
||||||
@ -124,9 +117,9 @@ class RoomListQuickActionsBottomSheet :
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun newInstance(roomId: String, mode: RoomListActionsArgs.Mode): RoomListQuickActionsBottomSheet {
|
fun newInstance(roomId: String): RoomListQuickActionsBottomSheet {
|
||||||
return RoomListQuickActionsBottomSheet().apply {
|
return RoomListQuickActionsBottomSheet().apply {
|
||||||
setArguments(RoomListActionsArgs(roomId, mode))
|
setArguments(RoomListActionsArgs(roomId))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,6 @@ import im.vector.app.core.epoxy.bottomsheet.bottomSheetRoomPreviewItem
|
|||||||
import im.vector.app.core.epoxy.profiles.notifications.radioButtonItem
|
import im.vector.app.core.epoxy.profiles.notifications.radioButtonItem
|
||||||
import im.vector.app.core.resources.ColorProvider
|
import im.vector.app.core.resources.ColorProvider
|
||||||
import im.vector.app.core.resources.StringProvider
|
import im.vector.app.core.resources.StringProvider
|
||||||
import im.vector.app.features.VectorFeatures
|
|
||||||
import im.vector.app.features.home.AvatarRenderer
|
import im.vector.app.features.home.AvatarRenderer
|
||||||
import im.vector.app.features.roomprofile.notifications.notificationOptions
|
import im.vector.app.features.roomprofile.notifications.notificationOptions
|
||||||
import im.vector.app.features.roomprofile.notifications.notificationStateMapped
|
import im.vector.app.features.roomprofile.notifications.notificationStateMapped
|
||||||
@ -39,7 +38,6 @@ class RoomListQuickActionsEpoxyController @Inject constructor(
|
|||||||
private val avatarRenderer: AvatarRenderer,
|
private val avatarRenderer: AvatarRenderer,
|
||||||
private val colorProvider: ColorProvider,
|
private val colorProvider: ColorProvider,
|
||||||
private val stringProvider: StringProvider,
|
private val stringProvider: StringProvider,
|
||||||
private val features: VectorFeatures
|
|
||||||
) : TypedEpoxyController<RoomListQuickActionViewState>() {
|
) : TypedEpoxyController<RoomListQuickActionViewState>() {
|
||||||
|
|
||||||
var listener: Listener? = null
|
var listener: Listener? = null
|
||||||
@ -48,54 +46,38 @@ class RoomListQuickActionsEpoxyController @Inject constructor(
|
|||||||
val notificationViewState = state.notificationSettingsViewState
|
val notificationViewState = state.notificationSettingsViewState
|
||||||
val roomSummary = notificationViewState.roomSummary() ?: return
|
val roomSummary = notificationViewState.roomSummary() ?: return
|
||||||
val host = this
|
val host = this
|
||||||
val isV2 = features.notificationSettingsVersion() == VectorFeatures.NotificationSettingsVersion.V2
|
// Preview, favorite, settings
|
||||||
// V2 always shows full details as we no longer display the sheet from RoomProfile > Notifications
|
bottomSheetRoomPreviewItem {
|
||||||
val showFull = state.roomListActionsArgs.mode == RoomListActionsArgs.Mode.FULL || isV2
|
id("room_preview")
|
||||||
|
avatarRenderer(host.avatarRenderer)
|
||||||
if (showFull) {
|
matrixItem(roomSummary.toMatrixItem())
|
||||||
// Preview, favorite, settings
|
stringProvider(host.stringProvider)
|
||||||
bottomSheetRoomPreviewItem {
|
colorProvider(host.colorProvider)
|
||||||
id("room_preview")
|
izLowPriority(roomSummary.isLowPriority)
|
||||||
avatarRenderer(host.avatarRenderer)
|
izFavorite(roomSummary.isFavorite)
|
||||||
matrixItem(roomSummary.toMatrixItem())
|
settingsClickListener { host.listener?.didSelectMenuAction(RoomListQuickActionsSharedAction.Settings(roomSummary.roomId)) }
|
||||||
stringProvider(host.stringProvider)
|
favoriteClickListener { host.listener?.didSelectMenuAction(RoomListQuickActionsSharedAction.Favorite(roomSummary.roomId)) }
|
||||||
colorProvider(host.colorProvider)
|
lowPriorityClickListener { host.listener?.didSelectMenuAction(RoomListQuickActionsSharedAction.LowPriority(roomSummary.roomId)) }
|
||||||
izLowPriority(roomSummary.isLowPriority)
|
|
||||||
izFavorite(roomSummary.isFavorite)
|
|
||||||
settingsClickListener { host.listener?.didSelectMenuAction(RoomListQuickActionsSharedAction.Settings(roomSummary.roomId)) }
|
|
||||||
favoriteClickListener { host.listener?.didSelectMenuAction(RoomListQuickActionsSharedAction.Favorite(roomSummary.roomId)) }
|
|
||||||
lowPriorityClickListener { host.listener?.didSelectMenuAction(RoomListQuickActionsSharedAction.LowPriority(roomSummary.roomId)) }
|
|
||||||
}
|
|
||||||
|
|
||||||
// Notifications
|
|
||||||
bottomSheetDividerItem {
|
|
||||||
id("notifications_separator")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isV2) {
|
// Notifications
|
||||||
notificationViewState.notificationOptions.forEach { notificationState ->
|
bottomSheetDividerItem {
|
||||||
val title = titleForNotificationState(notificationState)
|
id("notifications_separator")
|
||||||
radioButtonItem {
|
}
|
||||||
id(notificationState.name)
|
|
||||||
titleRes(title)
|
notificationViewState.notificationOptions.forEach { notificationState ->
|
||||||
selected(notificationViewState.notificationStateMapped() == notificationState)
|
val title = titleForNotificationState(notificationState)
|
||||||
listener {
|
radioButtonItem {
|
||||||
host.listener?.didSelectRoomNotificationState(notificationState)
|
id(notificationState.name)
|
||||||
}
|
titleRes(title)
|
||||||
|
selected(notificationViewState.notificationStateMapped() == notificationState)
|
||||||
|
listener {
|
||||||
|
host.listener?.didSelectRoomNotificationState(notificationState)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
val selectedRoomState = notificationViewState.notificationState()
|
|
||||||
RoomListQuickActionsSharedAction.NotificationsAllNoisy(roomSummary.roomId).toBottomSheetItem(0, selectedRoomState)
|
|
||||||
RoomListQuickActionsSharedAction.NotificationsAll(roomSummary.roomId).toBottomSheetItem(1, selectedRoomState)
|
|
||||||
RoomListQuickActionsSharedAction.NotificationsMentionsOnly(roomSummary.roomId).toBottomSheetItem(2, selectedRoomState)
|
|
||||||
RoomListQuickActionsSharedAction.NotificationsMute(roomSummary.roomId).toBottomSheetItem(3, selectedRoomState)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showFull) {
|
RoomListQuickActionsSharedAction.Leave(roomSummary.roomId, showIcon = !true).toBottomSheetItem()
|
||||||
RoomListQuickActionsSharedAction.Leave(roomSummary.roomId, showIcon = !isV2).toBottomSheetItem(5)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@StringRes
|
@StringRes
|
||||||
@ -106,18 +88,11 @@ class RoomListQuickActionsEpoxyController @Inject constructor(
|
|||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun RoomListQuickActionsSharedAction.toBottomSheetItem(index: Int, roomNotificationState: RoomNotificationState? = null) {
|
private fun RoomListQuickActionsSharedAction.Leave.toBottomSheetItem() {
|
||||||
val host = this@RoomListQuickActionsEpoxyController
|
val host = this@RoomListQuickActionsEpoxyController
|
||||||
val selected = when (this) {
|
|
||||||
is RoomListQuickActionsSharedAction.NotificationsAllNoisy -> roomNotificationState == RoomNotificationState.ALL_MESSAGES_NOISY
|
|
||||||
is RoomListQuickActionsSharedAction.NotificationsAll -> roomNotificationState == RoomNotificationState.ALL_MESSAGES
|
|
||||||
is RoomListQuickActionsSharedAction.NotificationsMentionsOnly -> roomNotificationState == RoomNotificationState.MENTIONS_ONLY
|
|
||||||
is RoomListQuickActionsSharedAction.NotificationsMute -> roomNotificationState == RoomNotificationState.MUTE
|
|
||||||
else -> false
|
|
||||||
}
|
|
||||||
return bottomSheetActionItem {
|
return bottomSheetActionItem {
|
||||||
id("action_$index")
|
id("action_leave")
|
||||||
selected(selected)
|
selected(false)
|
||||||
if (iconResId != null) {
|
if (iconResId != null) {
|
||||||
iconRes(iconResId)
|
iconRes(iconResId)
|
||||||
} else {
|
} else {
|
||||||
|
@ -44,13 +44,10 @@ import im.vector.app.core.utils.copyToClipboard
|
|||||||
import im.vector.app.core.utils.startSharePlainTextIntent
|
import im.vector.app.core.utils.startSharePlainTextIntent
|
||||||
import im.vector.app.databinding.FragmentMatrixProfileBinding
|
import im.vector.app.databinding.FragmentMatrixProfileBinding
|
||||||
import im.vector.app.databinding.ViewStubRoomProfileHeaderBinding
|
import im.vector.app.databinding.ViewStubRoomProfileHeaderBinding
|
||||||
import im.vector.app.features.VectorFeatures
|
|
||||||
import im.vector.app.features.home.AvatarRenderer
|
import im.vector.app.features.home.AvatarRenderer
|
||||||
import im.vector.app.features.home.room.detail.RoomDetailPendingAction
|
import im.vector.app.features.home.room.detail.RoomDetailPendingAction
|
||||||
import im.vector.app.features.home.room.detail.RoomDetailPendingActionStore
|
import im.vector.app.features.home.room.detail.RoomDetailPendingActionStore
|
||||||
import im.vector.app.features.home.room.detail.upgrade.MigrateRoomBottomSheet
|
import im.vector.app.features.home.room.detail.upgrade.MigrateRoomBottomSheet
|
||||||
import im.vector.app.features.home.room.list.actions.RoomListActionsArgs
|
|
||||||
import im.vector.app.features.home.room.list.actions.RoomListQuickActionsBottomSheet
|
|
||||||
import im.vector.app.features.home.room.list.actions.RoomListQuickActionsSharedAction
|
import im.vector.app.features.home.room.list.actions.RoomListQuickActionsSharedAction
|
||||||
import im.vector.app.features.home.room.list.actions.RoomListQuickActionsSharedActionViewModel
|
import im.vector.app.features.home.room.list.actions.RoomListQuickActionsSharedActionViewModel
|
||||||
import kotlinx.coroutines.flow.launchIn
|
import kotlinx.coroutines.flow.launchIn
|
||||||
@ -69,8 +66,7 @@ data class RoomProfileArgs(
|
|||||||
class RoomProfileFragment @Inject constructor(
|
class RoomProfileFragment @Inject constructor(
|
||||||
private val roomProfileController: RoomProfileController,
|
private val roomProfileController: RoomProfileController,
|
||||||
private val avatarRenderer: AvatarRenderer,
|
private val avatarRenderer: AvatarRenderer,
|
||||||
private val roomDetailPendingActionStore: RoomDetailPendingActionStore,
|
private val roomDetailPendingActionStore: RoomDetailPendingActionStore
|
||||||
private val features: VectorFeatures
|
|
||||||
) :
|
) :
|
||||||
VectorBaseFragment<FragmentMatrixProfileBinding>(),
|
VectorBaseFragment<FragmentMatrixProfileBinding>(),
|
||||||
RoomProfileController.Callback {
|
RoomProfileController.Callback {
|
||||||
@ -259,16 +255,7 @@ class RoomProfileFragment @Inject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onNotificationsClicked() {
|
override fun onNotificationsClicked() {
|
||||||
when (features.notificationSettingsVersion()) {
|
roomProfileSharedActionViewModel.post(RoomProfileSharedAction.OpenRoomNotificationSettings)
|
||||||
VectorFeatures.NotificationSettingsVersion.V1 -> {
|
|
||||||
RoomListQuickActionsBottomSheet
|
|
||||||
.newInstance(roomProfileArgs.roomId, RoomListActionsArgs.Mode.NOTIFICATIONS)
|
|
||||||
.show(childFragmentManager, "ROOM_PROFILE_NOTIFICATIONS")
|
|
||||||
}
|
|
||||||
VectorFeatures.NotificationSettingsVersion.V2 -> {
|
|
||||||
roomProfileSharedActionViewModel.post(RoomProfileSharedAction.OpenRoomNotificationSettings)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onUploadsClicked() {
|
override fun onUploadsClicked() {
|
||||||
|
@ -46,10 +46,6 @@ class VectorPreferences @Inject constructor(private val context: Context) {
|
|||||||
const val SETTINGS_PRIVACY_POLICY_PREFERENCE_KEY = "SETTINGS_PRIVACY_POLICY_PREFERENCE_KEY"
|
const val SETTINGS_PRIVACY_POLICY_PREFERENCE_KEY = "SETTINGS_PRIVACY_POLICY_PREFERENCE_KEY"
|
||||||
const val SETTINGS_DISCOVERY_PREFERENCE_KEY = "SETTINGS_DISCOVERY_PREFERENCE_KEY"
|
const val SETTINGS_DISCOVERY_PREFERENCE_KEY = "SETTINGS_DISCOVERY_PREFERENCE_KEY"
|
||||||
|
|
||||||
const val SETTINGS_NOTIFICATION_ADVANCED_PREFERENCE_KEY = "SETTINGS_NOTIFICATION_ADVANCED_PREFERENCE_KEY"
|
|
||||||
const val SETTINGS_NOTIFICATION_DEFAULT_PREFERENCE_KEY = "SETTINGS_NOTIFICATION_DEFAULT_PREFERENCE_KEY"
|
|
||||||
const val SETTINGS_NOTIFICATION_KEYWORD_AND_MENTIONS_PREFERENCE_KEY = "SETTINGS_NOTIFICATION_KEYWORD_AND_MENTIONS_PREFERENCE_KEY"
|
|
||||||
const val SETTINGS_NOTIFICATION_OTHER_PREFERENCE_KEY = "SETTINGS_NOTIFICATION_OTHER_PREFERENCE_KEY"
|
|
||||||
const val SETTINGS_THIRD_PARTY_NOTICES_PREFERENCE_KEY = "SETTINGS_THIRD_PARTY_NOTICES_PREFERENCE_KEY"
|
const val SETTINGS_THIRD_PARTY_NOTICES_PREFERENCE_KEY = "SETTINGS_THIRD_PARTY_NOTICES_PREFERENCE_KEY"
|
||||||
const val SETTINGS_OTHER_THIRD_PARTY_NOTICES_PREFERENCE_KEY = "SETTINGS_OTHER_THIRD_PARTY_NOTICES_PREFERENCE_KEY"
|
const val SETTINGS_OTHER_THIRD_PARTY_NOTICES_PREFERENCE_KEY = "SETTINGS_OTHER_THIRD_PARTY_NOTICES_PREFERENCE_KEY"
|
||||||
const val SETTINGS_COPYRIGHT_PREFERENCE_KEY = "SETTINGS_COPYRIGHT_PREFERENCE_KEY"
|
const val SETTINGS_COPYRIGHT_PREFERENCE_KEY = "SETTINGS_COPYRIGHT_PREFERENCE_KEY"
|
||||||
|
@ -40,7 +40,6 @@ import im.vector.app.core.pushers.PushersManager
|
|||||||
import im.vector.app.core.services.GuardServiceStarter
|
import im.vector.app.core.services.GuardServiceStarter
|
||||||
import im.vector.app.core.utils.isIgnoringBatteryOptimizations
|
import im.vector.app.core.utils.isIgnoringBatteryOptimizations
|
||||||
import im.vector.app.core.utils.requestDisablingBatteryOptimization
|
import im.vector.app.core.utils.requestDisablingBatteryOptimization
|
||||||
import im.vector.app.features.VectorFeatures
|
|
||||||
import im.vector.app.features.notifications.NotificationUtils
|
import im.vector.app.features.notifications.NotificationUtils
|
||||||
import im.vector.app.features.settings.BackgroundSyncMode
|
import im.vector.app.features.settings.BackgroundSyncMode
|
||||||
import im.vector.app.features.settings.BackgroundSyncModeChooserDialog
|
import im.vector.app.features.settings.BackgroundSyncModeChooserDialog
|
||||||
@ -64,8 +63,7 @@ class VectorSettingsNotificationPreferenceFragment @Inject constructor(
|
|||||||
private val pushManager: PushersManager,
|
private val pushManager: PushersManager,
|
||||||
private val activeSessionHolder: ActiveSessionHolder,
|
private val activeSessionHolder: ActiveSessionHolder,
|
||||||
private val vectorPreferences: VectorPreferences,
|
private val vectorPreferences: VectorPreferences,
|
||||||
private val guardServiceStarter: GuardServiceStarter,
|
private val guardServiceStarter: GuardServiceStarter
|
||||||
private val features: VectorFeatures
|
|
||||||
) : VectorSettingsBaseFragment(),
|
) : VectorSettingsBaseFragment(),
|
||||||
BackgroundSyncModeChooserDialog.InteractionListener {
|
BackgroundSyncModeChooserDialog.InteractionListener {
|
||||||
|
|
||||||
@ -147,7 +145,6 @@ class VectorSettingsNotificationPreferenceFragment @Inject constructor(
|
|||||||
refreshBackgroundSyncPrefs()
|
refreshBackgroundSyncPrefs()
|
||||||
|
|
||||||
handleSystemPreference()
|
handleSystemPreference()
|
||||||
handleVersionedSettings()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun bindEmailNotifications() {
|
private fun bindEmailNotifications() {
|
||||||
@ -312,15 +309,6 @@ class VectorSettingsNotificationPreferenceFragment @Inject constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handleVersionedSettings() {
|
|
||||||
val isNotificationSettingsV2Enabled = features.notificationSettingsVersion() == VectorFeatures.NotificationSettingsVersion.V2
|
|
||||||
|
|
||||||
findPreference<Preference>(VectorPreferences.SETTINGS_NOTIFICATION_ADVANCED_PREFERENCE_KEY)?.isVisible = !isNotificationSettingsV2Enabled
|
|
||||||
findPreference<Preference>(VectorPreferences.SETTINGS_NOTIFICATION_DEFAULT_PREFERENCE_KEY)?.isVisible = isNotificationSettingsV2Enabled
|
|
||||||
findPreference<Preference>(VectorPreferences.SETTINGS_NOTIFICATION_KEYWORD_AND_MENTIONS_PREFERENCE_KEY)?.isVisible = isNotificationSettingsV2Enabled
|
|
||||||
findPreference<Preference>(VectorPreferences.SETTINGS_NOTIFICATION_OTHER_PREFERENCE_KEY)?.isVisible = isNotificationSettingsV2Enabled
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
activeSessionHolder.getSafeActiveSession()?.refreshPushers()
|
activeSessionHolder.getSafeActiveSession()?.refreshPushers()
|
||||||
|
23
vector/src/main/res/drawable/ic_close_with_circular_bg.xml
Normal file
23
vector/src/main/res/drawable/ic_close_with_circular_bg.xml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillAlpha="0.9"
|
||||||
|
android:fillColor="?vctr_content_quinary"
|
||||||
|
android:pathData="M24,12C24,18.6274 18.6274,24 12,24C5.3726,24 0,18.6274 0,12C0,5.3726 5.3726,0 12,0C18.6274,0 24,5.3726 24,12Z"
|
||||||
|
android:strokeAlpha="0.9" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M7.9998,7.9998L15.9998,15.9998"
|
||||||
|
android:strokeWidth="1.33333"
|
||||||
|
android:strokeColor="?vctr_content_secondary"
|
||||||
|
android:strokeLineCap="round" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M16.0005,7.9998L8.0006,15.9998"
|
||||||
|
android:strokeWidth="1.33333"
|
||||||
|
android:strokeColor="?vctr_content_secondary"
|
||||||
|
android:strokeLineCap="round" />
|
||||||
|
</vector>
|
@ -80,6 +80,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/messageMemberNameView"
|
android:layout_below="@id/messageMemberNameView"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
android:layout_toStartOf="@id/messageSendStateImageView"
|
android:layout_toStartOf="@id/messageSendStateImageView"
|
||||||
android:layout_toEndOf="@id/messageStartGuideline"
|
android:layout_toEndOf="@id/messageStartGuideline"
|
||||||
android:addStatesFromChildren="true">
|
android:addStatesFromChildren="true">
|
||||||
@ -115,21 +116,18 @@
|
|||||||
android:id="@+id/messageContentRedactedStub"
|
android:id="@+id/messageContentRedactedStub"
|
||||||
style="@style/TimelineContentStubBaseParams"
|
style="@style/TimelineContentStubBaseParams"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="56dp"
|
|
||||||
android:layout="@layout/item_timeline_event_redacted_stub" />
|
android:layout="@layout/item_timeline_event_redacted_stub" />
|
||||||
|
|
||||||
<ViewStub
|
<ViewStub
|
||||||
android:id="@+id/messageContentVoiceStub"
|
android:id="@+id/messageContentVoiceStub"
|
||||||
style="@style/TimelineContentStubBaseParams"
|
style="@style/TimelineContentStubBaseParams"
|
||||||
android:layout_marginEnd="56dp"
|
|
||||||
android:layout="@layout/item_timeline_event_voice_stub"
|
android:layout="@layout/item_timeline_event_voice_stub"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<ViewStub
|
<ViewStub
|
||||||
android:id="@+id/messageContentPollStub"
|
android:id="@+id/messageContentPollStub"
|
||||||
style="@style/TimelineContentStubBaseParams"
|
style="@style/TimelineContentStubBaseParams"
|
||||||
android:layout="@layout/item_timeline_event_poll"
|
android:layout="@layout/item_timeline_event_poll"/>
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
@ -144,7 +142,7 @@
|
|||||||
android:layout_marginBottom="4dp"
|
android:layout_marginBottom="4dp"
|
||||||
android:contentDescription="@string/event_status_a11y_sending"
|
android:contentDescription="@string/event_status_a11y_sending"
|
||||||
android:src="@drawable/ic_sending_message"
|
android:src="@drawable/ic_sending_message"
|
||||||
android:visibility="gone"
|
android:visibility="invisible"
|
||||||
tools:tint="?vctr_content_tertiary"
|
tools:tint="?vctr_content_tertiary"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
<im.vector.app.features.home.room.detail.timeline.url.PreviewUrlView
|
<im.vector.app.features.home.room.detail.timeline.url.PreviewUrlView
|
||||||
android:id="@+id/messageUrlPreview"
|
android:id="@+id/messageUrlPreview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginBottom="4dp"
|
android:layout_marginBottom="4dp"
|
||||||
|
@ -1,89 +1,77 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
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/informationUrlPreviewContainer"
|
android:id="@+id/informationUrlPreviewContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
|
tools:parentTag="com.google.android.material.card.MaterialCardView">
|
||||||
|
|
||||||
<View
|
<LinearLayout
|
||||||
android:id="@+id/url_preview_left_border"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="2dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:background="?vctr_content_tertiary"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/url_preview_title"
|
|
||||||
style="@style/Widget.Vector.TextView.Body"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="7dp"
|
android:orientation="vertical">
|
||||||
android:ellipsize="end"
|
|
||||||
android:maxLines="2"
|
|
||||||
android:textColor="?vctr_content_primary"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/url_preview_close"
|
|
||||||
app:layout_constraintStart_toStartOf="@id/url_preview_left_border"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:text="Jo Malone denounces her former brand's John Boyega decision" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/url_preview_image"
|
android:id="@+id/url_preview_image"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="157dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:adjustViewBounds="true"
|
||||||
android:importantForAccessibility="no"
|
android:importantForAccessibility="no"
|
||||||
android:scaleType="fitStart"
|
android:maxHeight="200dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:scaleType="fitXY"
|
||||||
app:layout_constraintStart_toStartOf="@id/url_preview_title"
|
tools:src="@tools:sample/backgrounds/scenic" />
|
||||||
app:layout_constraintTop_toBottomOf="@id/url_preview_title"
|
|
||||||
tools:src="@tools:sample/backgrounds/scenic" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/url_preview_description"
|
android:id="@+id/url_preview_site"
|
||||||
style="@style/Widget.Vector.TextView.Body"
|
style="@style/Widget.Vector.TextView.Caption"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="7dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="6dp"
|
||||||
android:ellipsize="end"
|
android:layout_marginEnd="8dp"
|
||||||
android:maxLines="4"
|
android:ellipsize="end"
|
||||||
android:textColor="?vctr_content_secondary"
|
android:maxLines="1"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:singleLine="true"
|
||||||
app:layout_constraintStart_toStartOf="@id/url_preview_left_border"
|
android:textColor="?vctr_content_secondary"
|
||||||
app:layout_constraintTop_toBottomOf="@id/url_preview_image"
|
tools:text="BBC News" />
|
||||||
tools:text="The British perfumer says removing actor John Boyega from his own advert was “utterly despicable”." />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/url_preview_site"
|
android:id="@+id/url_preview_title"
|
||||||
style="@style/Widget.Vector.TextView.Body"
|
style="@style/Widget.Vector.TextView.Body.Medium"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="7dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:ellipsize="end"
|
android:layout_marginEnd="@dimen/layout_touch_size"
|
||||||
android:maxLines="1"
|
android:ellipsize="end"
|
||||||
android:singleLine="true"
|
android:maxLines="2"
|
||||||
android:textColor="?vctr_content_tertiary"
|
android:textColor="?vctr_content_primary"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:textStyle="bold"
|
||||||
app:layout_constraintStart_toStartOf="@id/url_preview_left_border"
|
tools:text="Jo Malone denounces her former brand's John Boyega decision" />
|
||||||
app:layout_constraintTop_toBottomOf="@id/url_preview_description"
|
|
||||||
tools:text="BBC News" />
|
<TextView
|
||||||
|
android:id="@+id/url_preview_description"
|
||||||
|
style="@style/Widget.Vector.TextView.Body"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:textColor="?vctr_content_secondary"
|
||||||
|
tools:text="The British perfumer says removing actor John Boyega from his own advert was “utterly despicable”." />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/url_preview_close"
|
android:id="@+id/url_preview_close"
|
||||||
android:layout_width="@dimen/layout_touch_size"
|
android:layout_width="@dimen/layout_touch_size"
|
||||||
android:layout_height="@dimen/layout_touch_size"
|
android:layout_height="@dimen/layout_touch_size"
|
||||||
|
android:layout_gravity="top|end"
|
||||||
android:contentDescription="@string/action_close"
|
android:contentDescription="@string/action_close"
|
||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
android:src="@drawable/ic_close_24dp"
|
android:src="@drawable/ic_close_with_circular_bg"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:tint="?vctr_content_secondary"
|
|
||||||
tools:ignore="MissingPrefix" />
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
</merge>
|
</merge>
|
@ -20,14 +20,6 @@
|
|||||||
<!--android:key="SETTINGS_TURN_SCREEN_ON_PREFERENCE_KEY"-->
|
<!--android:key="SETTINGS_TURN_SCREEN_ON_PREFERENCE_KEY"-->
|
||||||
<!--android:title="@string/settings_turn_screen_on" />-->
|
<!--android:title="@string/settings_turn_screen_on" />-->
|
||||||
|
|
||||||
<im.vector.app.core.preference.VectorPreference
|
|
||||||
android:dependency="SETTINGS_ENABLE_THIS_DEVICE_PREFERENCE_KEY"
|
|
||||||
android:key="SETTINGS_NOTIFICATION_ADVANCED_PREFERENCE_KEY"
|
|
||||||
android:persistent="false"
|
|
||||||
android:summary="@string/settings_notification_advanced_summary"
|
|
||||||
android:title="@string/settings_notification_advanced"
|
|
||||||
app:fragment="im.vector.app.features.settings.notifications.VectorSettingsAdvancedNotificationPreferenceFragment" />
|
|
||||||
|
|
||||||
<im.vector.app.core.preference.VectorPreference
|
<im.vector.app.core.preference.VectorPreference
|
||||||
android:dependency="SETTINGS_ENABLE_THIS_DEVICE_PREFERENCE_KEY"
|
android:dependency="SETTINGS_ENABLE_THIS_DEVICE_PREFERENCE_KEY"
|
||||||
android:key="SETTINGS_NOTIFICATION_DEFAULT_PREFERENCE_KEY"
|
android:key="SETTINGS_NOTIFICATION_DEFAULT_PREFERENCE_KEY"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user