mirror of
https://github.com/k0shk0sh/FastHub.git
synced 2026-01-25 14:47:05 +00:00
add lock reason
This commit is contained in:
parent
d103617183
commit
f331fedfcd
@ -1,6 +1,7 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'com.apollographql.android'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'com.novoda.build-properties'
|
||||
apply plugin: 'jacoco-android'
|
||||
apply plugin: 'io.fabric'
|
||||
@ -24,7 +25,7 @@ android {
|
||||
}
|
||||
}
|
||||
compileSdkVersion 27
|
||||
buildToolsVersion '27.0.2'
|
||||
buildToolsVersion '27.0.3'
|
||||
defaultConfig {
|
||||
applicationId "com.fastaccess.github"
|
||||
minSdkVersion 21
|
||||
@ -133,7 +134,7 @@ dependencies {
|
||||
implementation 'cn.gavinliu.android.lib:ShapedImageView:0.8.3'
|
||||
implementation "com.jakewharton:butterknife:${butterKnifeVersion}"
|
||||
implementation 'it.sephiroth.android.library.bottomnavigation:bottom-navigation:2.0.2'
|
||||
implementation 'io.reactivex.rxjava2:rxjava:2.1.5'
|
||||
implementation 'io.reactivex.rxjava2:rxjava:2.1.6'
|
||||
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
|
||||
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
|
||||
implementation 'com.annimon:stream:1.1.9'
|
||||
@ -158,7 +159,7 @@ dependencies {
|
||||
implementation "com.google.android.gms:play-services-base:${gms}"
|
||||
implementation('com.github.b3er.rxfirebase:firebase-database-kotlin:11.2.0') { transitive = false }
|
||||
implementation('com.github.b3er.rxfirebase:firebase-database:11.2.0') { transitive = false }
|
||||
implementation('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') { transitive = true }
|
||||
implementation('com.crashlytics.sdk.android:crashlytics:2.9.0@aar') { transitive = true }
|
||||
implementation "com.github.miguelbcr:RxBillingService:0.0.3"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:${kotlin_version}"
|
||||
implementation 'org.jsoup:jsoup:1.10.3'
|
||||
@ -188,5 +189,4 @@ dependencies {
|
||||
androidTestImplementation "com.android.support.test.espresso:espresso-core:${espresseVersion}"
|
||||
}
|
||||
|
||||
apply plugin: 'ManifestClasspath'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
@ -0,0 +1,14 @@
|
||||
package com.fastaccess.data.dao;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* Created by Kosh on 10.02.18.
|
||||
*/
|
||||
@NoArgsConstructor @AllArgsConstructor @Getter @Setter public class LockIssuePrModel {
|
||||
private boolean locked;
|
||||
private String activeLockReason;
|
||||
}
|
||||
@ -9,6 +9,7 @@ import com.fastaccess.data.dao.CreateIssueModel;
|
||||
import com.fastaccess.data.dao.IssueRequestModel;
|
||||
import com.fastaccess.data.dao.IssuesPageable;
|
||||
import com.fastaccess.data.dao.LabelModel;
|
||||
import com.fastaccess.data.dao.LockIssuePrModel;
|
||||
import com.fastaccess.data.dao.Pageable;
|
||||
import com.fastaccess.data.dao.model.Comment;
|
||||
import com.fastaccess.data.dao.model.Issue;
|
||||
@ -68,9 +69,10 @@ public interface IssueService {
|
||||
@Path("number") int number,
|
||||
@Body IssueRequestModel issue);
|
||||
|
||||
@Headers("Content-Length: 0")
|
||||
@Headers("Accept: application/vnd.github.sailor-v-preview+json")
|
||||
@PUT("repos/{owner}/{repo}/issues/{number}/lock")
|
||||
Observable<Response<Boolean>> lockIssue(@Path("owner") String owner, @Path("repo") String repo, @Path("number") int number);
|
||||
Observable<Response<Boolean>> lockIssue(@Body LockIssuePrModel body, @Path("owner") String owner,
|
||||
@Path("repo") String repo, @Path("number") int number);
|
||||
|
||||
@DELETE("repos/{owner}/{repo}/issues/{number}/lock")
|
||||
Observable<Response<Boolean>> unlockIssue(@Path("owner") String owner, @Path("repo") String repo, @Path("number") int number);
|
||||
|
||||
@ -41,7 +41,8 @@ public class MarkDownProvider {
|
||||
};
|
||||
|
||||
private static final String[] ARCHIVE_EXTENSIONS = {
|
||||
".zip", ".7z", ".rar", ".tar.gz", ".tgz", ".tar.Z", ".tar.bz2", ".tbz2", ".tar.lzma", ".tlz", ".apk", ".jar", ".dmg", ".pdf", ".ico", ".docx", ".doc", ".xlsx", ".hwp", ".pptx", ".show", ".mp3", ".ogg"
|
||||
".zip", ".7z", ".rar", ".tar.gz", ".tgz", ".tar.Z", ".tar.bz2", ".tbz2", ".tar.lzma", ".tlz", ".apk", ".jar",
|
||||
".dmg", ".pdf", ".ico", ".docx", ".doc", ".xlsx", ".hwp", ".pptx", ".show", ".mp3", ".ogg"
|
||||
};
|
||||
|
||||
private MarkDownProvider() {}
|
||||
|
||||
@ -74,7 +74,7 @@ class CommitCommentsViewHolder private constructor(view: View, adapter: BaseRecy
|
||||
name.text = author3.login
|
||||
} else {
|
||||
avatar.setUrl(null, null, false, false)
|
||||
name.text = null
|
||||
name.text = ""
|
||||
}
|
||||
if (!InputHelper.isEmpty(t.body)) {
|
||||
val width = adapter?.getRowWidth() ?: 0
|
||||
|
||||
@ -68,7 +68,7 @@ class PullRequestEventViewHolder private constructor(view: View, adapter: BaseRe
|
||||
}
|
||||
|
||||
private fun reset() {
|
||||
stateText.text = null
|
||||
stateText.text = ""
|
||||
avatarLayout.setUrl(null, null, false, false)
|
||||
}
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ open class TrendingViewHolder(itemView: View, adapter: BaseRecyclerAdapter<Trend
|
||||
fork.text = t.forks
|
||||
if (t.language.isNullOrBlank()) {
|
||||
lang.visibility = View.GONE
|
||||
lang.text = null
|
||||
lang.text = ""
|
||||
} else {
|
||||
val color = ColorsProvider.getColorAsColor(t.language!!, itemView.context)
|
||||
Logger.e(color, t.language)
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
package com.fastaccess.ui.modules.repos.extras.locking
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import com.fastaccess.R
|
||||
import com.fastaccess.ui.base.BaseBottomSheetDialog
|
||||
import kotlinx.android.synthetic.main.lock_issue_pr_dialog.*
|
||||
|
||||
/**
|
||||
* Created by Kosh on 10.02.18.
|
||||
*/
|
||||
|
||||
class LockIssuePrBottomSheetDialog : BaseBottomSheetDialog() {
|
||||
|
||||
private var lockIssuePrCallback: LockIssuePrCallback? = null
|
||||
|
||||
override fun onAttach(context: Context?) {
|
||||
super.onAttach(context)
|
||||
lockIssuePrCallback = when {
|
||||
parentFragment is LockIssuePrCallback -> parentFragment as LockIssuePrCallback
|
||||
context is LockIssuePrCallback -> context
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetach() {
|
||||
lockIssuePrCallback = null
|
||||
super.onDetach()
|
||||
}
|
||||
|
||||
override fun layoutRes(): Int = R.layout.lock_issue_pr_dialog
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
cancel.setOnClickListener { dismiss() }
|
||||
ok.setOnClickListener {
|
||||
lockIssuePrCallback?.onLock(lockReason.selectedItem as String)
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun newInstance() = LockIssuePrBottomSheetDialog()
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.fastaccess.ui.modules.repos.extras.locking
|
||||
|
||||
/**
|
||||
* Created by Kosh on 10.02.18.
|
||||
*/
|
||||
|
||||
interface LockIssuePrCallback {
|
||||
fun onLock(reason: String)
|
||||
}
|
||||
@ -38,6 +38,7 @@ import com.fastaccess.ui.modules.repos.RepoPagerActivity;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerMvp;
|
||||
import com.fastaccess.ui.modules.repos.extras.assignees.AssigneesDialogFragment;
|
||||
import com.fastaccess.ui.modules.repos.extras.labels.LabelsDialogFragment;
|
||||
import com.fastaccess.ui.modules.repos.extras.locking.LockIssuePrBottomSheetDialog;
|
||||
import com.fastaccess.ui.modules.repos.extras.milestone.create.MilestoneDialogFragment;
|
||||
import com.fastaccess.ui.modules.repos.issues.create.CreateIssueActivity;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.timeline.IssueTimelineFragment;
|
||||
@ -190,13 +191,17 @@ public class IssuePagerActivity extends BaseActivity<IssuePagerMvp.View, IssuePa
|
||||
.show(getSupportFragmentManager(), MessageDialogView.TAG);
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.lockIssue) {
|
||||
MessageDialogView.newInstance(
|
||||
getPresenter().isLocked() ? getString(R.string.unlock_issue) : getString(R.string.lock_issue),
|
||||
getPresenter().isLocked() ? getString(R.string.unlock_issue_details) : getString(R.string.lock_issue_details),
|
||||
Bundler.start().put(BundleConstant.EXTRA_TWO, true)
|
||||
.put(BundleConstant.YES_NO_EXTRA, true)
|
||||
.end())
|
||||
.show(getSupportFragmentManager(), MessageDialogView.TAG);
|
||||
if (!getPresenter().isLocked()) {
|
||||
LockIssuePrBottomSheetDialog.Companion
|
||||
.newInstance()
|
||||
.show(getSupportFragmentManager(), MessageDialogView.TAG);
|
||||
} else {
|
||||
MessageDialogView.newInstance(getString(R.string.unlock_issue), getString(R.string.unlock_issue_details),
|
||||
Bundler.start().put(BundleConstant.EXTRA_TWO, true)
|
||||
.put(BundleConstant.YES_NO_EXTRA, true)
|
||||
.end())
|
||||
.show(getSupportFragmentManager(), MessageDialogView.TAG);
|
||||
}
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.labels) {
|
||||
LabelsDialogFragment.newInstance(getPresenter().getIssue() != null ? getPresenter().getIssue().getLabels() : null,
|
||||
@ -393,11 +398,6 @@ public class IssuePagerActivity extends BaseActivity<IssuePagerMvp.View, IssuePa
|
||||
}
|
||||
}
|
||||
|
||||
private IssueTimelineFragment getIssueTimelineFragment() {
|
||||
if (pager == null || pager.getAdapter() == null) return null;
|
||||
return (IssueTimelineFragment) pager.getAdapter().instantiateItem(pager, 0);
|
||||
}
|
||||
|
||||
@Override public void onTagUser(@NonNull String username) {
|
||||
commentEditorFragment.onAddUserName(username);
|
||||
}
|
||||
@ -416,6 +416,15 @@ public class IssuePagerActivity extends BaseActivity<IssuePagerMvp.View, IssuePa
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override public void onLock(@NonNull String reason) {
|
||||
getPresenter().onLockUnlockIssue(reason);
|
||||
}
|
||||
|
||||
private IssueTimelineFragment getIssueTimelineFragment() {
|
||||
if (pager == null || pager.getAdapter() == null) return null;
|
||||
return (IssueTimelineFragment) pager.getAdapter().instantiateItem(pager, 0);
|
||||
}
|
||||
|
||||
private void hideShowFab() {
|
||||
if (getPresenter().isLocked() && !getPresenter().isOwner()) {
|
||||
getSupportFragmentManager().beginTransaction().hide(commentEditorFragment).commit();
|
||||
|
||||
@ -13,6 +13,7 @@ import com.fastaccess.ui.base.mvp.BaseMvp;
|
||||
import com.fastaccess.ui.modules.editor.comment.CommentEditorFragment;
|
||||
import com.fastaccess.ui.modules.repos.extras.assignees.AssigneesMvp;
|
||||
import com.fastaccess.ui.modules.repos.extras.labels.LabelsMvp;
|
||||
import com.fastaccess.ui.modules.repos.extras.locking.LockIssuePrCallback;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@ -24,7 +25,7 @@ public interface IssuePagerMvp {
|
||||
|
||||
interface View extends BaseMvp.FAView, LabelsMvp.SelectedLabelsListener,
|
||||
AssigneesMvp.SelectedAssigneesListener, IssuePrCallback<Issue>,
|
||||
CommentEditorFragment.CommentListener {
|
||||
CommentEditorFragment.CommentListener, LockIssuePrCallback {
|
||||
void onSetupIssue(boolean isUpdate);
|
||||
|
||||
void showSuccessIssueActionMsg(boolean isClose);
|
||||
@ -62,7 +63,7 @@ public interface IssuePagerMvp {
|
||||
|
||||
void onOpenCloseIssue();
|
||||
|
||||
void onLockUnlockIssue();
|
||||
void onLockUnlockIssue(String reason);
|
||||
|
||||
void onPutMilestones(@NonNull MilestoneModel milestone);
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@ import com.fastaccess.data.dao.AssigneesRequestModel;
|
||||
import com.fastaccess.data.dao.IssueRequestModel;
|
||||
import com.fastaccess.data.dao.LabelListModel;
|
||||
import com.fastaccess.data.dao.LabelModel;
|
||||
import com.fastaccess.data.dao.LockIssuePrModel;
|
||||
import com.fastaccess.data.dao.MilestoneModel;
|
||||
import com.fastaccess.data.dao.NotificationSubscriptionBodyModel;
|
||||
import com.fastaccess.data.dao.PullsIssuesParser;
|
||||
@ -131,7 +132,7 @@ class IssuePagerPresenter extends BasePresenter<IssuePagerMvp.View> implements I
|
||||
if (proceedCloseIssue) {
|
||||
onOpenCloseIssue();
|
||||
} else if (proceedLockUnlock) {
|
||||
onLockUnlockIssue();
|
||||
onLockUnlockIssue(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -155,15 +156,21 @@ class IssuePagerPresenter extends BasePresenter<IssuePagerMvp.View> implements I
|
||||
}
|
||||
}
|
||||
|
||||
@Override public void onLockUnlockIssue() {
|
||||
@Override public void onLockUnlockIssue(String reason) {
|
||||
Issue currentIssue = getIssue();
|
||||
if (currentIssue == null) return;
|
||||
String login = currentIssue.getUser().getLogin();
|
||||
String repoId = currentIssue.getRepoId();
|
||||
String login = getLogin();
|
||||
String repoId = getRepoId();
|
||||
int number = currentIssue.getNumber();
|
||||
LockIssuePrModel model = null;
|
||||
if (!isLocked() && !InputHelper.isEmpty(reason)) {
|
||||
model = new LockIssuePrModel(true, reason);
|
||||
}
|
||||
IssueService issueService = RestProvider.getIssueService(isEnterprise());
|
||||
Observable<Response<Boolean>> observable = RxHelper
|
||||
.getObservable(isLocked() ? issueService.unlockIssue(login, repoId, number) : issueService.lockIssue(login, repoId, number));
|
||||
.getObservable(model == null
|
||||
? issueService.unlockIssue(login, repoId, number) :
|
||||
issueService.lockIssue(model, login, repoId, number));
|
||||
makeRestCall(observable, booleanResponse -> {
|
||||
int code = booleanResponse.code();
|
||||
if (code == 204) {
|
||||
|
||||
@ -44,6 +44,7 @@ import com.fastaccess.ui.modules.repos.RepoPagerActivity;
|
||||
import com.fastaccess.ui.modules.repos.RepoPagerMvp;
|
||||
import com.fastaccess.ui.modules.repos.extras.assignees.AssigneesDialogFragment;
|
||||
import com.fastaccess.ui.modules.repos.extras.labels.LabelsDialogFragment;
|
||||
import com.fastaccess.ui.modules.repos.extras.locking.LockIssuePrBottomSheetDialog;
|
||||
import com.fastaccess.ui.modules.repos.extras.milestone.create.MilestoneDialogFragment;
|
||||
import com.fastaccess.ui.modules.repos.issues.create.CreateIssueActivity;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.files.PullRequestFilesFragment;
|
||||
@ -205,13 +206,17 @@ public class PullRequestPagerActivity extends BaseActivity<PullRequestPagerMvp.V
|
||||
.show(getSupportFragmentManager(), MessageDialogView.TAG);
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.lockIssue) {
|
||||
MessageDialogView.newInstance(
|
||||
getPresenter().isLocked() ? getString(R.string.unlock_issue) : getString(R.string.lock_issue),
|
||||
getPresenter().isLocked() ? getString(R.string.unlock_issue_details) : getString(R.string.lock_issue_details),
|
||||
Bundler.start().put(BundleConstant.EXTRA_TWO, true)
|
||||
.put(BundleConstant.YES_NO_EXTRA, true)
|
||||
.end())
|
||||
.show(getSupportFragmentManager(), MessageDialogView.TAG);
|
||||
if (!getPresenter().isLocked()) {
|
||||
LockIssuePrBottomSheetDialog.Companion
|
||||
.newInstance()
|
||||
.show(getSupportFragmentManager(), MessageDialogView.TAG);
|
||||
} else {
|
||||
MessageDialogView.newInstance(getString(R.string.unlock_issue), getString(R.string.unlock_issue_details),
|
||||
Bundler.start().put(BundleConstant.EXTRA_TWO, true)
|
||||
.put(BundleConstant.YES_NO_EXTRA, true)
|
||||
.end())
|
||||
.show(getSupportFragmentManager(), MessageDialogView.TAG);
|
||||
}
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.labels) {
|
||||
LabelsDialogFragment.newInstance(getPresenter().getPullRequest() != null ? getPresenter().getPullRequest().getLabels() : null,
|
||||
@ -488,6 +493,10 @@ public class PullRequestPagerActivity extends BaseActivity<PullRequestPagerMvp.V
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override public void onLock(String reason) {
|
||||
getPresenter().onLockUnlockConversations(reason);
|
||||
}
|
||||
|
||||
protected void hideAndClearReviews() {
|
||||
getPresenter().getCommitComment().clear();
|
||||
AnimHelper.mimicFabVisibility(false, prReviewHolder, null);
|
||||
|
||||
@ -14,6 +14,7 @@ import com.fastaccess.ui.base.mvp.BaseMvp;
|
||||
import com.fastaccess.ui.modules.editor.comment.CommentEditorFragment;
|
||||
import com.fastaccess.ui.modules.repos.extras.assignees.AssigneesMvp;
|
||||
import com.fastaccess.ui.modules.repos.extras.labels.LabelsMvp;
|
||||
import com.fastaccess.ui.modules.repos.extras.locking.LockIssuePrCallback;
|
||||
import com.fastaccess.ui.modules.repos.issues.issue.details.IssuePagerMvp;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.files.PullRequestFilesMvp;
|
||||
import com.fastaccess.ui.modules.repos.pull_requests.pull_request.merge.MergePullReqeustMvp;
|
||||
@ -31,7 +32,8 @@ public interface PullRequestPagerMvp {
|
||||
interface View extends BaseMvp.FAView, LabelsMvp.SelectedLabelsListener,
|
||||
AssigneesMvp.SelectedAssigneesListener, MergePullReqeustMvp.MergeCallback,
|
||||
IssuePagerMvp.IssuePrCallback<PullRequest>, PullRequestFilesMvp.PatchCallback,
|
||||
CommentEditorFragment.CommentListener, ReviewChangesMvp.ReviewSubmissionCallback {
|
||||
CommentEditorFragment.CommentListener, ReviewChangesMvp.ReviewSubmissionCallback,
|
||||
LockIssuePrCallback {
|
||||
|
||||
void onSetupIssue(boolean update);
|
||||
|
||||
@ -70,7 +72,7 @@ public interface PullRequestPagerMvp {
|
||||
|
||||
void onOpenCloseIssue();
|
||||
|
||||
void onLockUnlockConversations();
|
||||
void onLockUnlockConversations(String reason);
|
||||
|
||||
@NonNull SpannableBuilder getMergeBy(@NonNull PullRequest pullRequest, @NonNull Context context);
|
||||
|
||||
|
||||
@ -15,6 +15,7 @@ import com.fastaccess.data.dao.CommentRequestModel;
|
||||
import com.fastaccess.data.dao.IssueRequestModel;
|
||||
import com.fastaccess.data.dao.LabelListModel;
|
||||
import com.fastaccess.data.dao.LabelModel;
|
||||
import com.fastaccess.data.dao.LockIssuePrModel;
|
||||
import com.fastaccess.data.dao.MergeRequestModel;
|
||||
import com.fastaccess.data.dao.MilestoneModel;
|
||||
import com.fastaccess.data.dao.NotificationSubscriptionBodyModel;
|
||||
@ -128,18 +129,22 @@ class PullRequestPagerPresenter extends BasePresenter<PullRequestPagerMvp.View>
|
||||
if (proceedCloseIssue) {
|
||||
onOpenCloseIssue();
|
||||
} else if (proceedLockUnlock) {
|
||||
onLockUnlockConversations();
|
||||
onLockUnlockConversations(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override public void onLockUnlockConversations() {
|
||||
@Override public void onLockUnlockConversations(String reason) {
|
||||
PullRequest currentPullRequest = getPullRequest();
|
||||
if (currentPullRequest == null) return;
|
||||
IssueService service = RestProvider.getIssueService(isEnterprise());
|
||||
LockIssuePrModel model = null;
|
||||
if (!isLocked() && !InputHelper.isEmpty(reason)) {
|
||||
model = new LockIssuePrModel(true, reason);
|
||||
}
|
||||
Observable<Response<Boolean>> observable = RxHelper
|
||||
.getObservable(isLocked() ? service.unlockIssue(login, repoId, issueNumber) :
|
||||
service.lockIssue(login, repoId, issueNumber));
|
||||
.getObservable(model == null ? service.unlockIssue(login, repoId, issueNumber) :
|
||||
service.lockIssue(model, login, repoId, issueNumber));
|
||||
makeRestCall(observable, booleanResponse -> {
|
||||
int code = booleanResponse.code();
|
||||
if (code == 204) {
|
||||
|
||||
@ -122,11 +122,7 @@ class ReviewChangesActivity : BaseDialogFragment<ReviewChangesMvp.View, ReviewCh
|
||||
override fun onTagUser(username: String) {}
|
||||
|
||||
override fun onClearEditText() {
|
||||
commentEditorFragment?.let {
|
||||
it.commentText.let {
|
||||
it.text = null
|
||||
}
|
||||
}
|
||||
commentEditorFragment?.commentText?.setText("")
|
||||
}
|
||||
|
||||
override fun getNamesToTag(): ArrayList<String>? {
|
||||
|
||||
@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
android:id="@+id/messageLayout"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?card_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.fastaccess.ui.widgets.FontTextView
|
||||
android:id="@+id/title"
|
||||
style="@style/TextAppearance.AppCompat.Title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:padding="@dimen/spacing_xs_large"
|
||||
android:text="@string/lock_issue"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<android.support.v7.widget.AppCompatSpinner
|
||||
android:id="@+id/lockReason"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:entries="@array/lock_reasons"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.fastaccess.ui.widgets.FontTextView
|
||||
android:id="@+id/message"
|
||||
style="@style/TextAppearance.AppCompat.Medium"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:autoLink="all"
|
||||
android:paddingEnd="@dimen/spacing_xs_large"
|
||||
android:paddingStart="@dimen/spacing_xs_large"
|
||||
android:text="@string/lock_issue_details"
|
||||
android:textColor="?android:attr/textColorSecondary"/>
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="end"
|
||||
android:paddingBottom="@dimen/spacing_normal"
|
||||
android:paddingTop="@dimen/spacing_normal">
|
||||
|
||||
<com.fastaccess.ui.widgets.FontButton
|
||||
android:id="@+id/cancel"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:text="@string/cancel"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||
android:textColor="@color/material_pink_700"/>
|
||||
|
||||
<com.fastaccess.ui.widgets.FontButton
|
||||
android:id="@+id/ok"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:text="@string/ok"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||
android:textColor="?colorAccent"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
@ -154,6 +154,7 @@
|
||||
<item>ko</item>
|
||||
<item>pl</item>
|
||||
<item>pt-rPT</item>
|
||||
<item>ar</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="files_search_options" translatable="false">
|
||||
@ -180,6 +181,13 @@
|
||||
<item>COMMENT</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="lock_reasons" translatable="false">
|
||||
<item>off-topic</item>
|
||||
<item>too heated</item>
|
||||
<item>resolved</item>
|
||||
<item>spam</item>
|
||||
</string-array>
|
||||
|
||||
<!-- EmojiCompat Downloadable Fonts Arrays -->
|
||||
<array name="fonts_certificate" translatable="false">
|
||||
<item>@array/com_google_android_gms_fonts_certs_dev</item>
|
||||
|
||||
@ -3,7 +3,7 @@ buildscript {
|
||||
ext {
|
||||
butterKnifeVersion = '8.5.1'
|
||||
state_version = '1.1.6'
|
||||
lombokVersion = '1.16.18'
|
||||
lombokVersion = '1.16.20'
|
||||
supportVersion = "27.0.2"
|
||||
gms = "11.8.0"
|
||||
thirtyinchVersion = '0.8.0'
|
||||
@ -23,14 +23,13 @@ buildscript {
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.1.0-alpha09'
|
||||
classpath 'com.android.tools.build:gradle:3.2.0-alpha03'
|
||||
classpath 'com.google.gms:google-services:3.0.0'
|
||||
classpath 'com.novoda:gradle-build-properties-plugin:0.3'
|
||||
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.2'
|
||||
classpath 'io.fabric.tools:gradle:1.24.1'
|
||||
classpath 'com.apollographql.apollo:gradle-plugin:0.4.1'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}"
|
||||
classpath "com.github.viswaramamoorthy:gradle-util-plugins:0.1.0-RELEASE"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,7 +1,7 @@
|
||||
#Sat Jan 06 10:29:07 CET 2018
|
||||
#Fri Feb 16 18:31:07 CET 2018
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-all.zip
|
||||
android.enableD8=true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user