Skip to content

Commit

Permalink
feat: add see more to revisions view
Browse files Browse the repository at this point in the history
  • Loading branch information
aanorbel committed Jul 12, 2024
1 parent d7c9ab5 commit 4be177e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,24 @@ class RevisionsFragment : Fragment() {
})
}
}
if ((revisions?.revisions?.size ?: 0) > 5) {
binding.seeMore.apply {
visibility = View.VISIBLE
setOnClickListener {
startActivity(
Intent(
Intent.ACTION_VIEW,
Uri.parse(
"%s/revisions/%s".format(
BuildConfig.OONI_RUN_DASHBOARD_URL,
runId
)
)
)
)
}
}
}

return binding.root
}
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/layout/fragment_revisions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,14 @@
android:layout_height="match_parent"
app:layoutManager="LinearLayoutManager"
tools:listitem="@layout/item_text" />

<TextView
android:id="@+id/see_more"
style="?attr/textAppearanceBody2"
android:visibility="gone"
android:text="See More"
android:textColor="@color/color_blue6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingVertical="@dimen/item_padding_small"/>
</LinearLayout>

0 comments on commit 4be177e

Please sign in to comment.