this commit fixes #1067 and readying to release 4.4.1

This commit is contained in:
k0shk0sh 2017-10-03 16:32:50 +02:00
parent 22828a8785
commit 5c4bf2dce6
4 changed files with 11 additions and 8 deletions

View File

@ -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

View File

@ -314,11 +314,12 @@ public class MarkDownProvider {
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());

View File

@ -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

View File

@ -8,16 +8,18 @@
<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>
@ -25,7 +27,7 @@
<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>
</ul>
<h3><a id="What_left_in_FastHub_29"></a>What left in FastHub?
</h3>