Skip to content
Snippets Groups Projects
Commit 45b5259d authored by John's avatar John
Browse files

Formatting

parent 21e9ac61
No related branches found
No related tags found
No related merge requests found
Showing
with 127 additions and 68 deletions
Loading
Loading
@@ -43,17 +43,28 @@ class PipelineJobsFragment : ButterKnifeFragment() {
}
}
 
@BindView(R.id.root) lateinit var root: ViewGroup
@BindView(R.id.swipe_layout) lateinit var swipeRefreshLayout: SwipeRefreshLayout
@BindView(R.id.text_number) lateinit var textName: TextView
@BindView(R.id.text_status) lateinit var textStatus: TextView
@BindView(R.id.text_duration) lateinit var textDuration: TextView
@BindView(R.id.text_created) lateinit var textCreated: TextView
@BindView(R.id.text_finished) lateinit var textFinished: TextView
@BindView(R.id.text_ref) lateinit var textRef: TextView
@BindView(R.id.text_sha) lateinit var textSha: TextView
@BindView(R.id.text_author) lateinit var textAuthor: TextView
@BindView(R.id.text_message) lateinit var textMessage: TextView
@BindView(R.id.root)
lateinit var root: ViewGroup
@BindView(R.id.swipe_layout)
lateinit var swipeRefreshLayout: SwipeRefreshLayout
@BindView(R.id.text_number)
lateinit var textName: TextView
@BindView(R.id.text_status)
lateinit var textStatus: TextView
@BindView(R.id.text_duration)
lateinit var textDuration: TextView
@BindView(R.id.text_created)
lateinit var textCreated: TextView
@BindView(R.id.text_finished)
lateinit var textFinished: TextView
@BindView(R.id.text_ref)
lateinit var textRef: TextView
@BindView(R.id.text_sha)
lateinit var textSha: TextView
@BindView(R.id.text_author)
lateinit var textAuthor: TextView
@BindView(R.id.text_message)
lateinit var textMessage: TextView
 
lateinit var project: Project
lateinit var pipeline: Pipeline
Loading
Loading
@@ -127,7 +138,7 @@ class PipelineJobsFragment : ButterKnifeFragment() {
textDuration.text = duration
 
val ref = String.format(getString(R.string.pipeline_ref), pipeline.ref)
textRef.text = ref
textRef.text = ref
 
val sha = String.format(getString(R.string.pipeline_sha), pipeline.sha)
textSha.text = sha
Loading
Loading
Loading
Loading
@@ -42,11 +42,16 @@ class PipelinesFragment : ButterKnifeFragment() {
}
}
 
@BindView(R.id.root) lateinit var root: ViewGroup
@BindView(R.id.swipe_layout) lateinit var swipeRefreshLayout: SwipeRefreshLayout
@BindView(R.id.list) lateinit var listPipelines: RecyclerView
@BindView(R.id.message_text) lateinit var textMessage: TextView
@BindView(R.id.issue_spinner) lateinit var spinnerIssue: Spinner
@BindView(R.id.root)
lateinit var root: ViewGroup
@BindView(R.id.swipe_layout)
lateinit var swipeRefreshLayout: SwipeRefreshLayout
@BindView(R.id.list)
lateinit var listPipelines: RecyclerView
@BindView(R.id.message_text)
lateinit var textMessage: TextView
@BindView(R.id.issue_spinner)
lateinit var spinnerIssue: Spinner
 
lateinit var adapterPipelines: PipelineAdapter
lateinit var layoutManagerPipelines: LinearLayoutManager
Loading
Loading
Loading
Loading
@@ -44,11 +44,16 @@ class ProjectFragment : ButterKnifeFragment() {
}
}
 
@BindView(R.id.swipe_layout) lateinit var swipeRefreshLayout: SwipeRefreshLayout
@BindView(R.id.creator) lateinit var textCreator: TextView
@BindView(R.id.star_count) lateinit var textStarCount: TextView
@BindView(R.id.forks_count) lateinit var textForksCount: TextView
@BindView(R.id.overview_text) lateinit var textOverview: TextView
@BindView(R.id.swipe_layout)
lateinit var swipeRefreshLayout: SwipeRefreshLayout
@BindView(R.id.creator)
lateinit var textCreator: TextView
@BindView(R.id.star_count)
lateinit var textStarCount: TextView
@BindView(R.id.forks_count)
lateinit var textForksCount: TextView
@BindView(R.id.overview_text)
lateinit var textOverview: TextView
 
