Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Commit

Permalink
this commit fixes #1067 and readying to release 4.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
k0shk0sh committed Oct 3, 2017
1 parent 22828a8 commit 5c4bf2d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ android {
applicationId "com.fastaccess.github"
minSdkVersion 21
targetSdkVersion 26
versionCode 440
versionName "4.4.0"
versionCode 441
versionName "4.4.1"
buildConfigString "GITHUB_CLIENT_ID", (buildProperties.secrets['github_client_id'] | buildProperties.notThere['github_client_id']).string
buildConfigString "GITHUB_SECRET", (buildProperties.secrets['github_secret'] | buildProperties.notThere['github_secret']).string
buildConfigString "IMGUR_CLIENT_ID", (buildProperties.secrets['imgur_client_id'] | buildProperties.notThere['imgur_client_id']).string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,12 @@ public static void insertAtCursor(@NonNull EditText editText, @NonNull String te
String oriContent = editText.getText().toString();
int start = editText.getSelectionStart();
int end = editText.getSelectionEnd();
int index = start >= 0 ? start : 0;
Logger.e(start, end);
if (start >= 0 && end > 0) {
if (start >= 0 && end > 0 && start != end) {
editText.setText(editText.getText().replace(start, end, text));
} else {
int index = editText.getSelectionStart() >= 0 ? editText.getSelectionStart() : 0;
Logger.e(start, end, index);
StringBuilder builder = new StringBuilder(oriContent);
builder.insert(index, text);
editText.setText(builder.toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class MarkDownLayout : LinearLayout {
}
}

fun getSelectedText(): String? {
private fun getSelectedText(): String? {
markdownListener?.getEditText()?.let {
if (!it.text.toString().isBlank()) {
val selectionStart = it.selectionStart
Expand Down
8 changes: 5 additions & 3 deletions app/src/main/res/raw/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,26 @@
<body id="preview">
<h2><a id="FastHub_changelog_0"></a>FastHub changelog
</h2>
<h3><a id="Version__420_Create_Edit__Delete_files_make_Commits_2"></a>Version 4.4.0 (Org Project Columns and Cards)
<h3><a id="Version__420_Create_Edit__Delete_files_make_Commits_2"></a>Version 4.4.1 (Org Project Columns and Cards)
</h3>
<blockquote>
<p>Please report the issues in FastHub repo instead, by opening the Drawer Menu and clicking on “Report an Issue”<strong>
PLEASE USE IT</strong>.
</p>
</blockquote>
<h4><a id="Bugs__Enhancements__new_Features_320_7"></a>Bugs , Enhancements &amp; new Features (4.4.0)
<h4><a id="Bugs__Enhancements__new_Features_320_7"></a>Bugs , Enhancements &amp; new Features (4.4.1)
</h4>
<ul>
<li>(New 4.4.1) Add Labels, Assignees & Milestone when creating/editing Issue</li>
<li>(New) Improvements to handle Students PRO.</li>
<li>(New) Org Project Columns & Cards (Edit, Create & Delete)</li>
<li>(New) Displaying Labels under Issue/Pr description.</li>
<li>(Enhancement) Removal of PR review limit.</li>
<li>(Enhancement) Selected text will be taken in consideration when adding Image/Link.</li>
<li>(Enhancement) Removed Loading background.</li>
<li>(Enhancement) More markdown enhancement.</li>
<li>(Fix) Lots of bug fixes.</li>
<li>There are more stuff are not mentioned, find them out :stuck_out_tongue:</li>
<li>There are more stuff are not mentioned, find them out ;).</li>

This comment has been minimized.

Copy link
@yakov116

yakov116 Oct 3, 2017

Collaborator

LOL what a fix!

</ul>
<h3><a id="What_left_in_FastHub_29"></a>What left in FastHub?
</h3>
Expand Down

0 comments on commit 5c4bf2d

Please sign in to comment.