mirror of https://github.com/jlelse/teleposter
Small fixes
This commit is contained in:
parent
2bf858dd0a
commit
8a74d9025c
Binary file not shown.
|
@ -8,8 +8,8 @@ android {
|
||||||
applicationId "telegra.ph"
|
applicationId "telegra.ph"
|
||||||
minSdkVersion 15
|
minSdkVersion 15
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
versionCode 6
|
versionCode 7
|
||||||
versionName "1.1"
|
versionName "1.1.1"
|
||||||
resConfigs "en"
|
resConfigs "en"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|
|
@ -36,7 +36,7 @@ class MainActivity : AppCompatActivity(), AdvancedWebView.Listener {
|
||||||
if (accessToken().isNullOrBlank()) Api().createAccount { accessToken ->
|
if (accessToken().isNullOrBlank()) Api().createAccount { accessToken ->
|
||||||
if (accessToken != null) saveAccessToken(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()
|
else loadEditor()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,6 +182,7 @@ class MainActivity : AppCompatActivity(), AdvancedWebView.Listener {
|
||||||
MaterialDialog.Builder(this)
|
MaterialDialog.Builder(this)
|
||||||
.title(R.string.name_question)
|
.title(R.string.name_question)
|
||||||
.input(getString(R.string.name_hint), if (isEdit) currentPage?.author_name ?: authorName() ?: "" else authorName() ?: "", { dialog, name ->
|
.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 (isEdit) Api().editPage(accessToken(), currentPage?.path, json, title.toString(), name.toString()) { success, page ->
|
||||||
if (success) showPage(page)
|
if (success) showPage(page)
|
||||||
else showError()
|
else showError()
|
||||||
|
@ -244,7 +245,7 @@ class MainActivity : AppCompatActivity(), AdvancedWebView.Listener {
|
||||||
MaterialDialog.Builder(this)
|
MaterialDialog.Builder(this)
|
||||||
.title(R.string.title_question)
|
.title(R.string.title_question)
|
||||||
.input(getString(R.string.title_hint), "", { dialog, input ->
|
.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()
|
.show()
|
||||||
true
|
true
|
||||||
|
|
|
@ -10,6 +10,10 @@ buildscript {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id 'com.github.ben-manes.versions' version '0.13.0'
|
||||||
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
|
|
Loading…
Reference in New Issue