Merge pull request #6369 from vector-im/johannes/expose-profile-tag

Expose pusher profile tag in advanced settings
This commit is contained in:
Johannes Marbach 2022-06-27 13:33:36 +02:00 committed by GitHub
commit c3ae0c2251
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 6 deletions

2
changelog.d/6369.feature Normal file
View file

@ -0,0 +1,2 @@
Expose pusher profile tag in advanced settings

View file

@ -48,6 +48,7 @@ abstract class PushGatewayItem : EpoxyModelWithHolder<PushGatewayItem.Holder>()
holder.appName.text = pusher.appDisplayName
holder.url.setTextOrHide(pusher.data.url, hideWhenBlank = true, holder.urlTitle)
holder.format.setTextOrHide(pusher.data.format, hideWhenBlank = true, holder.formatTitle)
holder.profileTag.setTextOrHide(pusher.profileTag, hideWhenBlank = true, holder.profileTagTitle)
holder.deviceName.text = pusher.deviceDisplayName
holder.removeButton.setOnClickListener {
interactions.onRemovePushTapped(pusher)
@ -60,6 +61,8 @@ abstract class PushGatewayItem : EpoxyModelWithHolder<PushGatewayItem.Holder>()
val deviceName by bind<TextView>(R.id.pushGatewayDeviceNameValue)
val formatTitle by bind<View>(R.id.pushGatewayFormat)
val format by bind<TextView>(R.id.pushGatewayFormatValue)
val profileTagTitle by bind<TextView>(R.id.pushGatewayProfileTag)
val profileTag by bind<TextView>(R.id.pushGatewayProfileTagValue)
val urlTitle by bind<View>(R.id.pushGatewayURL)
val url by bind<TextView>(R.id.pushGatewayURLValue)
val appName by bind<TextView>(R.id.pushGatewayAppNameValue)

View file

@ -32,7 +32,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:textStyle=""
tools:text="im.vector.app.android" />
<TextView
@ -50,7 +49,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:textStyle=""
tools:text="fBbCDxVa-n8:APA91bE0wGY4ijpj-LQkkmjJYhNp2vA_9Xvabh02xaTKua9WA9wpNZwxfHdsbIDWthVXKPFTNcCl75ek1kqMGOggnUwnSCj-8ReF4G69pZVUhz-" />
<TextView
@ -68,7 +66,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:textStyle=""
tools:text="EBMDOLFJD" />
<TextView
@ -86,7 +83,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:textStyle=""
tools:text="EBMDOLFJD" />
<TextView
@ -104,7 +100,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:textStyle=""
tools:text="EBMDOLFJD" />
<TextView
@ -122,9 +117,24 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:textStyle=""
tools:text="event_id_only" />
<TextView
android:id="@+id/pushGatewayProfileTag"
style="@style/Widget.Vector.TextView.Body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:text="@string/push_gateway_item_profile_tag"
android:textStyle="bold" />
<TextView
android:id="@+id/pushGatewayProfileTagValue"
style="@style/Widget.Vector.TextView.Body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp" />
<Button
android:id="@+id/pushGatewayDeleteButton"
android:layout_width="wrap_content"

View file

@ -1657,6 +1657,7 @@
<string name="push_gateway_item_device_name">session_name:</string>
<string name="push_gateway_item_url">Url:</string>
<string name="push_gateway_item_format">Format:</string>
<string name="push_gateway_item_profile_tag">Profile tag:</string>
<string name="preference_voice_and_video">Voice &amp; Video</string>
<string name="preference_root_help_about">Help &amp; About</string>