var project: Project? = null
var branchName: String? = null
Loading
Loading
Loading
Loading
@@ -43,11 +43,16 @@ class ProjectMembersFragment : ButterKnifeFragment() {
}
}
 
@BindView(R.id.root) lateinit var root: View
@BindView(R.id.swipe_layout) lateinit var swipeRefreshLayout: SwipeRefreshLayout
@BindView(R.id.list) lateinit var listMembers: RecyclerView
@BindView(R.id.message_text) lateinit var textMessage: TextView
@BindView(R.id.add_user_button) lateinit var buttonAddUser: FloatingActionButton
@BindView(R.id.root)
lateinit var root: View
@BindView(R.id.swipe_layout)
lateinit var swipeRefreshLayout: SwipeRefreshLayout
@BindView(R.id.list)
lateinit var listMembers: RecyclerView
@BindView(R.id.message_text)
lateinit var textMessage: TextView
@BindView(R.id.add_user_button)
lateinit var buttonAddUser: FloatingActionButton
 
lateinit var adapterProjectMembers: ProjectMembersAdapter
lateinit var layoutManagerMembers: GridLayoutManager
Loading
Loading
Loading
Loading
@@ -70,9 +70,12 @@ class ProjectsFragment : ButterKnifeFragment() {
}
}
 
@BindView(R.id.swipe_layout) lateinit var swipeRefreshLayout: SwipeRefreshLayout
@BindView(R.id.list) lateinit var listProjects: RecyclerView
@BindView(R.id.message_text) lateinit var textMessage: TextView
@BindView(R.id.swipe_layout)
lateinit var swipeRefreshLayout: SwipeRefreshLayout
@BindView(R.id.list)
lateinit var listProjects: RecyclerView
@BindView(R.id.message_text)
lateinit var textMessage: TextView
 
lateinit var layoutManagerProjects: LinearLayoutManager
lateinit var adapterProjects: ProjectAdapter
Loading
Loading
@@ -159,7 +162,8 @@ class ProjectsFragment : ButterKnifeFragment() {
}
MODE_GROUP -> {
showLoading()
val group = arguments?.getParcelerParcelable<Group>(EXTRA_GROUP) ?: throw IllegalStateException("You must also pass a group if you want to show a groups projects")
val group = arguments?.getParcelerParcelable<Group>(EXTRA_GROUP)
?: throw IllegalStateException("You must also pass a group if you want to show a groups projects")
actuallyLoadIt(getGitLab().getGroupProjects(group.id))
}
else -> throw IllegalStateException(mode.toString() + " is not defined")
Loading
Loading
Loading
Loading
@@ -39,11 +39,16 @@ class SnippetsFragment : ButterKnifeFragment() {
}
}
 
@BindView(R.id.root) lateinit var root: ViewGroup
@BindView(R.id.swipe_layout) lateinit var swipeRefreshLayout: SwipeRefreshLayout
@BindView(R.id.list) lateinit var listSnippets: RecyclerView
@BindView(R.id.message_text) lateinit var textMessage: TextView
@BindView(R.id.state_spinner) lateinit var spinnerState: Spinner
@BindView(R.id.root)
lateinit var root: ViewGroup
@BindView(R.id.swipe_layout)
lateinit var swipeRefreshLayout: SwipeRefreshLayout
@BindView(R.id.list)
lateinit var listSnippets: RecyclerView
@BindView(R.id.message_text)
lateinit var textMessage: TextView
@BindView(R.id.state_spinner)
lateinit var spinnerState: Spinner
 
lateinit var adapterSnippets: SnippetAdapter
lateinit var layoutManagerSnippets: LinearLayoutManager
Loading
Loading
Loading
Loading
@@ -42,9 +42,12 @@ class TodoFragment : ButterKnifeFragment() {
}
}
 
@BindView(R.id.swipe_layout) lateinit var swipeRefreshLayout: SwipeRefreshLayout
@BindView(R.id.list) lateinit var listTodos: RecyclerView
@BindView(R.id.message_text) lateinit var textMessage: TextView
@BindView(R.id.swipe_layout)
lateinit var swipeRefreshLayout: SwipeRefreshLayout
@BindView(R.id.list)
lateinit var listTodos: RecyclerView
@BindView(R.id.message_text)
lateinit var textMessage: TextView
 
