Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,12 @@

package im.vector.app.features.spaces

import android.view.View
import com.airbnb.epoxy.EpoxyAttribute
import com.airbnb.epoxy.EpoxyModelClass
import im.vector.app.R
import im.vector.app.core.epoxy.ClickListener
import im.vector.app.core.epoxy.VectorEpoxyHolder
import im.vector.app.core.epoxy.VectorEpoxyModel
import im.vector.app.core.epoxy.onClick

@EpoxyModelClass(layout = R.layout.item_space_beta_header)
abstract class SpaceBetaHeaderItem : VectorEpoxyModel<SpaceBetaHeaderItem.Holder>() {

@EpoxyAttribute(EpoxyAttribute.Option.DoNotHash)
var clickAction: ClickListener? = null

override fun bind(holder: Holder) {
super.bind(holder)
holder.feedBackAction.onClick(clickAction)
}

class Holder : VectorEpoxyHolder() {
val feedBackAction by bind<View>(R.id.spaceBetaFeedbackAction)
}
class Holder : VectorEpoxyHolder()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What do you think about completely deleting SpaceBetaHeaderItem class and item_space_beta_header.xml and improve GenericHeaderItem with a description?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

text appearance of title in item_generic_header is a little bit different, so it will require confirmation from designers. I'd say we should do that as a part of design system implementation, which should happen soon 🤔

}
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ class SpaceSummaryController @Inject constructor(
val host = this
spaceBetaHeaderItem {
id("beta_header")
clickAction {
host.callback?.sendFeedBack()
}
}

// show invites on top
Expand Down
15 changes: 1 addition & 14 deletions vector/src/main/res/layout/item_space_beta_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="16dp"
android:paddingBottom="16dp"
tools:viewBindingIgnore="true">

<TextView
Expand All @@ -27,18 +28,4 @@
android:text="@string/spaces_beta_welcome_to_spaces_desc"
android:textColor="?vctr_content_secondary" />

<TextView
android:id="@+id/spaceBetaFeedbackAction"
style="@style/Widget.Vector.TextView.Body"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="8dp"
android:paddingStart="0dp"
android:paddingTop="8dp"
android:paddingEnd="16dp"
android:paddingBottom="8dp"
android:text="@string/give_feedback"
android:textColor="@color/vector_info_color"
app:drawableStartCompat="@drawable/ic_feedback" />

</LinearLayout>
1 change: 1 addition & 0 deletions vector/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1649,6 +1649,7 @@
<string name="you_may_contact_me">You may contact me if you have any follow up questions</string>
<string name="feedback_sent">Thanks, your feedback has been successfully sent</string>
<string name="feedback_failed">The feedback failed to be sent (%s)</string>
<!-- TODO TO BE REMOVED -->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice to see, thanks.

<string name="give_feedback">Give Feedback</string>

<string name="settings_labs_show_hidden_events_in_timeline">Show hidden events in timeline</string>
Expand Down