Merge pull request #713 from yakov116/Grammar_and_small_edits

Grammar and added open in browser
This commit is contained in:
Kosh Sergani 2017-07-01 22:37:23 +08:00 committed by GitHub
commit d1d98e9ef9
4 changed files with 19 additions and 10 deletions

View File

@ -32,6 +32,7 @@ public class TimelineProvider {
String from = context.getString(R.string.from);
String thisString = context.getString(R.string.this_value);
String in = context.getString(R.string.in_value);
String commit = context.getString(R.string.commit);
if (event == IssueEventType.labeled || event == IssueEventType.unlabeled) {
if (issueEventModel.getAssignee() != null && issueEventModel.getAssigner() != null) {
spannableBuilder.bold(issueEventModel.getAssigner().getLogin());
@ -53,11 +54,15 @@ public class TimelineProvider {
if (user != null) {
spannableBuilder.bold(user.getLogin());
}
if (event == IssueEventType.closed) {
if (event == IssueEventType.closed || event == IssueEventType.reopened) {
if (isMerged) {
spannableBuilder.append(" ").append(IssueEventType.merged.name());
} else {
spannableBuilder.append(" ").append(event.name().replaceAll("_", " "));
spannableBuilder
.append(" ")
.append(event.name().replaceAll("_", " "))
.append(" ")
.append(thisString);
}
} else if (event == IssueEventType.assigned || event == IssueEventType.unassigned) {
spannableBuilder
@ -88,9 +93,7 @@ public class TimelineProvider {
} else if (event == IssueEventType.referenced || event == IssueEventType.merged) {
spannableBuilder
.append(" ")
.append(thisString)
.append(" ")
.append(in)
.append(commit)
.append(" ")
.url(substring(issueEventModel.getCommitId()));
} else if (event == IssueEventType.review_requested) {
@ -99,11 +102,9 @@ public class TimelineProvider {
.append(from)
.append(" ")
.bold(issueEventModel.getRequestedReviewer().getLogin());
} else if (event == IssueEventType.closed || event == IssueEventType.reopened) {
} else if (event == IssueEventType.closed) {
if (issueEventModel.getCommitId() != null) {
spannableBuilder
.append(" ")
.append(thisString)
.append(" ")
.append(in)
.append(" ")

View File

@ -544,6 +544,9 @@ public class RepoPagerActivity extends BaseActivity<RepoPagerMvp.View, RepoPager
} else if (item.getItemId() == R.id.share) {
if (getPresenter().getRepo() != null) ActivityHelper.shareUrl(this, getPresenter().getRepo().getHtmlUrl());
return true;
} else if (item.getItemId() == R.id.browser) {
if (getPresenter().getRepo() != null) ActivityHelper.startCustomTab(this, getPresenter().getRepo().getHtmlUrl());
return true;
} else if (item.getItemId() == R.id.copy) {
if (getPresenter().getRepo() != null) AppHelper.copyToClipboard(this, getPresenter().getRepo().getHtmlUrl());
return true;

View File

@ -7,6 +7,11 @@
android:title="@string/share"
app:showAsAction="never"/>
<item
android:id="@+id/browser"
android:icon="@drawable/ic_brower"
android:title="@string/open_in_browser"
app:showAsAction="never"/>
<item
android:id="@+id/copy"
android:icon="@drawable/ic_copy"

View File

@ -319,7 +319,7 @@
<string name="unauthorized_user">Unauthorized user</string>
<string name="two_factors_otp_error">Two factors OTP is required</string>
<string name="no_issue">No issue</string>
<string name="copy">Copy</string>
<string name="copy">Copy URL</string>
<string name="success_copied">Copied</string>
<string name="commit_message">Commit message</string>
<string name="network_error">Error occurred while communicating to the server</string>
@ -394,7 +394,7 @@
<string name="assignee">Assignee</string>
<string name="checks_failed">Some checks have failed</string>
<string name="checks_pending">All checks are pending</string>
<string name="checks_passed">All checks are passed</string>
<string name="checks_passed">All checks have passed</string>
<string name="sort">Sort</string>
<string name="newest">Newest</string>
<string name="oldest">Oldest</string>