Compare commits

..

14 Commits

Author SHA1 Message Date
600adc81b5 Merge pull request #246 from Binnette/ExtraSubject
Add a vertical scrollbar to article fragment
2018-11-17 20:51:10 +01:00
ddac2870af Changed git tag sort for it to work on the jenkins server. 2018-11-17 20:48:18 +01:00
8d9c8c1394 Add a vertical scrollbar to article fragment 2018-11-17 20:37:21 +01:00
b59c3bcb23 Merge pull request #245 from Binnette/ExtraSubject
Add EXTRA_SUBJECT when sharing link
2018-11-17 19:46:51 +01:00
7f554adba5 Add EXTRA_SUBJECT when sharing link 2018-11-17 18:07:38 +01:00
21ce061282 Better handling for version code automation. 2018-11-15 21:11:15 +01:00
bdb71e9b14 Note for build. 2018-11-13 22:02:44 +01:00
df22e7de15 Still not working. 2018-11-13 22:01:41 +01:00
6b3550396b Jenkins not executing the rest of the script. 2018-11-13 21:59:28 +01:00
c70f1e31a6 Added fetch to the build script. 2018-11-13 21:57:36 +01:00
695670e944 Still fixing the local publish issue. 2018-11-13 21:47:12 +01:00
1028826788 No more local publish. 2018-11-13 21:45:10 +01:00
82a8977c96 Closes #244. 2018-11-13 20:24:06 +01:00
07d9ce1054 New Crowdin translations (#243)
* New translations strings.xml (Spanish)

* New translations strings.xml (Galician)
2018-11-13 15:51:16 +01:00
9 changed files with 31 additions and 12 deletions

View File

@ -10,8 +10,8 @@ ext {
}
def gitVersion() {
def process = "git describe --abbrev=0 --tags".execute()
return process.text.substring(1).replaceAll("\\.", "").trim()
def process = "git for-each-ref refs/tags --sort=-authordate --format='%(refname:short)' --count=1".execute()
return process.text.replaceAll("'", "").substring(1).replaceAll("\\.", "").trim()
}
def versionCodeFromGit() {

View File

@ -179,7 +179,8 @@ class ItemCardAdapter(
})
mView.shareBtn.setOnClickListener {
c.shareLink(items[adapterPosition].getLinkDecoded())
val item = items[adapterPosition]
c.shareLink(item.getLinkDecoded(), item.title)
}
mView.browserBtn.setOnClickListener {

View File

@ -139,7 +139,7 @@ class ArticleFragment : Fragment() {
override fun onItemClick(item: MenuItem) {
when (item.itemId) {
R.id.more_action -> getContentFromMercury(customTabsIntent, prefs)
R.id.share_action -> activity!!.shareLink(url)
R.id.share_action -> activity!!.shareLink(url, contentTitle)
R.id.open_action -> activity!!.openItemUrl(
allItems,
pageNumber.toInt(),

View File

@ -25,11 +25,12 @@ fun String.toStringUriWithHttp(): String =
this
}
fun Context.shareLink(itemUrl: String) {
fun Context.shareLink(itemUrl: String, itemTitle: String) {
val sendIntent = Intent()
sendIntent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
sendIntent.action = Intent.ACTION_SEND
sendIntent.putExtra(Intent.EXTRA_TEXT, itemUrl.toStringUriWithHttp())
sendIntent.putExtra(Intent.EXTRA_SUBJECT, itemTitle)
sendIntent.type = "text/plain"
startActivity(
Intent.createChooser(

View File

@ -9,7 +9,8 @@
<androidx.core.widget.NestedScrollView
android:id="@+id/nestedScrollView"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:scrollbars="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"

View File

@ -166,6 +166,6 @@
<string name="new_items_notification_text">%1$d artículos cargados.</string>
<string name="pref_switch_notify_new_items">Notificarme cuando se sincronicen nuevos artículos.</string>
<string name="shortcut_offline">Sin conexión</string>
<string name="pref_api_timeout">Api Timeout</string>
<string name="pref_api_timeout">Se acabó el tiempo de espera de la API</string>
<string name="pref_header_experimental">Experimental</string>
</resources>

View File

@ -166,6 +166,6 @@
<string name="new_items_notification_text">%1$d novos elementos cargados.</string>
<string name="pref_switch_notify_new_items">Notificarme cando se sincronicen novos elementos.</string>
<string name="shortcut_offline">Sen conexión</string>
<string name="pref_api_timeout">Api Timeout</string>
<string name="pref_api_timeout">Acabouse o tempo de espera da API</string>
<string name="pref_header_experimental">Experimental</string>
</resources>

View File

@ -1,9 +1,23 @@
#!/bin/bash
BASE_VERSION="1.7"
TODAYS_VERSION="1"
git fetch --tags -p
VERSION="${BASE_VERSION//./}$(date '+%y%m%j')$TODAYS_VERSION"
BASE_VERSION="1.7"
LAST_TAG=$(git tag -l | sort -V | tail -1)
INITIAL_VERSION="${BASE_VERSION//./}$(date '+%y%m%j')"
LAST_DAY_VERSION=$(echo $LAST_TAG | sed "s/v${INITIAL_VERSION}//")
LAST_DAY_VERSION_LENGTH=$(echo "${#LAST_DAY_VERSION}")
if [[ "$LAST_DAY_VERSION_LENGTH" == "1" ]]
then
TODAYS_VERSION=$(( $LAST_DAY_VERSION + 1 ))
else
TODAYS_VERSION="1"
fi
VERSION="${INITIAL_VERSION}${TODAYS_VERSION}"
PARAMS_EXCEPT_PUBLISH=$(echo $1 | sed 's/\-\-publish//')
@ -13,5 +27,5 @@ if [[ "$@" == *'--publish'* ]]
then
./publish-version.sh ${VERSION}
else
echo "Did not publish. If you wanted to do so, call the script with \"--publish\"."
echo "Did not publish. If you wanted to do so, call the script with \"--publish\" or \"--publish-local\"."
fi

View File

@ -1,5 +1,7 @@
#!/bin/bash
# NOTE: This is copy/pasted in jenkins
rm -f version.txt
printf "versionName=$1-github\nversionCode=$1" >> version.txt