lateinit var layoutManagerTodos: LinearLayoutManager
lateinit var adapterTodos: TodoAdapter
Loading
Loading
Loading
Loading
@@ -27,7 +27,8 @@ class UsersFragment : ButterKnifeFragment() {
 
private val EXTRA_QUERY = "extra_query"
 
@JvmOverloads fun newInstance(query: String? = null): UsersFragment {
@JvmOverloads
fun newInstance(query: String? = null): UsersFragment {
val args = Bundle()
if (query != null) {
args.putString(EXTRA_QUERY, query)
Loading
Loading
@@ -41,9 +42,12 @@ class UsersFragment : ButterKnifeFragment() {
}
}
 
@BindView(R.id.swipe_layout) lateinit var swipeRefreshLayout: SwipeRefreshLayout
@BindView(R.id.list) lateinit var listUsers: RecyclerView
@BindView(R.id.message_text) lateinit var textMessage: TextView
@BindView(R.id.swipe_layout)
lateinit var swipeRefreshLayout: SwipeRefreshLayout
@BindView(R.id.list)
lateinit var listUsers: RecyclerView
@BindView(R.id.message_text)
lateinit var textMessage: TextView
 
lateinit var adapterUser: UserAdapter
lateinit var layoutManagerUser: GridLayoutManager
Loading
Loading
Loading
Loading
@@ -37,7 +37,8 @@ open class Issue {
var description: String? = null
@field:Json(name = "state")
@State
@get:State var state: String? = null
@get:State
var state: String? = null
@field:Json(name = "created_at")
var createdAt: Date? = null
@field:Json(name = "updated_at")
Loading
Loading
Loading
Loading
@@ -31,7 +31,8 @@ open class MergeRequest {
var description: String? = null
@field:Json(name = "state")
@State
@get:State var state: String? = null
@get:State
var state: String? = null
@field:Json(name = "updated_at")
var updatedAt: Date? = null
@field:Json(name = "created_at")
Loading
Loading
Loading
Loading
@@ -32,7 +32,8 @@ open class Note {
var noteableId: Long = 0
@field:Json(name = "noteable_type")
@Type
@get:Type var noteableType: String? = null
@get:Type
var noteableType: String? = null
@field:Json(name = "upvote?")
var isUpvote: Boolean = false
@field:Json(name = "downvote?")
Loading
Loading
Loading
Loading
@@ -24,7 +24,8 @@ open class RepositoryTreeObject {
var name: String? = null
@field:Json(name = "type")
@Type
@get:Type var type: String? = null
@get:Type
var type: String? = null
@field:Json(name = "mode")
var mode: String? = null
}
Loading
Loading
@@ -189,6 +189,7 @@ object Navigator {
val intent = BuildActivity.newIntent(activity, project, build)
activity.startActivity(intent)
}
fun navigateToPipeline(activity: Activity, project: Project, pipeline: com.commit451.gitlab.model.api.Pipeline) {
val intent = PipelineActivity.newIntent(activity, project, pipeline)
activity.startActivity(intent)
Loading
Loading
Loading
Loading
@@ -2,4 +2,4 @@ package com.commit451.gitlab.rx
 
import com.commit451.reptar.ComposableCompletableObserver
 
abstract class CustomCompleteObserver: ComposableCompletableObserver()
\ No newline at end of file
abstract class CustomCompleteObserver : ComposableCompletableObserver()
\ No newline at end of file
Loading
Loading
@@ -77,7 +77,7 @@ public class CustomKeyManager extends X509ExtendedKeyManager {
 
@Override
public String[] getClientAliases(String keyType, Principal[] issuers) {
return new String[] { entry.alias };
return new String[]{entry.alias};
}
 
@Override
Loading
Loading
@@ -108,6 +108,7 @@ public class CustomKeyManager extends X509ExtendedKeyManager {
 
public interface KeyCallback {
void onSuccess(KeyEntry entry);
void onError(Exception e);
}
}
Loading
Loading
@@ -8,22 +8,22 @@ import java.util.regex.Pattern
*/
object GitLabMarkdownParser {
 
private val patternIssue by lazy {
private val patternIssue by lazy {
//starts with #, followed by any number of digits
Pattern.compile("#\\d+")
}
 
private val patternMergeRequest by lazy {
private val patternMergeRequest by lazy {
//starts with !, followed by any number of digits
Pattern.compile("!\\d+")
}
 
private val patternLabel by lazy {
private val patternLabel by lazy {
//starts with ~, followed by any number of digits
Pattern.compile("~\\d+")
}
 
private val patternMilestone by lazy {
private val patternMilestone by lazy {
//starts with %, followed by any number of digits
Pattern.compile("%\\d+")
}
Loading
Loading
@@ -33,22 +33,22 @@ object GitLabMarkdownParser {
}
 
fun parseIssues(text: String): String {
val matcher = patternIssue.matcher(text)
val matcher = patternIssue.matcher(text)
return matcher.replaceAll("hi")
}
 
fun parseMergeRequests(text: String): String {
val matcher = patternMergeRequest.matcher(text)
val matcher = patternMergeRequest.matcher(text)
return matcher.replaceAll("hi")
}
 
fun parseLabels(text: String): String {
val matcher = patternLabel.matcher(text)
val matcher = patternLabel.matcher(text)
return matcher.replaceAll("hi")
}
 
fun parseMilestones(text: String): String {
val matcher = patternMilestone.matcher(text)
val matcher = patternMilestone.matcher(text)
return matcher.replaceAll("hi")
}
}
\ No newline at end of file
Loading
Loading
@@ -83,6 +83,7 @@ public class PicassoImageGetter implements Html.ImageGetter {
 
/**
* Set the {@link SourceModifier}
*
* @param sourceModifier the new source modifier
*/
public void setSourceModifier(SourceModifier sourceModifier) {
Loading
Loading
@@ -95,6 +96,7 @@ public class PicassoImageGetter implements Html.ImageGetter {
public interface SourceModifier {
/**
* Modify the source url, adding to it in any way you need to
*
* @param source the source url from the markdown
* @return the modified url which will be loaded by Picasso
*/
Loading
Loading
Loading
Loading
@@ -42,11 +42,16 @@ import java.util.*
*/
class LabCoatNavigationView : NavigationView {
 
@BindView(R.id.profile_image) lateinit var imageProfile: ImageView
@BindView(R.id.profile_user) lateinit var textUserName: TextView
@BindView(R.id.profile_email) lateinit var textEmail: TextView
@BindView(R.id.arrow) lateinit var iconArrow: View
@BindView(R.id.button_debug) lateinit var buttonDebug: View
@BindView(R.id.profile_image)
lateinit var imageProfile: ImageView
@BindView(R.id.profile_user)
lateinit var textUserName: TextView
@BindView(R.id.profile_email)
lateinit var textEmail: TextView
@BindView(R.id.arrow)
lateinit var iconArrow: View
@BindView(R.id.button_debug)
lateinit var buttonDebug: View
 
lateinit var listAccounts: RecyclerView
lateinit var adapterAccounts: AccountAdapter
Loading
Loading
@@ -225,7 +230,6 @@ class LabCoatNavigationView : NavigationView {
override fun responseNonNullSuccess(userFull: User) {
//Store the newly retrieved user to the account so that it stays up to date
// in local storage
this@LabCoatNavigationView.user = user
bindUser(userFull)
}
})
Loading
Loading
Loading
Loading
@@ -29,10 +29,14 @@ class AccountViewHolder(view: View) : RecyclerView.ViewHolder(view) {
}
}
 
@BindView(R.id.account_image) lateinit var image: ImageView
@BindView(R.id.account_username) lateinit var textUsername: TextView
@BindView(R.id.account_server) lateinit var textServer: TextView
@BindView(R.id.account_more) lateinit var buttonMore: View
@BindView(R.id.account_image)
lateinit var image: ImageView
@BindView(R.id.account_username)
lateinit var textUsername: TextView
@BindView(R.id.account_server)
lateinit var textServer: TextView
@BindView(R.id.account_more)
lateinit var buttonMore: View
 
val popupMenu: PopupMenu
 
Loading
Loading
Loading
Loading
@@ -27,7 +27,8 @@ class AddLabelViewHolder(view: View) : RecyclerView.ViewHolder(view) {
}
}
 
@BindView(R.id.title) lateinit var textTitle: TextView
@BindView(R.id.title)
lateinit var textTitle: TextView
 
init {
ButterKnife.bind(this, view)
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