Permalink
Browse files

Small fixes

  • Loading branch information...
1 parent 2bf858d commit 8a74d9025c70a5ae9ad1cea895ee06988309e35b @jlelse committed Dec 24, 2016
Showing with 9 additions and 4 deletions.
  1. BIN apks/1.1.1.apk
  2. +2 −2 app/build.gradle
  3. +3 −2 app/src/main/java/telegra/ph/MainActivity.kt
  4. +4 −0 build.gradle
View
Binary file not shown.
View
@@ -8,8 +8,8 @@ android {
applicationId "telegra.ph"
minSdkVersion 15
targetSdkVersion 25
- versionCode 6
- versionName "1.1"
+ versionCode 7
+ versionName "1.1.1"
resConfigs "en"
}
buildTypes {
@@ -36,7 +36,7 @@ class MainActivity : AppCompatActivity(), AdvancedWebView.Listener {
if (accessToken().isNullOrBlank()) Api().createAccount { accessToken ->
if (accessToken != null) saveAccessToken(accessToken)
}
- if (intent.action == Intent.ACTION_VIEW && !intent.dataString.isNullOrBlank() && intent.dataString.contains("telegra.ph")) loadPage(intent.dataString.split("/").last())
+ if (intent.action == Intent.ACTION_VIEW && intent.dataString.contains("telegra.ph")) loadPage(intent.dataString.split("/").last())
else loadEditor()
}
@@ -182,6 +182,7 @@ class MainActivity : AppCompatActivity(), AdvancedWebView.Listener {
MaterialDialog.Builder(this)
.title(R.string.name_question)
.input(getString(R.string.name_hint), if (isEdit) currentPage?.author_name ?: authorName() ?: "" else authorName() ?: "", { dialog, name ->
+ if (!isEdit) saveAuthorName(name.toString())
if (isEdit) Api().editPage(accessToken(), currentPage?.path, json, title.toString(), name.toString()) { success, page ->
if (success) showPage(page)
else showError()
@@ -244,7 +245,7 @@ class MainActivity : AppCompatActivity(), AdvancedWebView.Listener {
MaterialDialog.Builder(this)
.title(R.string.title_question)
.input(getString(R.string.title_hint), "", { dialog, input ->
- addBookmark("${(if (webView?.url != "about:blank") webView?.url ?: currentUrl else currentUrl).split("/").last()}xxx;xxx$input")
+ addBookmark("${currentUrl.split("/").last()}xxx;xxx$input")
})
.show()
true
View
@@ -10,6 +10,10 @@ buildscript {
}
}
+plugins {
+ id 'com.github.ben-manes.versions' version '0.13.0'
+}
+
allprojects {
repositories {
jcenter()

0 comments on commit 8a74d90

Please sign in to comment.