Skip to content
Snippets Groups Projects
Commit 2c66a686 authored by John's avatar John
Browse files

Merge branch 'develop' into 'develop'

Issue #239 - Show confidential status on issue overview and detail

See merge request !25
parents f49f728b 0aefb644
No related branches found
No related tags found
1 merge request!25Issue #239 - Show confidential status on issue overview and detail
Pipeline #
Loading
Loading
@@ -82,6 +82,8 @@ class IssueActivity : BaseActivity() {
@BindView(R.id.list) lateinit var listNotes: RecyclerView
@BindView(R.id.send_message_view) lateinit var sendMessageView: SendMessageView
@BindView(R.id.progress) lateinit var progress: View
@BindView(R.id.toolbar_title) lateinit var toolbarTitle: TextView
@BindView(R.id.toolbar_subtitle) lateinit var toolbarSubTitle: TextView
 
lateinit var menuItemOpenClose: MenuItem
lateinit var adapterIssueDetails: IssueDetailsAdapter
Loading
Loading
@@ -244,13 +246,16 @@ class IssueActivity : BaseActivity() {
}
 
fun bindProject() {
toolbar.subtitle = project?.nameWithNamespace
toolbarSubTitle.text = project?.nameWithNamespace
}
 
fun bindIssue() {
toolbar.title = getString(R.string.issue_number) + issue?.iid
setOpenCloseMenuStatus()
textTitle.text = issue?.title
toolbarTitle.text = getString(R.string.issue_number, issue?.iid)
if (issue?.isConfidential!!) {
toolbarTitle.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_confidential_24dp, 0)
}
adapterIssueDetails.updateIssue(issue!!)
}
 
Loading
Loading
Loading
Loading
@@ -56,6 +56,10 @@ class IssueViewHolder(view: View) : RecyclerView.ViewHolder(view) {
}
 
textMessage.text = issue.title
textMessage.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0)
if (issue.isConfidential) {
textMessage.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_confidential_24dp, 0, 0, 0)
}
 
var time = ""
if (issue.createdAt != null) {
Loading
Loading
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/>
</vector>
Loading
Loading
@@ -8,6 +8,7 @@
android:layout_height="match_parent">
 
<LinearLayout
android:id="@+id/app_bar_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="?attr/actionBarSize"
Loading
Loading
@@ -21,13 +22,35 @@
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" />
android:layout_height="?attr/actionBarSize" >
 
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/toolbar_title"
style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="8dp"
tools:text="Issue title" />
<TextView
android:id="@+id/toolbar_subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="subtitle" />
</LinearLayout>
</android.support.v7.widget.Toolbar>
<TextView
android:id="@+id/issue_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:drawablePadding="8dp"
android:layout_marginRight="56dp"
tools:text="This is an issue"/>
 
Loading
Loading
Loading
Loading
@@ -16,8 +16,8 @@
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="8dp"
android:layout_weight="1"
android:orientation="vertical">
android:orientation="vertical"
android:layout_weight="1">
 
<TextView
android:id="@+id/issue_message"
Loading
Loading
@@ -25,6 +25,7 @@
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:drawablePadding="8dp"
android:textSize="@dimen/text_size_small"
tools:text="I commited all the code at once cause I am cool. So sorry" />
 
Loading
Loading
Loading
Loading
@@ -190,7 +190,7 @@
<string name="title_hint">Title</string>
<string name="description_hint">Description</string>
<string name="add_note_content_description">Add note</string>
<string name="issue_number">Issue #</string>
<string name="issue_number">Issue #%1$d</string>
<string name="reopen">Reopen</string>
<string name="close">Close</string>
<string name="created_issue">created issue</string>
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment